GraphQL Endpoint Extractor avatar

GraphQL Endpoint Extractor

Pricing

from $0.35 / 1,000 records

Go to Apify Store
GraphQL Endpoint Extractor

GraphQL Endpoint Extractor

Point at ANY GraphQL endpoint: send a raw query (+ optional variables & headers) and flatten the chosen data path into dataset rows plus a lossless raw object — or introspect the schema to discover its types. Works with public or token-gated GraphQL APIs. Pay per record.

Pricing

from $0.35 / 1,000 records

Rating

0.0

(0)

Developer

Datamule

Datamule

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

24 days ago

Last modified

Categories

Share

A generic "point at any GraphQL endpoint" scraper. There are plenty of instance-specific GraphQL scrapers on the Store, but no generic runner that turns an arbitrary GraphQL API into a dataset. Give this actor an endpoint URL and a raw GraphQL query (plus optional variables and headers), tell it which part of the response to turn into rows, and it flattens the result into clean dataset rows plus a lossless raw object — or introspect the schema to discover what an endpoint exposes.

Typical job: pull one list out of a GraphQL API (products, characters, repos, countries) into a table you can download as CSV/JSON, without writing client code.

Quick start

  1. Click Try for free (or open the ready-made example). The form is already filled with this input:

    {
    "endpoint": "https://rickandmortyapi.com/graphql",
    "query": "{ characters { results { id name status species } } }",
    "dataPath": "data.characters.results",
    "maxRecords": 5,
    "introspect": false
    }
  2. Click Start. The run takes a few seconds and returns 5 rows.

  3. Open the Output tab and export CSV, JSON or Excel.

  4. For your own API, replace endpoint, query and dataPath. If you don't know the schema yet, run once with "introspect": true to list its types first.

What the output looks like

Real rows from an owner cloud run of the input above (run of build 0.1.2, 5 rows, 5 record events). The raw column is omitted here; it holds the same element untouched.

_indexidnamestatusspecies_dataPath
01Rick SanchezAliveHumandata.characters.results
12Morty SmithAliveHumandata.characters.results
23Summer SmithAliveHumandata.characters.results
34Beth SmithAliveHumandata.characters.results
45Jerry SmithAliveHumandata.characters.results

Columns other than the _ meta fields depend on your query, so every API gives a different table.

Cost of the quick start: 5 records × $0.0005 (free tier) = about $0.0025 plus a small platform usage charge. Higher Apify plans pay less per record, down to $0.00025.

Limits: one query per run; no automatic pagination (see below); the endpoint must accept a standard GraphQL POST. Results only reflect what that endpoint returns at run time.

What it does

  • Run any query — send a raw GraphQL query (with optional variables) to any endpoint. The { data, errors } envelope is handled for you: a pure-error response logs the errors and returns 0 records (no crash); a partial response keeps the data and notes the error count.
  • Pick your rows — set dataPath (a dot-path from the response root, e.g. data.characters.results or data.countries) to select the array to flatten. Leave it empty and the actor auto-detects the first array under data; if there is no array, the whole data object is emitted as one row.
  • Introspect — turn on Introspect schema to run the standard introspection query and get one row per schema type (name, kind, description, field count), so you can explore an unfamiliar endpoint before writing a query.
  • Flat + raw — each element's scalar properties are spread to columns; the untouched element is kept in raw, so nothing is lost even though every schema is different.

Example inputs

Rick and Morty characters (public, no auth) — nested array:

{ "endpoint": "https://rickandmortyapi.com/graphql", "query": "{ characters { results { id name status species } } }", "dataPath": "data.characters.results" }

Trevorblades countries (public, no auth) — direct array, auto-detected:

{ "endpoint": "https://countries.trevorblades.com/graphql", "query": "{ countries { code name capital currency } }" }

Parameterized query with variables:

{ "endpoint": "https://rickandmortyapi.com/graphql", "query": "query($page:Int){ characters(page:$page){ results { id name } } }", "variables": { "page": 2 }, "dataPath": "data.characters.results" }

Discover the schema:

{ "endpoint": "https://countries.trevorblades.com/graphql", "introspect": true }

Pagination

GraphQL has no single pagination standard — cursor (Relay edges/pageInfo), offset, and page-number schemes all differ per API. This is an honest single-query runner: pass your page arguments directly in the query + variables (e.g. characters(page: $page) or search(first: 100, after: $cursor)), run it per page, and use Max records to cap rows.

Authentication

None required for public endpoints. For gated APIs, put your credentials in Request headers, e.g. { "Authorization": "Bearer <token>" } — header values are never logged.

Output

One dataset item per selected element, with fixed meta columns:

  • _endpoint — the queried endpoint.
  • _dataPath — the resolved path the rows came from.
  • _index — the row's position in the selected array.
  • _errors — number of GraphQL errors on a partial response (null when none).
  • …plus every property of the element as its own column, and raw = the complete original object.

In Introspect mode each row is a schema type: name, kind, description, fieldCount, raw.

A query that matches nothing (or a pure-error response) returns 0 items, not an error.

Pricing

Pay per record — you're charged one record event per row returned. A query that returns nothing costs nothing.

Notes

  • Single POST per run (or two implicit for introspection). Handles GraphQL errors returned with either HTTP 200 or HTTP 400.
  • Not affiliated with or endorsed by the GraphQL Foundation or any target API.