Skip to content

Capture GraphQL queries with Chrome DevTools

Using Chrome DevTools, you can capture the queries running behind the Cloudflare Dashboard analytics. In this example, we will focus on the Network Analytics dataset, but the same process can be applied to any other analytics available in your dashboard.

  1. Log in to the Cloudflare dashboard and select your account.
  2. Go to Analytics & Logs and select the Network Analytics dashboard or any other analytics dashboard you are interested in seeing the GraphQL queries in.

Analytics tab

  1. Open the Chrome Developer Tools and select Inspect.

Chrome developer tools

  1. Select the Network tab in the Developer Tools panel.
  2. In the filter bar, type graphql to filter out the GraphQL requests. If no requests appear, try reloading the page. As the page reloads, several network requests will populate the Network tab. Look for requests that contain graphql in the name.

Type graphql in the search field

  1. Select one of the GraphQL requests to open its details and go to the Payload tab. There you will find the GraphQL query. Select the query line and then Copy value to capture the query.

Copy query value

  1. If you want to capture a new query, adjust the filters in the Network analytics dashboard and a new query will appear in the GraphQL requests.

Create a new query

You can now use this query as the basis for your API call. Refer to the Get started section for more information.