Indexer
API

Building a Query

There are many ways to query a GraphQL endpoint depending on your intended use. Popular choices include the lightweight Node package graphql-request (opens in a new tab) or the manual Postman (opens in a new tab).

Point to the provided GraphQL endpoint (opens in a new tab) . Visiting this endpoint in a web browser should yield an error. You are expected to make POST HTTP requests.

It is recommended to use GraphiQL (opens in a new tab) in parallel during development, speeding up model and query exploration. As mentioned in Data, the most common models involve project, round, and application.

IDs

The most common identifying parameters are:

Tip: if you're able to find a round or application in the Gitcoin Explorer (opens in a new tab), the URL will be of the format /#/round/chainId/roundId/[application id]

Not all models will use all three id types. For example, the rounds model only requires a chainId and will return rounds on the provided chain.

Return data

The return parameters will depend on the model used. Due to the connected nature of the data types, entire models can be found nested within others. One could query an individual application, or find it inside a round.

It is best practice to use the lightest model possible for a query. If the chain, round, and application are all known, then the singular application query would be the fastest.

Example

The below applications query made in Postman will read out the application id, project name, and the number of unique donors for all applications to a given round. The round was the dApps & Apps (opens in a new tab) round of GG20. The round URL reveals roundId: "25", and it took place on Arbitrum (chainId: 42161).

Data Models