API Reference

Integrate GetChainLens capabilities into your applications. RESTful API with comprehensive documentation.

Base URL: https://api.getchainlens.com/v1

Authentication

All API requests require an API key passed in the header:

Authorization: Bearer YOUR_API_KEY

Get your API key from the Settings page

Contracts

GET
/api/v1/contracts/{address}

Get contract details and ABI

GET
/api/v1/contracts/{address}/source

Get verified source code

POST
/api/v1/contracts/verify

Verify contract source code

GET
/api/v1/contracts/{address}/events

Get contract events

Transactions

GET
/api/v1/tx/{hash}

Get transaction details

GET
/api/v1/tx/{hash}/trace

Get transaction trace

GET
/api/v1/tx/{hash}/logs

Get transaction logs

POST
/api/v1/tx/decode

Decode transaction calldata

Security

POST
/api/v1/security/analyze

Analyze contract for vulnerabilities

GET
/api/v1/security/report/{id}

Get security analysis report

GET
/api/v1/security/patterns

Get vulnerability patterns

Gas

GET
/api/v1/gas/price

Get current gas prices

POST
/api/v1/gas/estimate

Estimate gas for transaction

GET
/api/v1/gas/history

Get historical gas prices

Search

GET
/api/v1/search

Search contracts, transactions, addresses

GET
/api/v1/search/contracts

Search verified contracts

GET
/api/v1/search/similar/{address}

Find similar contracts

JavaScript SDK

Use our official SDK for easier integration with TypeScript support.

npm install @getchainlens/sdk
View on GitHub