Blockfrost Cardano » Scripts API
The Cardano » Scripts API from Blockfrost — 7 operation(s) for cardano » scripts.
The Cardano » Scripts API from Blockfrost — 7 operation(s) for cardano » scripts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/blockfrost-cardano-scripts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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: 3.2.0
info:
version: 0.1.87
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: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScripts
x-operation-id-source: derived
/scripts/{script_hash}:
get:
tags:
- Cardano » Scripts
summary: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScriptsByScriptHash
x-operation-id-source: derived
/scripts/{script_hash}/json:
get:
tags:
- Cardano » Scripts
summary: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScriptsByScriptHashJson
x-operation-id-source: derived
/scripts/{script_hash}/cbor:
get:
tags:
- Cardano » Scripts
summary: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScriptsByScriptHashCbor
x-operation-id-source: derived
/scripts/{script_hash}/redeemers:
get:
tags:
- Cardano » Scripts
summary: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScriptsByScriptHashRedeemers
x-operation-id-source: derived
/scripts/datum/{datum_hash}:
get:
tags:
- Cardano » Scripts
summary: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScriptsDatumByDatumHash
x-operation-id-source: derived
/scripts/datum/{datum_hash}/cbor:
get:
tags:
- Cardano » Scripts
summary: Blockfrost 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'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
operationId: getScriptsDatumByDatumHashCbor
x-operation-id-source: derived
components:
responses:
'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
'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
'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
'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
'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
'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
schemas:
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_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
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
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_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_datum_cbor:
type: object
properties:
cbor:
type: string
description: CBOR serialized datum
required:
- cbor
example:
cbor: 19a6aa
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
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.
'