# Download a data package

{% 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 /dataPackages/{dataPackageId}/versions/{versionId}/downloads

> Get a specific file from a data package version.

```json
{"openapi":"3.0.0","info":{"title":"Ordnance Survey Download API","version":"1.0.0"},"tags":[{"name":"Data Packages","description":"Operations providing access to data packages.\nTo access data packages you must supply a valid API key or OAuth 2 access token.\n"}],"servers":[{"url":"https://api.os.uk/downloads/v1/"}],"security":[{"OAuth2":[]},{"APIKeyQuery":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.os.uk/oauth2/token/v1","scopes":{}}}},"APIKeyQuery":{"type":"apiKey","in":"query","name":"key"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"key"}},"parameters":{"dataPackageId":{"name":"dataPackageId","in":"path","description":"The id of the data package.","required":true,"schema":{"type":"string"}}},"responses":{"UnauthorizedError":{"description":"The API key or OAuth 2 access token is missing or invalid.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"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"}}}}}}}},"paths":{"/dataPackages/{dataPackageId}/versions/{versionId}/downloads":{"get":{"summary":"Get a specific file from a data package version.","tags":["Data Packages"],"parameters":[{"$ref":"#/components/parameters/dataPackageId"},{"name":"versionId","in":"path","description":"The id of the data package version.","required":true,"schema":{"type":"string"}},{"name":"fileName","in":"query","description":"The name of the file.","required":true,"schema":{"type":"string"}}],"responses":{"307":{"description":"A redirect to the actual file data.","headers":{"Location":{"schema":{"type":"string","format":"uri"},"description":"Direct URL for the download file."}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```
