Docs
Search⌘ K
  • Home
  • About The Graph
  • Supported Networks
  • Protocol Contracts
  • Subgraphs
    • Substreams
      • Token API
        • Indexing
          • Resources
            Subgraphs > Querying

            2 minutes

            How to Query a Subgraph Using The Graph

            To start querying right away, visit Graph Explorer. This guide shows you how to find a Subgraph, generate a unique URL, and run queries.

            Overview

            Querying a Subgraph with The Graph lets you access onchain data in a fast, reliable, and structured way, without running your own indexing infrastructure. This guide shows you how to get started so you can power your dapp or analysis with blockchain data.

            Steps

            Step 1: Locate Your Subgraph

            After a Subgraph is published to The Graph Network, you can visit its Subgraph details page on Graph Explorer.

            Step 2: Retrieve the Query URL

            On the Subgraph details page, click Query (top right) or scroll down. Each Subgraph published to The Graph Network has a unique query URL in Graph Explorer to make direct queries.

            Query Subgraph Button
            Query Subgraph URL

            Please see the Query API for a complete reference on how to query the Subgraph’s entities.

            Step 3: Manage Your API Key

            Each query URL requires a valid API key. In Subgraph Studio, locate the API Keys section to create or manage your keys. Learn more about how to use Subgraph Studio here.

            Step 4: Check Your Usage Plan

            Subgraph Studio users start on a Free Plan, which allows them to make 100,000 queries per month. Additional queries are available on the Growth Plan, which offers usage based pricing for additional queries, payable by credit card, or GRT on Arbitrum. You can learn more about billing here.

            Handling Errors

            If you encounter 405 errors with a GET request to the Graph Explorer URL, please switch to a POST request instead.

            Additional Resources

            • Use GraphQL querying best practices.
            • To query from an application, click here.
            • View querying examples⁠.
            ⁠Edit on GitHub⁠

            Graph ExplorerHow to Manage API keys
            On this page
            • Overview
            • Steps
            • Step 1: Locate Your Subgraph
            • Step 2: Retrieve the Query URL
            • Step 3: Manage Your API Key
            • Step 4: Check Your Usage Plan
            • Handling Errors
            • Additional Resources
            The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service