Advanced API Announcement

Kevin Dwyer

Kevin Dwyer

November 1, 2022

6 min read

Out of Beta and into a new era of multichain development powering Web3 devs with purpose-built APIs.

Ankr_s_Advanced_AP_Is_30e0082278.jpg

Powerful Multichain APIs Built By Devs, For Devs

Ankr’s Advanced API service is a collection of RPC methods that were created to simplify querying blockchain data of all types. Advanced APIs help you build on Web3 in the most efficient way possible so you can:

  • Make fewer RPC requests
  • Spend less per request
  • Query multiple blockchains at once
  • Make your multichain dApps many times faster

Why Advanced APIs? What Do They Do?

Ankr’s RPC service connects dApps and wallets to blockchain nodes so they can find all the necessary information they need to complete tasks like transactions or checking account balances. Every Web3 use case requires access to full nodes via an RPC service (unless they choose to run all their own nodes).

For example, when users access dApps or use a wallet like MetaMask to make transactions, their requests go through an RPC to connect them with the full nodes that hold the data from blockchains and send new transactions to the mempool where they await validation so they can be added to the chain. Every time this happens, the operators of these applications need to pay a small fee for the RPC service.

But now, Ankr’s Advanced APIs streamline this process by making the blockchain data you need easier, faster, and more cost-efficient to retrieve. The Advanced APIs take blockchain data and optimize, index, cache, and store it to make it readily accessible for all of the most popular types of incoming requests across 8 different chains. This all has the end result of letting apps connected to the Advanced APIs provide a much faster and more efficient experience.

Advanced APIs Now Integrated With Ankr’s RPC Service

0_q_Kb_W2h_M_Ln_Gc_Gwy2_M_b30736d1eb.png

The Advanced API is now easily accessible and integrated with the rest of Ankr’s RPC services. You will see it as the first option in the top left corner of the interface. By using the endpoint https://rpc.ankr.com/multichain to query within your project’s code, you can give it access to a vast array of multi-chain data accessible at near-instant speeds by using the different methods below. We believe this service will become a single point of reference for multichain requests to create faster Web3 ecosystems.

Supporting a Growing Variety of Blockchains

Currently, Advanced APIs work with the following 8 EVM-compatible chains: 0_cTGIaMZftAMXXpa1.png

The Ankr team will continuously add support for an expanding number of both EVM and non-EVM blockchains. This will make the Advanced APIs a tool that becomes increasingly powerful every month.

Advanced API Methods

Ankr currently has three powerful Advanced APIs: NFT, Query, and Token. Below, you can explore each one of these APIs and how they work.

NFT API: Pull NFT Data Across Web3

Projects that integrate NFTs, like virtual worlds, decentralized games, galleries, marketplaces, and others, often need to pull data across a breadth of collections on different chains, which can be a challenge. Ankr’s NFT API makes it simple. The API makes it easy to find the details about which collection an NFT belongs to, when it was minted, its past transaction history, who currently owns it, and much more.

The API can request NFT-related data (owners, listings for particular wallet addresses, collections, time it’s been minted, transaction history, and other metadata) across several EVM-compatible chains at once with a single request.

Easily query NFT data across virtual worlds, games, chains, galleries, marketplaces, and more with the following methods:

  • ankr_getNFTsByOwner — Retrieves account-associated NFTs.
  • ankr_getNFTMetadata — Retrieves metadata of a particular NFT.
  • ankr_getNFTHolders — Retrieves holders of a particular NFT.

Query API: Near-Instant Blockchain Data Retrieval

Query API is an access-ready solution that enables your projects to interact with multiple blockchains in a single request. By indexing blockchain data from all eight currently supported chains, searching through large amounts of data is easier and faster than ever before. Query API has almost instantaneous processing speeds (thanks to new key-value filtering) for searches that might ordinarily take hours to process. Query API serves to request info on the ranges of blocks (max range is 100) for a full list of block metadata.

Search a wide range of blocks across chains and get nearly instant results for addresses, events, block ranges, logs & other stats by using:

  • ankr_getBlocks — Retrieves full info of a particular block.
  • ankr_getLogs — Retrieves history data of a particular block range.
  • ankr_getTransactionsByHash — Retrieves the details of a transaction specified by hash.
  • ankr_getInteractions — Retrieves blockchains interacted with a particular wallet.

Token API: Token Data at Your Fingertips

Ankr’s Token API helps deliver information about tokens on any of the currently supported chains. The Token API allows developers to query things like account balances, how many currencies exist on a given blockchain, how many token holders a given currency has, and a token’s current value.

Notably, our Token API only uses on-chain data, leaving third parties and inaccuracies behind. Ankr constantly scans for on-chain transactions coming from DEXs — flagging transactions and aggregating data into accurate token price feeds in real-time. These tools are crucial for Web3 projects like marketplaces and exchanges looking for efficient ways to query accurate, on-chain data for tokenized assets.

Query data for balances, currencies, token holders, and prices across blockchains with the following methods:

  • ankr_getAccountBalance — Retrieves the balance of a particular account.
  • ankr_getCurrencies — Retrieves a list of currencies used on a particular blockchain.
  • ankr_getTokenPrice — Retrieves the price of a particular token.
  • ankr_getTokenHolders — Retrieves info on holders of a particular token.
  • ankr_getTokenHoldersCount — Retrieves the number of token holders.

See What You Can Build With Advanced APIs In Our Developer Guides

See all tutorials on Ankr’s Hashnode.

If you aren’t sure how to implement Advanced APIs in your project or need some inspiration, we have you covered! Check out Ankr’s Hashnode for tutorials to build innovative projects using Advanced APIs.

Need more instructions? Head to our Developer Docs and get up to speed with in-depth instructions.

Get Started Building Today With the Advanced API SDK

If you’re ready to power your dApps with the most efficient developer tools available, download the Ankr.js Advanced API SDK today to get started. This compact SDK is made for interacting with Ankr’s Advanced APIs — serving as a javascript library that wraps all these API endpoints into easy-to-use JS code.

Head to the Advanced APIs section of our docs to see more, or start building right away with the SDK!

Power Your dApps With Advanced API React Hooks

Want to power your projects with Advanced APIs? Use our React hooks to fetch multichain data fast and populate your app with accurate and trusted information.