Skip to content

Build with the record

Retrieve an entity

GET /api/entity-direct — retrieve a public record by nodehash.

Request

Use the nodehash of a record returned by the directory. The handler requires a value beginning with 0x; provide the complete identifier, not a truncated display value.

ts
1
// Replace with the nodehash from your directory result.
2
const nodehash = "0x765b2c72795e0d1f92c8e4fb4954b946a5a6ff4f99701c8971d6ad86a5183001"
3
const url = new URL("https://entity.id/api/entity-direct")
4
url.searchParams.set("nodehash", nodehash)
5
url.searchParams.set("network", "mainnet")
6
7
const response = await fetch(url, {
8
headers: { Accept: "application/json" },
9
signal: AbortSignal.timeout(15_000),
10
})
11
if (!response.ok) throw new Error(`Lookup failed: ${response.status}`)
12
const { data } = await response.json()

Query parameters

  • nodehash — required. The complete 0x-prefixed nodehash.
  • network — optional. mainnet or sepolia. An explicit value restricts the read to that network; without it, the implementation tries mainnet and then Sepolia.

Response

HTTP 200 wraps the public record in a data property. Fields depend on the kind and origin of the record. Do not assume universal standing, verified-member totals, or a single constitution field. This route sends Cache-Control: no-store, max-age=0.

Example response from the public record above, abbreviated to identification fields.

json
1
{
2
"data": {
3
"name": "Example Management B.V.",
4
"entityid": "example-management-bv.nl.entity.id",
5
"nodehash": "0x765b2c72795e0d1f92c8e4fb4954b946a5a6ff4f99701c8971d6ad86a5183001",
6
"registrar": "nl",
7
"source": "GLEIF"
8
}
9
}

Errors

  • 400 — Missing or invalid nodehash, or Unknown network.
  • 404 — Entity not found. The response contains data: null and an error message.
  • 500 — The record could not be read. Treat this as an unavailable lookup.

Verification decisions

A successful read means the route found a record. It is not an approval decision. Evaluate the specific evidence you need, record the network and lookup time, and handle absent or stale information explicitly.

Built around the current Entity.ID app.Questions or feedback? ↗