OS Maps API

Pre-rendered raster map tiles in multiple OS styles, served as OGC WMTS and as ZXY tiles.

OpenAPI Specification

ordnance-survey-maps-openapi.json Raw ↑
{
  "openapi": "3.0.1",
  "info": {
    "title": "OS Maps API",
    "version": "v1.0",
    "x-apievangelist-provenance": {
      "method": "searched",
      "generated": "2026-07-26",
      "assembly": "Assembled by the API Evangelist enrichment pipeline from the per-operation OpenAPI 3.0.1 documents Ordnance Survey publishes inline on each docs.os.uk technical-specification page. Paths, parameters, schemas, security schemes and responses are verbatim from those published documents; only the per-page fragments were merged into one document per API.",
      "sources": [
        "https://docs.os.uk/os-apis/accessing-os-apis/os-maps-api/technical-specification/wmts.md",
        "https://docs.os.uk/os-apis/accessing-os-apis/os-maps-api/technical-specification/zxy.md"
      ]
    }
  },
  "servers": [
    {
      "url": "https://api.os.uk/maps/raster/v1"
    }
  ],
  "security": [
    {
      "api-key": [],
      "api-key-header": [],
      "oauth2": []
    }
  ],
  "tags": [
    {
      "name": "Tile Request",
      "description": "Access and download data for a specific tile"
    }
  ],
  "paths": {
    "/wmts": {
      "get": {
        "tags": [
          "Tile Request"
        ],
        "summary": "Access and download data for a specific tile",
        "operationId": "getWMTSTileData",
        "parameters": [
          {
            "name": "layer",
            "in": "query",
            "description": "The tile set layer that will be requested.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Road_27700",
                "Road_3857",
                "Outdoor_27700",
                "Outdoor_3857",
                "Light_27700",
                "Light_3857",
                "Leisure_27700"
              ]
            }
          },
          {
            "name": "tileMatrixSet",
            "in": "query",
            "description": "The identifier of the tile matrix set.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "EPSG:27700",
                "EPSG:3857"
              ]
            }
          },
          {
            "name": "tileMatrix",
            "in": "query",
            "description": "The identifier of the tile matrix within the specified tile matrix set.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tileRow",
            "in": "query",
            "description": "The row index of the tile.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tileCol",
            "in": "query",
            "description": "The column index of the tile.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "The service that is being accessed.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "wmts"
              ]
            }
          },
          {
            "name": "request",
            "in": "query",
            "description": "The type of request being made. If a GetCapabilities request is being made, the other parameters are not required other than authentication.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "GetCapabilities",
                "GetTile"
              ]
            }
          },
          {
            "name": "style",
            "in": "query",
            "description": "Taken from the Identifier of the chosen Layer's Style property",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "default"
              ]
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "The version number of the service.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1.0.0",
                "2.0.0"
              ]
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "The Height of the tile.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "The Width of the tile.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "outputformat",
            "in": "query",
            "description": "The format of the returned tile.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "image/png"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tile image retrieved successfully",
            "content": {
              "image/png": {}
            }
          },
          "ServiceMetadata": {
            "description": "Retrieves Service Metadata for OS Maps API when request parameter is 'GetCapabilities'",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceMetadata"
                }
              }
            }
          }
        }
      }
    },
    "/zxy/{layer}/{z}/{x}/{y}.png": {
      "get": {
        "tags": [
          "Tile Request"
        ],
        "summary": "Access and download data for a specific tile",
        "operationId": "getZXYTileData",
        "parameters": [
          {
            "name": "layer",
            "in": "path",
            "description": "The tile set layer that will be requested.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Road_27700",
                "Road_3857",
                "Outdoor_27700",
                "Outdoor_3857",
                "Light_27700",
                "Light_3857",
                "Leisure_27700"
              ]
            }
          },
          {
            "name": "z",
            "in": "path",
            "description": "Zoom level",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "x",
            "in": "path",
            "description": "X coordinate",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "y",
            "in": "path",
            "description": "Y coordinate",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tile image retrieved successfully",
            "content": {
              "image/png": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api-key": {
        "type": "apiKey",
        "name": "key",
        "in": "query"
      }
    },
    "schemas": {
      "ServiceMetadata": {
        "type": "object",
        "properties": {
          "service": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "description",
              "version"
            ]
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tileMatrixSets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "layers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "service",
          "operations",
          "tileMatrixSets",
          "layers"
        ]
      }
    }
  }
}