{
  "openapi": "3.0.4",
  "info": {
    "title": "National Public Transport Access Nodes (NaPTAN) and National Public Transport Gazetteer (NPTG) API",
    "description": "<h2>Using the NaPTAN & NPTG API</h2><p>The NaPTAN & NPTG API can be used to automatically download transport, gazetteer and locality data.</p><p>The API has three endpoints. The NaPTAN API allows you to download data either by ATCOAreaCode, a group of ATCOAreaCodes or the whole national dataset. The NPTG API allows you to download national gazetteer dataset. The NPTG localities API allows you to download national localities' dataset.</p><p>The NaPTAN & NPTG data are available in either XML or CSV format.</p><h3>Want something more simple?</h3><p>You can download the NaPTAN & NPTG datasets in CSV and XML format from the <a href='https://beta-naptan.dft.gov.uk/'>new NaPTAN website</a>.</p>",
    "version": "1"
  },
  "paths": {
    "/v1/access-nodes": {
      "get": {
        "tags": [
          "AccessNodes"
        ],
        "summary": "Gets access nodes data filtered by atco area codes in your chosen data format",
        "description": "Provide comma separated ATCO area codes and the data format. If no ATCO area codes are provided, the national dataset will be served.\n            \n    GET /v1/access-nodes?atcoAreaCodes=010&dataFormat=xml\n    GET /v1/access-nodes?atcoAreaCodes=010,040&dataFormat=csv\n    GET /v1/access-nodes?dataFormat=xml\n    GET /v1/access-nodes?dataFormat=csv",
        "parameters": [
          {
            "name": "dataFormat",
            "in": "query",
            "description": "The data format to return the response in. The available data formats are CSV or XML",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "atcoAreaCodes",
            "in": "query",
            "description": "Provide comma separated atco area codes. If no atco area codes are provided, the national dataset will be served",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a file containing access nodes in the provided data format"
          },
          "400": {
            "description": "Atco area codes or data format are incorrectly formatted"
          },
          "404": {
            "description": "Provided atco area codes or data format was not found"
          },
          "429": {
            "description": "Too many requests were sent within a time period"
          }
        }
      }
    },
    "/v1/nptg": {
      "get": {
        "tags": [
          "Nptg"
        ],
        "summary": "Gets national gazetteer data in XML format",
        "description": "GET /v1/nptg",
        "responses": {
          "200": {
            "description": "Returns a file containing national gazetteer data in XML format"
          },
          "429": {
            "description": "Too many requests were sent within a time period"
          }
        }
      }
    },
    "/v1/nptg/localities": {
      "get": {
        "tags": [
          "Nptg"
        ],
        "summary": "Gets national locality data in CSV format",
        "description": "GET /v1/nptg/localities",
        "responses": {
          "200": {
            "description": "Returns a file containing national locality data in CSV format"
          },
          "429": {
            "description": "Too many requests were sent within a time period"
          }
        }
      }
    }
  },
  "components": { },
  "tags": [
    {
      "name": "AccessNodes"
    },
    {
      "name": "Nptg"
    }
  ]
}