Hiro Smart Contracts API

Read-only endpoints to obtain Clarity smart contract details

Operations 14

GET /extended/v1/contract/by_trait Get contracts by trait #
GET /extended/v1/contract/{contract_id} Get contract info #
GET /extended/v1/contract/{contract_id}/events Get contract events #
GET /extended/v2/smart-contracts/status Get smart contracts status #
GET /v2/contracts/interface/{deployer_address}/{contract_name} Get contract interface #
POST /v2/map_entry/{deployer_address}/{contract_name}/{map_name} Get specific data-map inside a contract #
GET /v2/contracts/source/{deployer_address}/{contract_name} Get contract source #
POST /v2/contracts/call-read/{deployer_address}/{contract_name}/{function_name} Call read-only function #
POST /v3/contracts/fast-call-read/{deployer_address}/{contract_name}/{function_name} Call read-only function in fast mode (no cost and memory tracking) #
GET /v2/traits/{deployer_address}/{contract_name}/{trait_deployer_address}/{trait_contract_name}/{trait_name} Get trait implementation details #
GET /v2/clarity/marf/{marf_key_hash} Get the MARF value for a given key #
GET /v2/clarity/metadata/{deployer_address}/{contract_name}/{clarity_metadata_key} Get the contract metadata for the metadata key #
GET /v2/constant_val/{deployer_address}/{contract_name}/{constant_name} Get the value of a constant inside a contract #
GET /v2/data_var/{principal}/{contract_name}/{var_name} Get contract data variable #

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/hiro-smart-contracts-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

hiro-smart-contracts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hiro Smart Contracts API
  version: '1.0'
  description: 'Operations tagged Smart Contracts across 2 of this provider''s published API definitions: hiro-stacks-blockchain-api-openapi.yaml, hiro-stacks-node-rpc-api-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.hiro.so/
  description: mainnet
- url: http://localhost:20443
  description: Local Stacks Node
tags:


# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hiro/refs/heads/main/openapi/hiro-smart-contracts-api-openapi.yml