Logo
New RPC users get 35% off their first monthView the offer
NOWNodes
NOWNodes5 min read

Ankr RPC: What It Is and How to Use It

Ankr RPC is a service that provides access to blockchain nodes via remote procedure calls. This guide explains its features, use cases, and how to get started.

TL;DR

Ankr RPC is a remote procedure call service that allows developers to interact with blockchain networks without running their own nodes. It supports multiple chains and offers both public and private endpoints. This guide covers what Ankr RPC is, how to use it, and factors to consider when choosing an RPC provider.

What is Ankr RPC?

Ankr RPC is a service provided by Ankr that offers remote procedure call (RPC) access to various blockchain networks. It allows developers to read data from and send transactions to blockchains without needing to operate their own nodes.

Ankr provides both public and private RPC endpoints. Public endpoints are available for quick testing and development, while private endpoints offer dedicated resources for production applications.

  • Supports multiple blockchains including Ethereum, BNB Chain, Polygon, and more.
  • Offers public RPC endpoints for free, with rate limits.
  • Provides private endpoints with higher limits and dedicated infrastructure.
  • Can be accessed via HTTP and WebSocket protocols.

How to Use Ankr RPC

To use Ankr RPC, you need to obtain an endpoint URL for the blockchain network you want to interact with. For public endpoints, you can use the URLs provided by Ankr without an API key, though they are rate-limited.

For private endpoints, you typically need to sign up for an Ankr account and generate an API key. The endpoint URL will include your API key, and you can use it in your applications similarly to any other RPC endpoint.

curl -X POST https://rpc.ankr.com/eth \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Ankr RPC vs. Other RPC Providers

When choosing an RPC provider, developers consider factors such as supported networks, reliability, rate limits, and pricing. Ankr is one of several providers in the market, alongside others like Alchemy, Infura, and QuickNode.

Ankr's public endpoints are convenient for testing, but for production use, private endpoints with service level agreements are recommended. Each provider has different strengths, so it's important to evaluate based on your project's needs.

  • Ankr offers a generous free tier with public endpoints.
  • Paid plans provide higher rate limits and dedicated support.
  • Compare features like archive data access, websocket support, and network coverage.

Considerations When Using Ankr RPC

While Ankr RPC is a popular choice, developers should be aware of potential limitations. Public endpoints may have rate limits that can affect performance during high traffic. For mission-critical applications, private endpoints with guaranteed uptime are advisable.

Additionally, as with any third-party service, it's important to review Ankr's terms of service and privacy policy. Always test thoroughly before deploying to production.

  • Public endpoints are rate-limited and not suitable for production.
  • Private endpoints require an API key and may have associated costs.
  • Check the latest documentation for supported networks and features.

Conclusion

Ankr RPC provides a convenient way to access blockchain networks without running your own infrastructure. Whether you're building a decentralized application or simply exploring blockchain data, Ankr's RPC services can be a valuable tool. Remember to choose the right endpoint type for your use case and stay informed about updates to the service.

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started