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

1

Monthly active users

a day 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.

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.