Donate using PayPal

CycleStreets API (v2)

  • Details for:
  • API overview
  • Obtain API key
  • Usage policy
  • Uptime policy

Infrastructure location

This call retrieves a single location from an infrastructure dataset.

Data returned is licensed as per the respective owners.

Example

Example which retrieves an infrastructure location record.

https://api.cyclestreets.net/v2/infrastructure.location?dataset=tflcid&id=ABC123

Result:

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
		"_type": "cycle_parking",
                "type": "sheffield",
                "capacity": 2,
                "osm_id": 476102903,
                "images": [],
                "iconUrl": "https://www.example.com/images/icons/point.svg"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.118422,
                    51.509905
                ]
            }
        }
    ]
}

Example which retrieves an infrastructure location record, with all versions (revisions). Note that each feature has an id field added, representing the version (revision) metadata.

https://api.cyclestreets.net/v2/infrastructure.location?dataset=tflcid&id=ABC123&versions=true

Result:

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": {
                "version": 1,
                "surveydate": "2017-06-26",
                "status": "initial"
            },
            "properties": {
		"_type": "cycle_parking",
                "type": "sheffield",
                "capacity": 2,
                "osm_id": 476102903,
                "images": [],
                "iconUrl": "https://www.example.com/images/icons/point.svg"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.118422,
                    51.509905
                ]
            }
        },
        {
            "type": "Feature",
            "id": {
                "version": 2,
                "surveydate": "2019-05-28",
                "status": "changed"
            },
            "properties": {
		"_type": "cycle_parking",
                "type": "sheffield",
                "capacity": 10,
		"covered": "yes",
                "osm_id": 476102903,
                "images": [],
                "iconUrl": "https://www.example.com/images/icons/point.svg"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.118422,
                    51.509905
                ]
            }
        }
    ]
}

Request parameters - required

dataset string
Dataset name.
Currently-supported public values are: tflcid.
id string
ID of a location record.

Request parameters - optional

versions string true|false
Whether to retrieve all versions (revisions) of a location, e.g. as created using infrastructure.update.

Response

JSON structure as per example above.

Error response

JSON object containing an error key and a text string.

Example error (text string may vary):

{
    "error": "There is no such record."
}

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * https://cambridge.cyclestreets.net/api/v2/infrastructure.location/
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.