Donate using PayPal

CycleStreets API (v2)

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

Batch routes matrix - job data

This API call provides a polling URL to determine availability of the data, following creation of the job using the batchroutes.createjob API call and following starting of the job using the batchroutes.controljob API call.

It returns a status code for whether the data is yet available, and URLs of the downloadable files upon completion.

A suitable polling interval is every 60 seconds, or 30 seconds if the job is very small.


Example which requests the download status of a job.

	[id] => 69158
	[username] => myusername
	[password] => mypassword

Result (before availability):

    "id": 69158,
    "status": "open"
    "percentageComplete": 20.1,
    "ready": false
    "files": {}

Result (upon availability) - generally the dataGz file will be the main one wanted:

    "id": 69158,
    "status": "complete"
    "percentageComplete": 100,
    "errors": {
        "Too short: journeys must be longer than 4 metres. (Your requested journey was 0 metres).": 1
    "ready": true,
    "files": {
        "dataCsv": "",
        "dataGz": "",
        "gridCsv": "",
        "gridGz": ""

Request parameters - required

id int
Batch job ID, as returned from batchroutes.createjob.
username string
Your CycleStreets account username. In due course this will be replaced with an OAuth token.
password string
Your CycleStreets account password.

Request parameters - optional



JSON response as above, containing a result status and, when available, the URLs to download the data.

It is recommended to use the 'ready' key, which returns a boolean.

Error response

JSON object containing an error key and a text string.

Example error (text string will vary):

    "error": "An error occurred while controlling the job."

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

My comments relate to: *

Your comments: *
URL of page: *
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.