Skip to main content
Hexagraph provides a code-first GraphQL API at https://api.hexagraph.in/graphql. The same URL serves an interactive Apollo playground for exploring the schema and running queries directly in your browser — no setup or authentication required.

Interactive Playground

Visit https://api.hexagraph.in/graphql in your browser to open the Apollo Sandbox playground. From there you can:
  • Write and execute GraphQL queries against live data
  • Browse every available type, field, and argument via the Docs panel on the right
  • Inspect full response payloads alongside your queries
  • Copy queries directly into your application code once you’ve validated them
No API key or login is needed — just open the URL and start querying.

Endpoint

All GraphQL requests are sent as HTTP POST to a single endpoint: Queries are delivered in the request body as a JSON object with a query key:

Sending Queries

Use any HTTP client to send queries programmatically. Here’s a minimal curl example that fetches a work by its HX_W identifier:
For multi-line or complex queries, consider using a dedicated GraphQL client library (e.g. graphql-request for Node.js, gql + httpx for Python) which handles escaping and query formatting automatically.

Available Query Types

Hexagraph exposes three top-level queries: Full argument and field documentation for each query is available on the Queries reference page.

When to Use GraphQL vs REST

Choose GraphQL when:
  • You need data from multiple entity types (e.g. a work and its authors) in a single network round-trip
  • You want to select only the fields your application needs, reducing payload size and over-fetching
  • You’re building a new integration and want to explore the schema interactively before writing code
Choose REST when:
  • You need simple, easily cacheable GET requests at the HTTP layer
  • You’re running high-volume queries against a single, well-known endpoint and don’t need field selection

Rate Limits

The same rate limits apply to all GraphQL requests: A single GraphQL query that fetches multiple entities — for example, one output and one author in the same request body — counts as one request against both limits.
Batching multiple lookups into a single GraphQL query is the most efficient way to stay within rate limits. Instead of sending separate requests for each entity, combine them into one query and fetch everything you need in a single round-trip. See Batching Multiple Queries for an example.