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_KEYGet your API key from the Settings page
Contracts
GET
/api/v1/contracts/{address}Get contract details and ABI
GET
/api/v1/contracts/{address}/sourceGet verified source code
POST
/api/v1/contracts/verifyVerify contract source code
GET
/api/v1/contracts/{address}/eventsGet contract events
Transactions
GET
/api/v1/tx/{hash}Get transaction details
GET
/api/v1/tx/{hash}/traceGet transaction trace
GET
/api/v1/tx/{hash}/logsGet transaction logs
POST
/api/v1/tx/decodeDecode transaction calldata
Security
POST
/api/v1/security/analyzeAnalyze contract for vulnerabilities
GET
/api/v1/security/report/{id}Get security analysis report
GET
/api/v1/security/patternsGet vulnerability patterns
Gas
GET
/api/v1/gas/priceGet current gas prices
POST
/api/v1/gas/estimateEstimate gas for transaction
GET
/api/v1/gas/historyGet historical gas prices
Search
GET
/api/v1/searchSearch contracts, transactions, addresses
GET
/api/v1/search/contractsSearch 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/sdkView on GitHub