Polkadot runtime API

Runtime specification, metadata, and code

Operations 13

GET /v1/runtime/code Runtime Wasm code #
GET /v1/runtime/metadata Runtime metadata #
GET /v1/runtime/metadata/versions Available metadata versions #
GET /v1/runtime/metadata/{version} Runtime metadata by version #
GET /v1/runtime/spec Runtime specification #
POST /api/scan/runtime/list List runtime versions
POST /api/scan/runtime/metadata Get runtime metadata
POST /api/scan/runtime/modules List runtime modules
GET /runtime/metadata Get the runtime metadata in decoded, JSON form.
GET /runtime/metadata/{metadataVersion} Get the requested version of runtime metadata in decoded, JSON form.
GET /runtime/metadata/versions Get the available versions of runtime metadata.
GET /runtime/code Get the runtime wasm blob.
GET /runtime/spec Get version information of the Substrate runtime.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/polkadot-runtime-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

polkadot-runtime-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Polkadot Runtime API
  version: '1.0'
  description: 'Operations tagged runtime across 3 of this provider''s published API definitions: polkadot-rest-api-openapi.json, subscan-swagger.yaml, substrate-api-sidecar-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:8080/v1
  description: Localhost
- url: https://https://www.subscan.io/
- url: https://polkadot-public-sidecar.parity-chains.parity.io/
  description: Polkadot Parity public sidecar
- url: https://kusama-public-sidecar.parity-chains.parity.io/
  description: Kusama Parity public sidecar
- url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Polkadot Asset Hub Parity public sidecar
- url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Kusama Asset Hub Parity public sidecar
- url: http://localhost:8080
  description: Localhost
tags:
- name: runtime
  description: Runtime specification, metadata, and code
paths:
  /v1/runtime/code:
    get:
      tags:
      - runtime
      summary: Runtime Wasm code
      description: Returns the Wasm code blob of the Substrate runtime at a given block.
      operationId: runtime_code
      parameters:
      - name: at
        in: query
        description: Block hash or number to query at
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Runtime code
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block parameter
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
    servers:
    - url: http://localhost:8080/v1
      description: Localhost
  /v1/runtime/metadata:
    get:
      tags:
      - runtime
      summary: Runtime metadata
      description: Returns the decoded runtime metadata in JSON format.
      operationId: runtime_metadata
      parameters:
      - name: at
        in: query
        description: Block hash or number to query at
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Runtime metadata
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block parameter
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
    servers:
    - url: http://localhost:8080/v1
      description: Localhost
  /v1/runtime/metadata/versions:
    get:
      tags:
      - runtime
      summary: Available metadata versions
      description: Returns the available metadata versions at a given block.
      operationId: runtime_metadata_versions
      parameters:
      - name: at
        in: query
        description: Block hash or number to query at
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List of available metadata versions
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: Invalid block parameter
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
    servers:
    - url: http://localhost:8080/v1
      description: Localhost
  /v1/runtime/metadata/{version}:
    get:
      tags:
      - runtime
      summary: Runtime metadata by version
      description: Returns the metadata at a specific version. The version parameter should be in 'vX' format (e.g., 'v14', 'v15').
      operationId: runtime_metadata_versioned
      parameters:
      - name: version
        in: path
        description: Metadata version (e.g., 'v14', 'v15')
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block hash or number to query at
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Runtime metadata at specified version
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid version format or block parameter
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
    servers:
    - url: http://localhost:8080/v1
      description: Localhost
  /v1/runtime/spec:
    get:
      tags:
      - runtime
      summary: Runtime specification
      description: Returns the runtime specification including version, APIs, and chain properties.
      operationId: runtime_spec
      parameters:
      - name: at
        in: query
        description: Block hash or number to query at
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Runtime specification
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block parameter
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
    servers:
    - url: http://localhost:8080/v1
      description: Localhost
  /api/scan/runtime/list:
    post:
      description: Returns runtime version history for the current network.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/internal_server_http.J'
                - properties:
                    data:
                      properties:
                        list:
                          items:
                            $ref: '#/components/schemas/subscan_internal_model.RuntimeVersion'
                          type: array
                      type: object
                  type: object
      summary: List runtime versions
      tags:
      - runtime
      x-synonyms:
      - runtime
      - versions
      - scan
      - spec version
      - runtime version
    servers:
    - url: https://https://www.subscan.io/
  /api/scan/runtime/metadata:
    post:
      description: Returns runtime metadata modules for the specified runtime spec version.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/internal_server_http.J'
                - properties:
                    data:
                      properties:
                        info:
                          properties:
                            metadata:
                              items:
                                $ref: '#/components/schemas/types.MetadataModules'
                              type: array
                          type: object
                      type: object
                  type: object
      summary: Get runtime metadata
      tags:
      - runtime
      x-synonyms:
      - runtime
      - metadata
      - scan
      - spec version
      - runtime version
      - meta
      - chain info
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_server_http.runtimeMetadataParams'
        description: params
        required: true
    servers:
    - url: https://https://www.subscan.io/
  /api/scan/runtime/modules:
    post:
      description: Returns runtime modules for the specified runtime spec version.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/internal_server_http.J'
                - properties:
                    data:
                      properties:
                        list:
                          items:
                            $ref: '#/components/schemas/subscan_internal_model.RuntimeModuleJson'
                          type: array
                      type: object
                  type: object
      summary: List runtime modules
      tags:
      - runtime
      x-synonyms:
      - runtime
      - modules
      - scan
      - spec version
      - runtime version
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_server_http.runtimeModuleParams'
        description: params
        required: true
    servers:
    - url: https://https://www.subscan.io/
  /runtime/metadata:
    get:
      tags:
      - runtime
      summary: Get the runtime metadata in decoded, JSON form.
      description: 'Returns the runtime metadata as a JSON object. Substrate Reference: - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html - Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata'
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the metadata at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeMetadata'
    servers:
    - url: https://polkadot-public-sidecar.parity-chains.parity.io/
      description: Polkadot Parity public sidecar
    - url: https://kusama-public-sidecar.parity-chains.parity.io/
      description: Kusama Parity public sidecar
    - url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Polkadot Asset Hub Parity public sidecar
    - url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Kusama Asset Hub Parity public sidecar
    - url: http://localhost:8080
      description: Localhost
  /runtime/metadata/{metadataVersion}:
    get:
      tags:
      - runtime
      summary: Get the requested version of runtime metadata in decoded, JSON form.
      description: 'Returns the requested version of runtime metadata as a JSON object. Substrate Reference: - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html - Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata'
      parameters:
      - name: metadataVersion
        in: path
        description: The version of metadata. The input is expected in a `vX` format, where `X` represents the version number (e.g. `v14`, `v15`).
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve the metadata at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeMetadata'
    servers:
    - url: https://polkadot-public-sidecar.parity-chains.parity.io/
      description: Polkadot Parity public sidecar
    - url: https://kusama-public-sidecar.parity-chains.parity.io/
      description: Kusama Parity public sidecar
    - url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Polkadot Asset Hub Parity public sidecar
    - url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Kusama Asset Hub Parity public sidecar
    - url: http://localhost:8080
      description: Localhost
  /runtime/metadata/versions:
    get:
      tags:
      - runtime
      summary: Get the available versions of runtime metadata.
      description: 'Returns the available versions of runtime metadata. Substrate Reference: - FRAME Support: https://crates.parity.io/frame_support/metadata/index.html - Knowledge Base: https://substrate.dev/docs/en/knowledgebase/runtime/metadata'
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the metadata versions at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                description: An array with the available metadata versions.
    servers:
    - url: https://polkadot-public-sidecar.parity-chains.parity.io/
      description: Polkadot Parity public sidecar
    - url: https://kusama-public-sidecar.parity-chains.parity.io/
      description: Kusama Parity public sidecar
    - url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Polkadot Asset Hub Parity public sidecar
    - url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Kusama Asset Hub Parity public sidecar
    - url: http://localhost:8080
      description: Localhost
  /runtime/code:
    get:
      tags:
      - runtime
      summary: Get the runtime wasm blob.
      description: Returns the runtime Wasm blob in hex format.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the runtime wasm blob at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeCode'
    servers:
    - url: https://polkadot-public-sidecar.parity-chains.parity.io/
      description: Polkadot Parity public sidecar
    - url: https://kusama-public-sidecar.parity-chains.parity.io/
      description: Kusama Parity public sidecar
    - url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Polkadot Asset Hub Parity public sidecar
    - url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Kusama Asset Hub Parity public sidecar
    - url: http://localhost:8080
      description: Localhost
  /runtime/spec:
    get:
      tags:
      - runtime
      summary: Get version information of the Substrate runtime.
      description: Returns version information related to the runtime.
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve runtime version information at.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeSpec'
    servers:
    - url: https://polkadot-public-sidecar.parity-chains.parity.io/
      description: Polkadot Parity public sidecar
    - url: https://kusama-public-sidecar.parity-chains.parity.io/
      description: Kusama Parity public sidecar
    - url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Polkadot Asset Hub Parity public sidecar
    - url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
      description: Kusama Asset Hub Parity public sidecar
    - url: http://localhost:8080
      description: Localhost
components:
  schemas:
    types.ModuleErrorField:
      properties:
        doc:
          items:
            type: string
          type: array
        type:
          type: string
        type_name:
          type: string
      type: object
    types.MetadataCalls:
      properties:
        args:
          items:
            $ref: '#/components/schemas/types.MetadataModuleCallArgument'
          type: array
        docs:
          items:
            type: string
          type: array
        lookup:
          type: string
        name:
          type: string
      type: object
    types.NMapType:
      properties:
        hashers:
          items:
            type: string
          type: array
        key_vec:
          items:
            type: string
          type: array
        keys_id:
          type: integer
        value:
          type: string
        value_id:
          type: integer
      type: object
    internal_server_http.runtimeMetadataParams:
      properties:
        spec:
          description: Runtime version
          example: 9430
          type: integer
      type: object
    types.MetadataEvents:
      properties:
        args:
          items:
            type: string
          type: array
        args_name:
          items:
            type: string
          type: array
        args_type_name:
          items:
            type: string
          type: array
        docs:
          items:
            type: string
          type: array
        lookup:
          type: string
        name:
          type: string
      type: object
    types.MetadataModules:
      properties:
        calls:
          items:
            $ref: '#/components/schemas/types.MetadataCalls'
          type: array
        calls_value:
          $ref: '#/components/schemas/types.PalletLookUp'
        constants:
          items:
            $ref: '#/components/schemas/types.MetadataConstants'
          type: array
        errors:
          items:
            $ref: '#/components/schemas/types.MetadataModuleError'
          type: array
        errors_value:
          $ref: '#/components/schemas/types.PalletLookUp'
        events:
          items:
            $ref: '#/components/schemas/types.MetadataEvents'
          type: array
        events_value:
          $ref: '#/components/schemas/types.PalletLookUp'
        index:
          type: integer
        name:
          type: string
        prefix:
          type: string
        storage:
          items:
            $ref: '#/components/schemas/types.MetadataStorage'
          type: array
      type: object
    types.StorageType:
      properties:
        PlainTypeValue:
          type: integer
        double_map_type:
          $ref: '#/components/schemas/types.MapType'
        map_type:
          $ref: '#/components/schemas/types.MapType'
        n_map_type:
          $ref: '#/components/schemas/types.NMapType'
        origin:
          type: string
        plain_type:
          type: string
      type: object
    subscan_internal_model.RuntimeVersion:
      properties:
        block_num:
          type: integer
        modules:
          type: string
        spec_version:
          type: integer
      type: object
    types.MetadataModuleCallArgument:
      properties:
        name:
          type: string
        type:
          type: string
        type_name:
          type: string
      type: object
    subscan_internal_model.RuntimeModuleJson:
      properties:
        modules:
          items:
            $ref: '#/components/schemas/subscan_internal_model.RuntimeModuleItemJson'
          type: array
        spec_version:
          type: integer
      type: object
    subscan_internal_model.RuntimeModuleItemJson:
      properties:
        call:
          items:
            type: string
          type: array
        event:
          items:
            type: string
          type: array
        module:
          type: string
      type: object
    internal_server_http.runtimeModuleParams:
      properties:
        all:
          example: true
          type: boolean
        spec:
          description: Runtime version
          example: 9430
          type: integer
      type: object
    types.MapType:
      properties:
        hasher:
          type: string
        isLinked:
          type: boolean
        key:
          type: string
        key2:
          type: string
        key2Hasher:
          type: string
        value:
          type: string
      type: object
    types.PalletLookUp:
      properties:
        type:
          type: integer
      type: object
    types.MetadataConstants:
      properties:
        constants_value:
          type: string
        docs:
          items:
            type: string
          type: array
        name:
          type: string
        type:
          type: string
        type_value:
          type: integer
      type: object
    types.MetadataStorage:
      properties:
        docs:
          items:
            type: string
          type: array
        fallback:
          type: string
        hasher:
          type: string
        modifier:
          type: string
        name:
          type: string
        type:
          $ref: '#/components/schemas/types.StorageType'
      type: object
    types.MetadataModuleError:
      properties:
        doc:
          items:
            type: string
          type: array
        fields:
          items:
            $ref: '#/components/schemas/types.ModuleErrorField'
          type: array
        index:
          type: integer
        name:
          type: string
      type: object
    internal_server_http.J:
      properties:
        code:
          example: 0
          type: integer
        data: {}
        generated_at:
          example: 1699600641
          type: integer
        message:
          example: Success
          type: string
      type: object
    RuntimeSpec:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        authoringVersion:
          type: string
          description: The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.
        chainType:
          $ref: '#/components/schemas/ChainType'
        implVersion:
          type: string
          description: Version of the implementation specification. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the `impl_version` changing. The `impl_version` is set to 0 when `spec_version` is incremented.
        specName:
          type: string
          description: Identifies the different Substrate runtimes.
        specVersion:
          type: string
          description: Version of the runtime specification.
        transactionVersion:
          type: string
          description: All existing dispatches are fully compatible when this number doesn't change. This number must change when an existing dispatchable (module ID, dispatch ID) is changed, either through an alteration in its user-level semantics, a parameter added/removed/changed, a dispatchable being removed, a module being removed, or a dispatchable/module changing its index.
        properties:
          type: object
          description: Arbitrary properties defined in the chain spec.
      description: Version information related to the runtime.
    ChainType:
      type: object
      description: Type of the chain. It will return one of the following enum variants as a key. Live, Development, Local, or Custom. Each variant will have a value as null except when the ChainType is Custom, it will return a string.
      properties:
        live:
          type:
          - string
          - 'null'
          default: null
        development:
          type:
          - string
          - 'null'
          default: null
        local:
          type:
          - string
          - 'null'
          default: null
        custom:
          type: string
      example: '{"live": null}'
    RuntimeCode:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        code:
          type: string
          format: hex
    BlockIdentifiers:
      type: object
      properties:
        hash:
          type: string
          description: The block's hash.
          format: hex
        height:
          type: string
          description: The block's height.
          format: unsignedInteger
    RuntimeMetadata:
      type: object
      description: 'Substrate runtime metadata containing pallet information, types registry, and API specifications.

        The structure varies significantly between different runtime versions (V9-V16) and different chains.

        This is a generic container that preserves the actual metadata structure as returned by the runtime.

        '
      properties:
        magicNumber:
          type: string
          description: The magic number identifying this as Substrate metadata (typically "1635018093")
          example: '1635018093'
        metadata:
          type: object
          description: 'Version-specific metadata content. The structure depends entirely on the runtime metadata version

            and can include various combinations of pallets, lookup registries, extrinsics, APIs, and other

            runtime-specific information.

            '
      required:
      - magicNumber
      - metadata
x-refined-from:
- polkadot-rest-api-openapi.json
- subscan-swagger.yaml
- substrate-api-sidecar-openapi.yaml