How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Basescan Contracts API

The Contracts API from Basescan — 5 operation(s) for contracts.

Basescan Contracts API is one of 10 APIs that Basescan 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 5 operations across 5 paths, and defines 14 schemas. It is described by OpenAPI 3.1.0, at version 1.0.0.

Requests are made against 2 base URLs: https://api.basescan.org/api, https://api-sepolia.basescan.org/api.

5 operations 5 paths 14 schemas 4 GET1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.0.0
Base URL
https://api.basescan.org/api
Authentication
API Key
License
Resource Areas
1

Authentication & Security 1

Basescan Contracts API declares 1 security scheme for authenticating requests. An API key is passed in the query as apikey (apiKeyAuth). By default, every request must be authenticated.

Paths & Operations 5

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

Contracts 5
GET
/?module=contract&action=getabi
Get Contract ABI for Verified Contract Source Codes
get-contract-abi-for-verified-contract-source-codes 1 param → 200
GET
/?module=contract&action=getsourcecode
Get Contract Source Code for Verified Contract Source Codes
get-contract-source-code-for-verified-contract-source-codes 1 param → 200
GET
/?module=contract&action=getcontractcreation
Get Contract Creator and Creation Tx Hash
get-contract-creator-and-creation-tx-hash 1 param → 200
POST
/?module=contract&action=verifysourcecode
Verify Source Code
verify-source-code body → 200
GET
/?module=contract&action=checkverifystatus
Check Source Code Verification Status
check-source-code-verification-status 1 param → 200

Schemas 14

The contract defines 14 schemas that model the data the API accepts and returns. The most detailed are Post.contract.verifysourcecode (7 properties), ResponseNOTOK (3 properties), ResponseOK (3 properties), Result.contract.verifysourcecode (1 property). Each schema is shown below with its type and property counts.

Result.contract.getcontractcreation
object
1 property
ResultArrayOfObjects
object
1 property
Post.contract.verifysourcecode
object
7 properties 6 required
ChainId
integer
| Explorer | Chain ID | |-----------------------------|----------| | Etherscan | 1 | | Goerli Etherscan | 5 | | Sepolia Etherscan | 11155111 | | Holesky Ethers…
AddressHash
string
Result.contract.checkverifystatus
object
1 property
CodeFormat
string
single file -- use solidity-single-file; JSON file ( recommended ) -- use solidity-standard-json-input
ResponseOK
object
3 properties 3 required
TxHash
string
ArrayOfObjects
array
ResponseNOTOK
object
3 properties 3 required
GUID
string
Result.contract.getabi
object
1 property
Result.contract.verifysourcecode
object
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

basescan-contracts-api-openapi.yml Raw ↑

Other APIs Basescan publishes across the network.

Basescan Accounts API
Basescan API PRO Endpoints API
Basescan Blocks API
Basescan Gas Tracker API
Basescan Geth/Parity Proxy API
Basescan Logs API
Basescan Stats API
Basescan Tokens API
Basescan Transactions API
Where this information came from

This is an independent, third-party profile of Basescan Contracts API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.