{"uid":"cap_TKXs0xTnPHDr_SIl10ASj","slug":"onesource-ethereum-chain-id-lookup-955334b5","name":"OneSource Ethereum Chain ID Lookup","description":"Ethereum chain ID (EIP-155) via eth_chainId - confirm which chain a network is on","url":"https://api.onesource.io/api/chain/chain-id","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"network":{"enum":["ethereum","sepolia","robinhood"],"type":"string","default":"ethereum"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"result":{"type":"string"}},"description":"Endpoint-specific response payload"},"meta":{"type":"object","required":["endpoint","request_id"],"properties":{"endpoint":{"type":"string"},"cost_usdc":{"type":"string"},"request_id":{"type":"string"},"payment_chain":{"type":"string"},"payment_token":{"type":"string"}}},"error":{"type":["object","null"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}}}}},"responseSchema":{"type":"json","example":{"data":{"result":"0x1"},"meta":{"endpoint":"/api/chain/chain-id","cost_usdc":"0.001","request_id":"00000000abcdef01","payment_chain":"base","payment_token":"USDC"}}},"example":{"request":{"network":"ethereum"},"response":{"data":{"result":"0x1"},"meta":{"endpoint":"/api/chain/chain-id","request_id":"96538a84c381cab0"}}},"exampleRequest":{"network":"ethereum"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Gt2ln9_0zkejlMUYP36ah","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the EIP-155 chain ID for Ethereum mainnet or Sepolia testnet via eth_chainId RPC call","exampleAgentPrompt":"What is the EIP-155 chain ID for the Ethereum mainnet? I need to confirm the network before signing a transaction.","exampleUseCases":null,"resultDescription":"Returns the numeric EIP-155 chain ID for the requested network (e.g. 1 for Ethereum mainnet, 11155111 for Sepolia), confirming which chain the node is operating on.","failureModes":["Invalid network enum value returns validation error","Network parameter missing defaults to ethereum mainnet","Service unavailability returns 5xx error","Payment failure (x402) blocks the request if USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need to programmatically confirm or retrieve the EIP-155 chain ID for Ethereum mainnet or Sepolia testnet before signing transactions, configuring wallets, or validating network context. Prefer this over manual lookup when building automated Ethereum workflows that must confirm chain identity at runtime.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:51:32.319Z","isFirstParty":false}