TransitFeeds API
transitfeeds · Location
API to view feed information and download feeds from TransitFeeds.com
Authentication
Sample Requests
This API call allows you to easily see every single feed update in the TranstiFeeds.com system. Since this can be quite long, it's also possible to filter this list by a single feed ID.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeedVersions?err=1&key=YOUR_API_KEY&feed=example&page=1&warn=1&limit=10"
import requests
params = {
"err": "1",
"key": "YOUR_API_KEY",
"feed": "example",
"page": "1",
"warn": "1",
"limit": "10"
}
response = requests.get(
"https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeedVersions",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeedVersions');
url.searchParams.set('err', '1');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('feed', 'example');
url.searchParams.set('page', '1');
url.searchParams.set('warn', '1');
url.searchParams.set('limit', '10');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeedVersions")
q := baseURL.Query()
q.Set("err", "1")
q.Set("key", "YOUR_API_KEY")
q.Set("feed", "example")
q.Set("page", "1")
q.Set("warn", "1")
q.Set("limit", "10")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeedVersions")
uri.query = URI.encode_www_form({
"err" => "1",
"key" => "YOUR_API_KEY",
"feed" => "example",
"page" => "1",
"warn" => "1",
"limit" => "10"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeedVersions?" . http_build_query([
"err" => "1",
"key" => "YOUR_API_KEY",
"feed" => "example",
"page" => "1",
"warn" => "1",
"limit" => "10"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Used this API to retrieve a list of feeds in the system. Doing so can be usedful to discover feed IDs that can be used in other API calls.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeeds?key=YOUR_API_KEY&page=1&type=gtfs&limit=10&location=1&descendants=1"
import requests
params = {
"key": "YOUR_API_KEY",
"page": "1",
"type": "gtfs",
"limit": "10",
"location": "1",
"descendants": "1"
}
response = requests.get(
"https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeeds",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeeds');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('page', '1');
url.searchParams.set('type', 'gtfs');
url.searchParams.set('limit', '10');
url.searchParams.set('location', '1');
url.searchParams.set('descendants', '1');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeeds")
q := baseURL.Query()
q.Set("key", "YOUR_API_KEY")
q.Set("page", "1")
q.Set("type", "gtfs")
q.Set("limit", "10")
q.Set("location", "1")
q.Set("descendants", "1")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeeds")
uri.query = URI.encode_www_form({
"key" => "YOUR_API_KEY",
"page" => "1",
"type" => "gtfs",
"limit" => "10",
"location" => "1",
"descendants" => "1"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getFeeds?" . http_build_query([
"key" => "YOUR_API_KEY",
"page" => "1",
"type" => "gtfs",
"limit" => "10",
"location" => "1",
"descendants" => "1"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Once you have used `/getFeeds` to discover a feed's URL, you can use this endpoint to download its latest version from TranstiFeeds. It will be unmodified in the original format from the provider.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getLatestFeedVersion?key=YOUR_API_KEY&feed=example"
import requests
params = {
"key": "YOUR_API_KEY",
"feed": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getLatestFeedVersion",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getLatestFeedVersion');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('feed', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getLatestFeedVersion")
q := baseURL.Query()
q.Set("key", "YOUR_API_KEY")
q.Set("feed", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getLatestFeedVersion")
uri.query = URI.encode_www_form({
"key" => "YOUR_API_KEY",
"feed" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/transitfeeds.com/1.0.0/getLatestFeedVersion?" . http_build_query([
"key" => "YOUR_API_KEY",
"feed" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with TransitFeeds API?
TransitFeeds API is a Location API. Developers commonly use location APIs for:
- tracking assets and vehicles in real time
- building delivery and logistics apps
- finding nearby businesses or services
- geo-fencing and location-based notifications
- address validation and autocomplete
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. TransitFeeds API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide