Table of contents

Quick start guide

Find the base URL for a register

Find the base URL for a register on its API inspector. For example, the API inspector for the local-authority-eng register is located at https://local-authority-eng.register.gov.uk/.

The following are some examples of base URLs:

 
Register ID Base URL
local-authority-eng https://local-authority-eng.register.gov.uk/
country https://country.register.gov.uk/
allergen https://allergen.register.gov.uk/
 

Append the current version of the API

The current version of the API is v1.

You should add the version of the API you want to use to the end of the base URL. This step is optional for version 1 of the API and will become required when version 1 is no longer supported.

For example, the full base URL for v1 of the local-authority-eng register is https://local-authority-eng.register.gov.uk/v1/.

See version history for the full list of versions.

Choose an endpoint

You can use endpoints as described in the API reference section.

Choose a response format

Choose a response format by adding the appropriate suffix to the request URL:

 
Format Suffix Media type
JSON .json application/json
CSV .csv text/csv
 

For example:

curl https://country.register.gov.uk/records/GB.json

You can also specify a format by making a request with the Accept header. For example:

curl https://country.register.gov.uk/records/GB --header 'Accept: application/json'

Pagination

API calls on resource collections are paginated. Follow the specific guidance for each endpoint to get the page(s) of entries and records you need. For example, to paginate the records’ collection use page-size to define the amount of elements you want per page and page-index to define the page you want to get. The maximum page-size is 5000.