Polygon
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Polygon
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
TheRPC is a fast, reliable JSON-RPC provider for Polygon PoS and many other chains, giving you a single authenticated endpoint instead of running and syncing your own Bor node. Polygon developers use it to ship dApps, indexers, bots, and backends that read and write to chain ID 137 with low latency — handling the ~2-second blocks and high transaction volume of QuickSwap, Aave, and the network's heavy stablecoin traffic. This guide takes you from zero to a working eth_blockNumber response in just a few minutes: get a key, point at the Polygon endpoint, and make your first call.
Head to TheRPC.io and create a free account. Once you are signed in, open the Dashboard and go to the API Keys section, where you can generate a new key or copy an existing one. The key is a single secret string that authenticates all your traffic — you will append it to the Polygon endpoint URL and also send it in the Authorization header on every request to polygon.therpc.io.
TheRPC serves many networks from one account, each at its own hostname. For Polygon PoS mainnet (chain ID 137) the endpoint is https://polygon.therpc.io/YOUR_API_KEY. Set it up by storing the endpoint URL and your API key in environment variables, as shown below, so the rest of your code can reference them without hardcoding secrets.
Now make your first call to Polygon. The examples below show the same eth_blockNumber request three ways — curl, JavaScript, and Python — so you can start in whichever language fits your stack. For more languages and frameworks, see the full Tools & SDKs reference.
For anything beyond simple reads, a Web3 library is the better path than hand-rolling raw HTTP calls. Libraries like web3.js and web3.py handle ABI encoding, hex-to-decimal conversion, transaction signing, and event decoding for you — exactly what you need when interacting with Polygon contracts such as QuickSwap pools or Aave markets. See the Tools & SDKs documentation for full, language-specific coverage.
The complete list of Polygon methods lives on the All Methods page, organized by namespace (eth_, debug_, trace_, net_, txpool_, web3_). Each method has its own reference page with a description, request and response formats, ready-to-run code examples, Compute Unit cost, and real-world use cases tuned for chain ID 137.
Each network TheRPC supports has its own dedicated endpoint hostname, so you select a chain simply by choosing its URL. For Polygon PoS mainnet, that endpoint is https://polygon.therpc.io/YOUR_API_KEY — swap in your key and you are talking to chain ID 137.
Bearer header.