# Download an OpenData product

{% hint style="warning" %}

### API test authentication

The Open API block allows you to test OS APIs directly from the page with example data and parameters. To use this feature, you will need to add your API Key or OAuth2 token to the authentication field.

For help generating an API Key or OAuth2 token, please see the [Getting started with an API project](https://docs.os.uk/os-apis/core-concepts/getting-started-with-an-api-project) or [OAuth2 documentation](https://docs.os.uk/os-apis/accessing-os-apis/oauth-2-api).
{% endhint %}

## GET /products/{productId}/downloads

> Returns a list of downloads for a specific OpenData product, or redirects to the actual download if requested.

```json
{"openapi":"3.0.0","info":{"title":"Ordnance Survey Download API","version":"1.0.0"},"tags":[{"name":"OpenData","description":"Operations providing access to OpenData products."}],"servers":[{"url":"https://api.os.uk/downloads/v1/"}],"paths":{"/products/{productId}/downloads":{"get":{"summary":"Returns a list of downloads for a specific OpenData product, or redirects to the actual download if requested.","tags":["OpenData"],"parameters":[{"in":"path","name":"productId","schema":{"type":"string"},"required":true,"description":"The id of the product."},{"in":"query","name":"fileName","schema":{"type":"string"},"description":"Filter the list of downloads to only include those with this file name."},{"in":"query","name":"format","schema":{"type":"string"},"description":"Filter the list of downloads to only include those with this format."},{"in":"query","name":"subformat","schema":{"type":"string"},"description":"Filter the list of downloads to only include those with this subformat."},{"in":"query","name":"area","schema":{"$ref":"#/components/schemas/Area"},"description":"Filter the list of downloads to only include those which cover this area."},{"in":"query","name":"redirect","schema":{"type":"boolean"},"allowEmptyValue":true,"description":"When included, if the selected downloads list contains exactly one download, redirect to the download location."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDownload"}}}}},"307":{"description":"Returned when the 'redirect' parameter was supplied, and there was exactly one matching download.","headers":{"Location":{"schema":{"type":"string"},"description":"Direct URL for the download file."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDownload"}}}},"404":{"$ref":"#/components/responses/NotFoundError"}}}}},"components":{"schemas":{"Area":{"type":"string","description":"This describes the geographical area that a download covers.\nGB is all of Great Britain, while codes like 'HP' cover National Grid Reference squares.\n","enum":["GB","HP","HT","HU","HW","HX","HY","HZ","NA","NB","NC","ND","NF","NG","NH","NJ","NK","NL","NM","NN","NO","NR","NS","NT","NU","NW","NX","NY","NZ","OV","SD","SE","TA","SH","SJ","SK","TF","TG","SM","SN","SO","SP","TL","TM","SR","SS","ST","SU","TQ","TR","SV","SW","SX","SY","SZ","TV"]},"ProductDownload":{"description":"Information about a specific OpenData file that is made available through this API.\n","allOf":[{"$ref":"#/components/schemas/Download"},{"type":"object","required":["area","format"],"properties":{"area":{"$ref":"#/components/schemas/Area"},"format":{"description":"This describes the format of the data.","type":"string"},"subformat":{"description":"This describes the subformat of the data.","type":"string"}}}]},"Download":{"type":"object","description":"Information about a specific download file that is made available through this API.\n","required":["url","fileName"],"properties":{"url":{"description":"Getting this URL will return a HTTP redirect to the actual data.","type":"string","format":"uri"},"fileName":{"description":"The name of the file.","type":"string"},"size":{"description":"The file size, in bytes.","type":"integer"},"md5":{"description":"A MD5 checksum of the file data. This can be used to verify the integrity of the data once you have downloaded it.","type":"string"}}}},"responses":{"NotFoundError":{"description":"The request does not match any known content.\nThe response will contain a human readable message, and may also contain links to help you\nnavigate to other API endpoints.\n","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"dataPackagesUrl":{"type":"string","format":"uri"},"downloadCatalogueUrl":{"type":"string","format":"uri"},"productUrl":{"type":"string","format":"uri"},"productDownloadsUrl":{"type":"string","format":"uri"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-apis/accessing-os-apis/os-downloads-api/technical-specification/download-an-opendata-product.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
