Query the Mobility Database for transit/bikeshare feeds matching specified criteria. Returns a tibble with feed metadata including download URLs.
This function was formerly called mobdb_feeds().
Usage
feeds(
provider = NULL,
country_code = NULL,
subdivision_name = NULL,
municipality = NULL,
data_type = NULL,
status = NULL,
official = NULL,
limit = 100,
offset = 0,
use_cache = TRUE
)Arguments
- provider
A string. Filter by provider/agency name (partial match).
- country_code
A string. Two-letter ISO country code (e.g., "US", "CA"). Note: Location filters (
country_code,subdivision_name,municipality) requiredata_typeto be specified.- subdivision_name
A string. State, province, or region name. Requires
data_typeto be specified.- municipality
A string. City, municipality, or jurisdiction name. Requires
data_typeto be specified.- data_type
A string. Type of feed: "gtfs" (schedule), "gtfs_rt" (realtime), or "gbfs" (bike share). Required when using location filters.
- status
A string. Feed status: "active", "deprecated", "inactive", "development", or "future".
- official
A logical. If
TRUE, only return official feeds. IfFALSE, only return unofficial feeds. IfNULL(default), return all feeds regardless of official status.- limit
An integer. Maximum number of results to return (default: 100).
- offset
An integer. Number of results to skip for pagination (default: 0).
- use_cache
A logical. If
TRUE(default), use cached results if available. IfFALSE, always fetch fresh data from the API. Cached data expires after 1 hour.
Value
A tibble containing feed information with columns including:
id- Unique feed identifierdata_type- Type of feed (gtfs, gtfs_rt, or gbfs)created_at- Date and time feed was added to databaseexternal_ids- External identifier informationprovider- Transit agency/provider namefeed_contact_email- Contact email for the feedsource_info- Data frame containing:producer_url- Direct download URL for the feedauthentication_type- Type of auth required (0 = none)authentication_info_url- Human-readable page for authentication infoapi_key_parameter_name- Name of the parameter to pass in the URL to provide the API keylicense_url- License information
created_at- Feed creation timestampstatus- Feed status (active, inactive, deprecated)official- Whether feed is officialofficial_updated_at- Date and time of last updateAdditional metadata columns
Examples
if (FALSE) { # \dontrun{
# Get all active GTFS feeds in California
ca_feeds <- feeds(
country_code = "US",
subdivision_name = "California",
data_type = "gtfs",
status = "active"
)
# Search for a specific provider
sf_muni <- feeds(provider = "San Francisco")
# Get feeds with pagination
first_100 <- feeds(limit = 100, offset = 0)
next_100 <- feeds(limit = 100, offset = 100)
} # }
