> ## Documentation Index
> Fetch the complete documentation index at: https://hexagraph-docs.voyla.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Hexagraph HX_ID System: Format, Resolution, and Usage

> Hexagraph uses HX_ID prefixed identifiers for all scholarly entities. Learn how to construct, resolve, and use these IDs across REST and GraphQL endpoints.

Hexagraph standardizes all entity identifiers with the `HX_` prefix, used for cataloging entities. Every entity — works, authors, sources, institutions, publishers, and funders — has a unique HX\_ID that you use consistently across REST and GraphQL requests. Whether you're fetching a single record, building a relational query, or resolving an unknown entity type, the HX\_ID is your single, reliable key.

***

## ID Format

HX\_IDs follow a simple structure: `HX_` followed by an entity-type code letter and a numeric identifier.

```
HX_[EntityTypeCode][Number]

Examples:
  HX_W2107277218     ← a Work (output)
  HX_A5086208034     ← an Author
```

The entity-type code embedded in the ID tells you — and the API — exactly what kind of entity you're referencing:

| Prefix | Entity Type     | Example          |
| ------ | --------------- | ---------------- |
| `HX_W` | Works (Outputs) | `HX_W2107277218` |
| `HX_A` | Authors         | `HX_A5086208034` |
| `HX_S` | Sources         | `HX_S137773608`  |
| `HX_I` | Institutions    | `HX_I1290206310` |
| `HX_P` | Publishers      | `HX_P4310320595` |
| `HX_F` | Funders         | `HX_F4320306076` |

***

## Using IDs in REST Requests

Pass the full HX\_ID as the path parameter on the appropriate entity endpoint:

```bash theme={null}
# Fetch a specific output (scholarly work)
curl https://api.hexagraph.in/outputs/HX_W2107277218

# Fetch a specific author
curl https://api.hexagraph.in/authors/HX_A5086208034

# Fetch a specific source (journal or repository)
curl https://api.hexagraph.in/sources/HX_S137773608

# Fetch a specific institution
curl https://api.hexagraph.in/institutions/HX_I1290206310

# Fetch a specific publisher
curl https://api.hexagraph.in/publishers/HX_P4310320595

# Fetch a specific funder
curl https://api.hexagraph.in/funders/HX_F4320306076
```

***

## Entity Endpoints & GraphQL Lookups

Pass the HX\_ID directly to the corresponding entity REST endpoint (e.g. `GET /outputs/HX_W3038568908`, `GET /authors/HX_A5028125522`) or query it via GraphQL.

***

## Using IDs in GraphQL

Pass the HX\_ID as the `id` argument in any entity query:

```graphql theme={null}
query {
  output(id: "HX_W2107277218") {
    id
    title
    doi
    year
    citations
    authors {
      id
      name
    }
  }

  author(id: "HX_A5086208034") {
    id
    name
    orcid
    outputs_count
  }
}
```

GraphQL lets you resolve multiple entities — even of different types — in a single request, which is especially efficient when you already have a set of known IDs to look up.

<Note>
  HX\_IDs are **case-sensitive** and must include the full `HX_` prefix in all requests. Using a bare numeric ID or the wrong prefix will result in a `404 Not Found` response.
</Note>
