Polymarket Subgraph on Graph Explorer

You can see an interactive query playground on the Polymarket Subgraph’s page on The Graph Explorer, where you can test any query.

Polymarket Playground

How to use the Visual Query Editor

The visual query editor helps you test sample queries from your Subgraph.

You can use the GraphiQL Explorer to compose your GraphQL queries by clicking on the fields you want.

Example Query: Get the top 5 highest payouts from Polymarket


Example output


Polymarket’s GraphQL Schema

The schema for this Subgraph is defined here in Polymarket’s GitHub⁠.

Polymarket Subgraph Endpoint

https://gateway.thegraph.com/api/{api-key}/subgraphs/id/Bx1W4S7kDVxs9gC3s2G6DS8kdNBJNVhMviCtin2DiBp⁠

The Polymarket Subgraph endpoint is available on Graph Explorer.

Polymarket Endpoint

How to Get your own API Key

  1. Go to https://thegraph.com/studio and connect your wallet
  2. Go to https://thegraph.com/studio/apikeys/ to create an API key

You can use this API key on any Subgraph in Graph Explorer, and it’s not limited to just Polymarket.

100k queries per month are free which is perfect for your side project!

Additional Polymarket Subgraphs

How to Query with the API

You can pass any GraphQL query to the Polymarket endpoint and receive data in json format.

This following code example will return the exact same output as above.

Sample Code from node.js


Additional resources

For more information about querying data from your Subgraph, read more here.

To explore all the ways you can optimize & customize your Subgraph for a better performance, read more about creating a Subgraph here.