Download a lookup table

Download a whole lookup table as CSV or NDJSON, ready to load into a spreadsheet or database.

get
/lookups/{lookup-id}

Good to know

  • This response isn't wrapped in the usual envelope: it's the table itself.
  • lookup-idstringrequired

    A lookup id from GET /v1/lookups, such as areas-ward-2024-12-uk-bgc.

  • formatstringoptional

    The representation to download. Both are rendered from the same artifact and hashed in the lookup manifest.

    One ofcsvndjson
    Defaultcsv

Returns

string

The whole lookup table.

Header Content-Disposition

Suggested filename, the lookup id with the format's extension.

  • 400A query parameter is malformed or its cursor is not valid for this result set.
  • 404No resource matches that identity.
  • 503The referenced build artifact has not been built yet.

Every error has the same shape. See Errors for how to handle them.

Show the precise behaviour

Renders the lookup from its source artifact and returns it only if the bytes match the hash its manifest lists for the format. In CSV a list column is joined with " | " and a cell is quoted only when it holds a comma, quote or line break; in NDJSON each line is one row with every column, lists as arrays and empty values as null. This response is intentionally not wrapped in the usual API envelope.