🔃Getting started with an API project
Learn how to create new API projects in the OS Data Hub; find your API Key, secret & endpoint address(es); regenerate an API Key; delete an API project; remove APIs from projects, & monitor API usage.
To access any of the OS APIs, you need an API Key and / or an API secret token. These credentials are scoped to a dedicated API project that is linked to your OS Data Hub account. You can find your API projects and project API Keys in the API Projects page in the OS Data Hub, where you can fully manage all aspects of your OS APIs.
🆕 Step-by-step video guide for getting started with API projects
The following short video runs you through how to:
Find out what OS APIs you have access to
Create a new API project and add APIs to it
Find an API Key, API secret and API endpoint address
Regenerate an API Key
Remove an API from a project
Delete an API project
Monitor API usage
Step-by-step listed instructions for getting started with API projects
The following step-by step listed instructions will run you through how to:
🆕 Finding out what OS APIs you have access to
To find out what OS APIs you / your organisation has access to under your current plan:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Creating a new API project and adding APIs to it
Before you can access the OS APIs, you need to add at least one API to a new or existing project in the OS Data Hub and generate an API Key.
To create a new API project, add an API (or multiple APIs) to it and generate an API Key:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Add an API or multiple APIs to your new API project
In the dedicated project page that appears, click the + Add an API to this project button.

In the Add API to this project dialog, find the API you want to add from the list (either scroll down the list of available APIs or enter the API name in the search bar), then click the Add to project button. (You can add multiple new APIs to the project in this dialog if you wish.)
Click Done to close the dialog.

The API(s) will now appear in your project.
View your API Key, secret and endpoint address/es
The <Project Name> page opens and displays:
The project API Key (for example, _GCk3L4TFnuKwcwG1PMJBtOyuipu6MOlV)
The project API secret (for example, _zi7Vbor5f8i2ZTMs)
A list of the APIs in your project
Other API-specific information (for example, the API endpoint address for each API in your project)

You can return to this page at any point in the future by opening API Projects in the secondary navigation menu, then clicking on the name of the project. This is handy if you need to copy your Project API Key or API endpoint address/es, or if you need to regenerate your API Key.
Adding an API to an existing API project
Before you can access the OS APIs, you need to add at least one API to a new or existing project in the OS Data Hub and generate an API Key.
To add a new API to an existing API project:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Add a new API to the existing API project
Click + Add API.

In the Add API to this project dialog, find the API you want to add from the list (either scroll down the list of available APIs or enter the API name in the search bar), then click Add to project. (You can add multiple new APIs to the project in this dialog if you wish.)
Click Done to close the dialog.

The API will be added to your project and you'll be able to use the same project API Key.
Finding an API endpoint address
To find the API endpoint address for an API in one of your API projects:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Look up the API endpoint address
The API endpoint address(es) will be displayed in this dedicated project page. If a project uses multiple OS APIs, then each one will have its own API endpoint address.

You will also find the API Key and secret for the project on the dedicated project page.
Regenerating an API Key
Notes on regenerating an API Key
You might want to regenerate an API Key for a project if you've mistakenly shared the key with someone who shouldn't have access to the API data or if someone still has access to a project but they've left your organisation.
Regenerating an API Key for a project creates a new API Key for the project and makes the old key unusable.
After regenerating an API Key for a project, you'll need to update any applications or connected software to use the new key in order for them to continue working.
You'll still be able to see historical usage statistics for the project from before you regenerated API Key.
To regenerate an API Key for one of your projects:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Removing an API from a project
To remove an API from a project:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Remove an API from the project
Click the Remove from project button for the specific API you wish to remove.

In the Remove <API name> from project dialog that appears, click the Remove API from project button to confirm the removal.

The API will automatically be removed from your project.
Deleting an API project
To delete one of your API projects:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

Delete the API project
Click Actions > Delete this project.

Enter the one-time code to confirm your action, then click Permanently remove project.

The project will be deleted from your API Dashboard.
🆕 Monitoring API usage
To monitor API usage:
Log into your OS Data Hub account
Click Log in on the OS Data Hub menu bar to log into your account.

View your API Dashboard
Select APIs > API Dashboard.
Here you will be able to see the total API usage for your organisation over the last month, split into usage for OS OpenData and OS Premium data – the latter will show as Public Sector data if you are a Public Sector Geospatial Agreement (PSGA) Member. OS OpenData Plan users will just see their OpenData usage.

View your API transaction history
Select APIs > API Transaction History.

Here you will be able to dig into usage for specific APIs over time and by project. You can filter by API project, API name, and time (week, month or year).
What's an API transaction?
API transactions are how we measure and charge for the use of our APIs. What counts as one API transaction depends on the data format. Raster and vector transactions are measured in map views. Others are measured as feature requests.
For more information and a table outlining transaction rates for each OS API, please see the 'What's an API transaction?' FAQ on the OS Data Hub.
Last updated
Was this helpful?




