> For the complete documentation index, see [llms.txt](https://docs.os.uk/os-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.os.uk/os-apis/accessing-os-apis/os-vector-tile-api/technical-specification/stylesheet.md).

# Stylesheet

{% 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 /vts/resources/styles

> Discover compatible stylesheets

```json
{"openapi":"3.0.1","info":{"title":"OS Vector Tiles API","version":"v1.0"},"tags":[{"name":"Styles","description":"Discover compatible stylesheets for the OS Vector Tiles API"}],"servers":[{"url":"https://api.os.uk/maps/vector/v1"}],"security":[{"api-key":[],"api-key-header":[],"oauth2":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"key","in":"query"}},"schemas":{"StylesResponse":{"type":"object","properties":{"version":{"type":"integer"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"sources":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"filter":{"type":"array","items":{"type":"string"}},"minzoom":{"type":"integer"},"maxzoom":{"type":"integer"},"layout":{"type":"object"},"paint":{"type":"object"}},"required":["id","type","source"]}}},"required":["version","sprite","glyphs","sources","layers"]}}},"paths":{"/vts/resources/styles":{"get":{"tags":["Styles"],"summary":"Discover compatible stylesheets","operationId":"discoverStyles","parameters":[{"name":"srs","in":"query","description":"The Spatial Reference System for the service.","required":false,"schema":{"type":"string","default":"27700","enum":["27700","3857"]}}],"responses":{"200":{"description":"Retrieves compatible stylesheets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StylesResponse"}}}}}}}}}
```

## GET /vts/{layer-name}/resources/styles

> Discover compatible stylesheets for a data overlay

```json
{"openapi":"3.0.1","info":{"title":"OS Vector Tiles API","version":"v1.0"},"tags":[{"name":"Styles","description":"Discover compatible stylesheets for the OS Vector Tiles API"}],"servers":[{"url":"https://api.os.uk/maps/vector/v1"}],"security":[{"api-key":[],"api-key-header":[],"oauth2":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"key","in":"query"}},"schemas":{"StylesResponse":{"type":"object","properties":{"version":{"type":"integer"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"sources":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string"}},"required":["type","url"]}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"source":{"type":"string"},"source-layer":{"type":"string"},"filter":{"type":"array","items":{"type":"string"}},"minzoom":{"type":"integer"},"maxzoom":{"type":"integer"},"layout":{"type":"object"},"paint":{"type":"object"}},"required":["id","type","source"]}}},"required":["version","sprite","glyphs","sources","layers"]}}},"paths":{"/vts/{layer-name}/resources/styles":{"get":{"tags":["Styles"],"summary":"Discover compatible stylesheets for a data overlay","operationId":"discoverOverlayStyles","parameters":[{"name":"layer-name","in":"path","description":"The name of the data overlay.","required":true,"schema":{"type":"string","enum":["boundaries","greenspace","sites","water","highways","paths"]}},{"name":"srs","in":"query","description":"The Spatial Reference System for the service.","schema":{"type":"string","default":"27700","enum":["27700","3857"]}}],"responses":{"200":{"description":"Returns compatible stylesheets for a data overlay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StylesResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.os.uk/os-apis/accessing-os-apis/os-vector-tile-api/technical-specification/stylesheet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
