City, Toronto Open Data API

Government / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

City, Toronto Open Data is Canada's largest municipal open data portal, providing free access to datasets on transit, parks, permits, and public health. No authentication is required, so you can start querying immediately. It also uses the CKAN API, which is widely used by government portals worldwide.

💡

Beginner Tip

Use the CKAN datastore_search action with a resource_id to fetch records from any Toronto dataset—find the resource_id by browsing the dataset page on open.toronto.ca.

Available Data

Use case: Integrate toronto (ca) city open data data into web and mobile applications
City, Toronto Open Data data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from City, Toronto Open Data",
    "description": "Toronto (CA) City Open Data",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

success True if the CKAN API action completed without errors.
result The returned data—either a list of package names or a records object depending on the action.
total Total number of records available in the dataset (for datastore_search).
records Array of data records matching the query, each as a key-value object.

Implementation Example

const url = "https://open.toronto.ca/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

404 Not Found The resource_id or package name does not exist or has been renamed.
Browse open.toronto.ca to confirm the current resource ID from the dataset page.
Connection refused The CKAN API endpoint URL is incorrect.
Use the correct base URL: ckan0.cf.opendata.inter.prod-toronto.ca for the Toronto CKAN API.
Slow response on large datasets Fetching too many records at once from a large dataset.
Use the limit and offset parameters to paginate through results instead of requesting all records.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 219ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Government
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →