Cardano » Scripts API

The Cardano » Scripts API from Cardano — 7 operation(s) for cardano » scripts.

Operations 7

GET /scripts Scripts #
GET /scripts/{script_hash} Specific script #
GET /scripts/{script_hash}/json Script JSON #
GET /scripts/{script_hash}/cbor Script CBOR #
GET /scripts/{script_hash}/redeemers Redeemers of a specific script #
GET /scripts/datum/{datum_hash} Datum value #
GET /scripts/datum/{datum_hash}/cbor Datum CBOR value #

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/cardano-cardano-scripts-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

cardano-cardano-scripts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 0.1.89
  title: Blockfrost.io ~ API Documentation Cardano » Scripts API
  x-logo:
    url: https://staging.blockfrost.io/images/logo.svg
    altText: Blockfrost
  contact:
    name: Blockfrost Team
    url: https://blockfrost.io
    email: contact@blockfrost.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://blockfrost.io/terms
  description: Blockfrost is an API as a service that allows users to interact with the Cardano blockchain, Midnight blockchain, and parts of their ecosystems.
servers:
- url: https://cardano-mainnet.blockfrost.io/api/v0
  description: Cardano Mainnet network
- url: https://cardano-preprod.blockfrost.io/api/v0
  description: Cardano Preprod network
- url: https://cardano-preview.blockfrost.io/api/v0
  description: Cardano Preview network
- url: https://localhost:3000
  description: local
security:
- project_id: []
tags:
- name: Cardano » Scripts
paths:
  /scripts:
    get:
      tags:
      - Cardano » Scripts
      summary: Scripts
      description: List of scripts.
      parameters:
      - in: query
        name: count
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
        description: The number of results displayed on one page.
      - in: query
        name: page
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 21474836
          default: 1
        description: The page number for listing the results.
      - in: query
        name: order
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
        description: 'The ordering of items from the point of view of the blockchain,

          not the page listing itself. By default, we return oldest first, newest last.

          '
      responses:
        '200':
          description: Return list of scripts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scripts'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScripts
      x-operation-id-source: derived
  /scripts/{script_hash}:
    get:
      tags:
      - Cardano » Scripts
      summary: Specific script
      description: Information about a specific script
      parameters:
      - in: path
        name: script_hash
        required: true
        schema:
          type: string
        description: Hash of the script
        example: e1457a0c47dfb7a2f6b8fbb059bdceab163c05d34f195b87b9f2b30e
      responses:
        '200':
          description: Return the information about a specific script
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/script'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScriptsByScriptHash
      x-operation-id-source: derived
  /scripts/{script_hash}/json:
    get:
      tags:
      - Cardano » Scripts
      summary: Script JSON
      description: JSON representation of a `timelock` script
      parameters:
      - in: path
        name: script_hash
        required: true
        schema:
          type: string
        description: Hash of the script
        example: e1457a0c47dfb7a2f6b8fbb059bdceab163c05d34f195b87b9f2b30e
      responses:
        '200':
          description: Return the JSON representation of a `timelock` script
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/script_json'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScriptsByScriptHashJson
      x-operation-id-source: derived
  /scripts/{script_hash}/cbor:
    get:
      tags:
      - Cardano » Scripts
      summary: Script CBOR
      description: CBOR representation of a `plutus` script
      parameters:
      - in: path
        name: script_hash
        required: true
        schema:
          type: string
        description: Hash of the script
        example: e1457a0c47dfb7a2f6b8fbb059bdceab163c05d34f195b87b9f2b30e
      responses:
        '200':
          description: Return the CBOR representation of a `plutus` script
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/script_cbor'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScriptsByScriptHashCbor
      x-operation-id-source: derived
  /scripts/{script_hash}/redeemers:
    get:
      tags:
      - Cardano » Scripts
      summary: Redeemers of a specific script
      description: List of redeemers of a specific script
      parameters:
      - in: path
        name: script_hash
        required: true
        schema:
          type: string
        description: Hash of the script
        example: e1457a0c47dfb7a2f6b8fbb059bdceab163c05d34f195b87b9f2b30e
      - in: query
        name: count
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
        description: The number of results displayed on one page.
      - in: query
        name: page
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 21474836
          default: 1
        description: The page number for listing the results.
      - in: query
        name: order
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
        description: 'The ordering of items from the point of view of the blockchain,

          not the page listing itself. By default, we return oldest first, newest last.

          '
      responses:
        '200':
          description: Return the information about redeemers of a specific script
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/script_redeemers'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScriptsByScriptHashRedeemers
      x-operation-id-source: derived
  /scripts/datum/{datum_hash}:
    get:
      tags:
      - Cardano » Scripts
      summary: Datum value
      description: Query JSON value of a datum by its hash
      parameters:
      - in: path
        name: datum_hash
        required: true
        schema:
          type: string
        description: Hash of the datum
        example: db583ad85881a96c73fbb26ab9e24d1120bb38f45385664bb9c797a2ea8d9a2d
      responses:
        '200':
          description: Return the datum value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/script_datum'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScriptsDatumByDatumHash
      x-operation-id-source: derived
  /scripts/datum/{datum_hash}/cbor:
    get:
      tags:
      - Cardano » Scripts
      summary: Datum CBOR value
      description: Query CBOR serialised datum by its hash
      parameters:
      - in: path
        name: datum_hash
        required: true
        schema:
          type: string
        description: Hash of the datum
        example: db583ad85881a96c73fbb26ab9e24d1120bb38f45385664bb9c797a2ea8d9a2d
      responses:
        '200':
          description: Return the CBOR serialised datum value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/script_datum_cbor'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '418':
          $ref: '#/components/responses/418'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      operationId: getScriptsDatumByDatumHashCbor
      x-operation-id-source: derived
components:
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status_code:
                type: integer
                example: 400
              error:
                type: string
                example: Bad Request
              message:
                type: string
                example: Backend did not understand your request.
            required:
            - error
            - message
            - status_code
    '418':
      description: IP has been auto-banned for extensive sending of requests after usage limit has been reached
      content:
        application/json:
          schema:
            type: object
            properties:
              status_code:
                type: integer
                example: 418
              error:
                type: string
                example: Requested Banned
              message:
                type: string
                example: IP has been auto-banned for flooding.
            required:
            - error
            - message
            - status_code
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              status_code:
                type: integer
                example: 500
              error:
                type: string
                example: Internal Server Error
              message:
                type: string
                example: An unexpected response was received from the backend.
            required:
            - error
            - message
            - status_code
    '403':
      description: Authentication secret is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              status_code:
                type: integer
                example: 403
              error:
                type: string
                example: Forbidden
              message:
                type: string
                example: Invalid project token.
            required:
            - error
            - message
            - status_code
    '404':
      description: Component not found
      content:
        application/json:
          schema:
            type: object
            properties:
              status_code:
                type: integer
                example: 404
              error:
                type: string
                example: Not Found
              message:
                type: string
                example: The requested component has not been found.
            required:
            - error
            - message
            - status_code
    '429':
      description: Usage limit reached
      content:
        application/json:
          schema:
            type: object
            properties:
              status_code:
                type: integer
                example: 429
              error:
                type: string
                example: Project Over Limit
              message:
                type: string
                example: Usage is over limit.
            required:
            - error
            - message
            - status_code
  schemas:
    script_datum:
      type: object
      properties:
        json_value:
          type: object
          additionalProperties: true
          description: JSON content of the datum
      required:
      - json_value
      example:
        json_value:
          int: 42
    script_datum_cbor:
      type: object
      properties:
        cbor:
          type: string
          description: CBOR serialized datum
      required:
      - cbor
      example:
        cbor: 19a6aa
    script_redeemers:
      type: array
      items:
        type: object
        properties:
          tx_hash:
            type: string
            example: 1a0570af966fb355a7160e4f82d5a80b8681b7955f5d44bec0dce628516157f0
            description: Hash of the transaction
          tx_index:
            type: integer
            example: 0
            description: The index of the redeemer pointer in the transaction
          purpose:
            type: string
            enum:
            - spend
            - mint
            - cert
            - reward
            example: spend
            description: Validation purpose
          redeemer_data_hash:
            type: string
            example: 923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec
            description: Datum hash of the redeemer
          datum_hash:
            type: string
            example: 923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec
            description: Datum hash
            deprecated: true
          unit_mem:
            type: string
            example: '1700'
            description: The budget in Memory to run a script
          unit_steps:
            type: string
            example: '476468'
            description: The budget in CPU steps to run a script
          fee:
            type: string
            example: '172033'
            description: The fee consumed to run the script
        required:
        - tx_hash
        - tx_index
        - purpose
        - redeemer_data_hash
        - datum_hash
        - unit_mem
        - unit_steps
        - fee
    script_json:
      type: object
      properties:
        json:
          anyOf:
          - type: string
          - type: object
            additionalProperties: true
          - type: array
            items: {}
          - type: integer
          - type: number
          - type: boolean
          - type: 'null'
          description: JSON contents of the `timelock` script, null for `plutus` scripts
      required:
      - json
      example:
        json:
          type: atLeast
          scripts:
          - type: sig
            keyHash: 654891a4db2ea44b5263f4079a33efa0358ba90769e3d8f86a4a0f81
          - type: sig
            keyHash: 8685ad48f9bebb8fdb6447abbe140645e0bf743ff98da62e63e2147f
          - type: sig
            keyHash: cb0f3b3f91693374ff7ce1d473cf6e721c7bab52b0737f04164e5a2d
          required: 2
    scripts:
      type: array
      items:
        type: object
        properties:
          script_hash:
            type: string
            description: Script hash
        required:
        - script_hash
      example:
      - script_hash: 13a3efd825703a352a8f71f4e2758d08c28c564e8dfcce9f77776ad1
      - script_hash: e1457a0c47dfb7a2f6b8fbb059bdceab163c05d34f195b87b9f2b30e
      - script_hash: a6e63c0ff05c96943d1cc30bf53112ffff0f34b45986021ca058ec54
    script_cbor:
      type: object
      properties:
        cbor:
          type:
          - string
          - 'null'
          description: CBOR contents of the `plutus` script, null for `timelocks`
      required:
      - cbor
      example:
        cbor: 4e4d01000033222220051200120011
    script:
      type: object
      properties:
        script_hash:
          type: string
          example: 13a3efd825703a352a8f71f4e2758d08c28c564e8dfcce9f77776ad1
          description: Script hash
        type:
          type: string
          enum:
          - timelock
          - plutusV1
          - plutusV2
          - plutusV3
          example: plutusV1
          description: Type of the script language
        serialised_size:
          type:
          - integer
          - 'null'
          description: The size of the CBOR serialised script, if a Plutus script
          example: 3119
      required:
      - script_hash
      - type
      - serialised_size
  securitySchemes:
    project_id:
      type: apiKey
      in: header
      name: project_id
      description: 'There are multiple token types available based on network you choose

        when creating a Blockfrost a project, for a list of token types

        see available networks.

        '