Overview
The Sourcify API enables programmatic access to smart contract verification services, allowing developers to verify contract source code, check verification status, and retrieve verified contract files. This decentralized verification service is essential for developers and auditors who need to ensure smart contract transparency and verify that deployed bytecode matches the provided source code across multiple blockchain networks.Key Features
- Contract Verification: Submit smart contract source code and metadata for verification against deployed bytecode on various blockchain networks.
- Multiple Verification Methods: Support for direct file upload, Etherscan-verified contract import, and solc-json compilation artifact verification.
- Verification Status Checking: Query the verification status of contracts by address and chain ID, with support for both full and partial matches.
- File Retrieval: Access verified contract source code, metadata, and compilation artifacts for any verified contract.
- Multi-Chain Support: Compatible with Ethereum mainnet, testnets, and other EVM-compatible networks including Hedera.
- Repository Access: Browse and download verified contract files with organized file tree structures.
📣 For interactive API exploration and testing, visit https://server-verify.hashscan.io/api-docs/
Base URL
Endpoints
Stateless Verification
| Method | Endpoint | Description |
|---|---|---|
| POST | /verify | verify contracts by uploading source files and metadata |
| POST | /verify/etherscan | verify contracts already verified on etherscan |
| POST | /verify/solc-json | verify contracts using solc-json compilation artifacts |
Repository Access
| Method | Endpoint | Description |
|---|---|---|
| GET | /check-all-by-addresses | check verification status (full or partial match) for multiple contracts |
| GET | /check-by-addresses | check verification status (full match only) for multiple contracts |
| GET | /files/any/{chain}/{address} | retrieve all files for a contract (full and partial match) |
| GET | /files/{chain}/{address} | retrieve all files for a contract (full match only) |
| GET | /files/contracts/{chain} | get all verified contract addresses on a specific chain |
| GET | /files/tree/any/{chain}/{address} | get file tree structure (full and partial match) |
| GET | /files/tree/{chain}/{address} | get file tree structure (full match only) |
| GET | /repository/contracts/{match_type}/{chain}/{address}/{filePath} | download specific files from verified contracts |
Session Management
| Method | Endpoint | Description |
|---|---|---|
| GET | /session/data | retrieve current session verification data |
| POST | /session/clear | clear session data |
| POST | /session/input-files | add files to verification session |
| POST | /session/input-contract | import deployed contract from ipfs |
| POST | /session/verify-checked | verify contracts in current session |
| POST | /session/input-solc-json | add solc-json to session for verification |
| POST | /session/verify/etherscan | verify etherscan contracts in session |
Administration
| Method | Endpoint | Description |
|---|---|---|
| POST | /change-log-level | modify application logging level (requires authentication) |