Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Hedera contracts API

The contracts objects represents the information associated with contract entities.The contracts list endpoint is cached and not updated as frequently as the contract lookup by a specific ID endpoint.

Hedera contracts API is one of 10 APIs that Hedera publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include contracts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and rate-limit docs.

This API exposes 12 operations across 12 paths, and defines 38 schemas. It is described by OpenAPI 3.1.0, at version 0.156.0.

Requests are made against a single base URL, {scheme}://{network}.mirrornode.hedera.com.

12 operations 12 paths 38 schemas 11 GET1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
0.156.0
Base URL
https://mainnet.mirrornode.hedera.com
License
Resource Areas
1

Paths & Operations 12

Across 12 paths, the API surfaces 12 operations — 11 GET, 1 POST. Each is listed below with its method, path, parameters, and response codes.

contracts 12

The contracts objects represents the information associated with contract entities.The contracts list endpoint is cached and not updated as frequently as the contract lookup by a…

POST
/api/v1/contracts/call
Invoke a smart contract
contractCall body → 200400404415429500501
GET
/api/v1/contracts
List contract entities on network
getContracts 3 params → 200400
GET
/api/v1/contracts/{contractIdOrAddress}
Get contract by id
getContract 2 params → 200400404
GET
/api/v1/contracts/{contractIdOrAddress}/results
List contract results from a contract on the network
getContractResultsByContractId 9 params → 200400
GET
/api/v1/contracts/{contractIdOrAddress}/state
The contract state from a contract on the network
getContractState 5 params → 200400
GET
/api/v1/contracts/{contractIdOrAddress}/results/{timestamp}
Get the contract result from a contract on the network executed at a given timestamp
getContractResultByIdAndTimestamp 3 params → 200206400404
GET
/api/v1/contracts/results
List contract results from all contracts on the network
getContractsResults 9 params → 200400
GET
/api/v1/contracts/results/{transactionIdOrHash}
Get the contract result from a contract on the network for a given transactionId or ethereum transaction hash
getContractResultByTransactionIdOrHash 3 params → 200206400404
GET
/api/v1/contracts/results/{transactionIdOrHash}/actions
Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash
getContractActions 4 params → 200400404
GET
/api/v1/contracts/results/{transactionIdOrHash}/opcodes
Get the opcode traces for a historical transaction on the network with the given transaction ID or hash
getContractOpcodes 4 params → 200400404429
GET
/api/v1/contracts/{contractIdOrAddress}/results/logs
List contract logs from a contract on the network
getContractLogsByContractId 9 params → 200400
GET
/api/v1/contracts/results/logs
List contracts logs across many contracts on the network
getContractsLogs 9 params → 200400

Schemas 38

The contract defines 38 schemas that model the data the API accepts and returns. The most detailed are ContractResult (33 properties), ContractAction (17 properties), Contract (16 properties), Opcode (9 properties). Each schema is shown below with its type and property counts.

ContractsResponse
object
2 properties
ContractLogTopics
array
A list of hex encoded topics associated with this log event
ContractResult
object
33 properties
AuthorizationList
object
6 properties
ContractState
object
5 properties 5 required
ContractResultStateChange
object
5 properties
Key
objectnull
The public key which controls access to various network entities.
2 properties
ContractCallResponse
object
1 property
ContractLogs
array
TimestampRange
object
A timestamp range an entity is valid for
2 properties
ContractResultLog
object
6 properties
TimestampNullable
stringnull
A Unix timestamp in seconds.nanoseconds format
ContractStateResponse
object
2 properties
Opcode
object
Represents a struct/opcode log entry in a trace
9 properties 8 required
ContractActions
array
AccessList
object
2 properties
Bloom
stringnull
Links
object
1 property
ContractResponse
EntityId
stringnull
Network entity ID in the format of shard.realm.num
EvmAddress
string
A network entity encoded as an EVM address in hex.
ContractResultsResponse
object
2 properties
ContractCallRequest
object
8 properties 1 required
OpcodesResponse
object
6 properties 6 required
ContractLogsResponse
object
2 properties
Contract
object
16 properties
Timestamp
string
A Unix timestamp in seconds.nanoseconds format
ContractResultLogs
array
ContractLog
ContractResultStateChanges
array
ContractAction
object
17 properties
EvmAddressNullable
stringnull
A network entity encoded as an EVM address in hex.
ContractResultDetails
Error
object
1 property
ContractResults
array
Contracts
array
LogTopicQueryParam
array
ContractActionsResponse
object
2 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hedera-contracts-api-openapi.yml Raw ↑

Other APIs Hedera publishes across the network.

Hedera accounts API
Hedera airdrops API
Hedera balances API
Hedera blocks API
Hedera network API
Hedera schedules API
Hedera tokens API
Hedera topics API
Hedera transactions API