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/

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.