openapi: 3.0.3 info: title: Walk Score Transit API description: >- The Walk Score Public Transit API provides detailed transit data including Transit Scores, nearby stops, route networks, stop details, and route details. The API returns information about bus, rail, and other transit options within one mile of any location. Used by real estate platforms, commute calculators, and urban planning applications to surface public transportation options. version: 1.0.0 contact: url: https://www.walkscore.com/professional/public-transit-api.php termsOfService: https://www.walkscore.com/professional/terms.php servers: - url: https://transit.walkscore.com description: Walk Score Transit API tags: - name: Scores description: Transit scores for locations - name: Stops description: Transit stop search and details - name: Routes description: Transit route details - name: Cities description: Supported cities list security: - apiKey: [] paths: /transit/score/: get: operationId: getTransitScore summary: Get Transit Score description: >- Returns a Transit Score (integer 0-100) and English description for a specific city and location. The score represents relative access to public transit. A score of 100 means World-Class Transit, while lower scores indicate less transit access. All successful requests return HTTP 200 with JSON. tags: - Scores parameters: - name: wsapikey in: query required: true schema: type: string description: Your Walk Score API key - name: lat in: query required: true schema: type: number format: double description: Latitude to score example: 47.6101359 - name: lon in: query required: true schema: type: number format: double description: Longitude to score example: -122.3420567 - name: city in: query required: true schema: type: string description: City name example: "Seattle" - name: state in: query required: false schema: type: string description: Two-letter USPS state code (required for US cities) example: "WA" - name: country in: query required: false schema: type: string description: Two-letter ISO-3166 country code (required for non-US cities) responses: '200': description: Transit score result content: application/json: schema: $ref: '#/components/schemas/TransitScoreResponse' example: scored_lat: 47.6101359 scored_lon: -122.3420567 transit_score: 100 description: "World-Class" summary: "266 nearby routes: 260 bus, 4 rail, 2 other" ws_link: "https://www.walkscore.com/WA/Seattle" help_link: "https://www.walkscore.com/transit-score-methodology.shtml" '400': description: Unsupported city/state combination or invalid parameters /transit/search/stops/: get: operationId: searchTransitStops summary: Search Transit Stops description: >- Returns information about up to 16 transit stops near a given location, where each stop services a unique route. Each stop includes route details, distances, and summary text. Used to surface nearby transit options with route service information. tags: - Stops parameters: - name: wsapikey in: query required: true schema: type: string description: Your Walk Score API key - name: lat in: query required: true schema: type: number format: double description: Search latitude example: 40.6678248 - name: lon in: query required: true schema: type: number format: double description: Search longitude example: -73.8330133 responses: '200': description: Array of nearby transit stops with route information content: application/json: schema: type: array items: $ref: '#/components/schemas/TransitStop' '400': description: Invalid parameters /transit/search/network/: get: operationId: searchTransitNetwork summary: Search Transit Network description: >- Advanced API call that returns detailed information about all routes and stops within one mile of a location. Returns a comprehensive network object with routes dictionary and stops dictionary, where routes contain stop IDs and stops contain route IDs. tags: - Stops parameters: - name: wsapikey in: query required: true schema: type: string description: Your Walk Score API key - name: lat in: query required: true schema: type: number format: double description: Search latitude example: 40.6678248 - name: lon in: query required: true schema: type: number format: double description: Search longitude example: -73.8330133 responses: '200': description: Transit network with all routes and stops within one mile content: application/json: schema: $ref: '#/components/schemas/TransitNetwork' '400': description: Invalid parameters /transit/stop/{stopId}/: get: operationId: getTransitStop summary: Get Transit Stop description: >- Returns details for a single transit stop by its identifier, including coordinates, name, and list of route IDs that serve the stop. tags: - Stops parameters: - name: stopId in: path required: true schema: type: string description: Stop identifier (e.g. s17737) example: "s17737" - name: wsapikey in: query required: true schema: type: string description: Your Walk Score API key responses: '200': description: Transit stop details content: application/json: schema: $ref: '#/components/schemas/TransitStopDetail' example: id: "s17737" lat: 47.6107025 lon: -122.340332 name: "2nd Ave & Stewart St" route_ids: ["r415", "r282", "r403", "r375", "r367"] '400': description: Invalid stop ID /transit/route/{routeId}/: get: operationId: getTransitRoute summary: Get Transit Route description: >- Returns details for a single transit route by its identifier, including name, category (Rail/Bus/Other), agency information, color branding, stop IDs, and WKT geometry string for the route path. tags: - Routes parameters: - name: routeId in: path required: true schema: type: string description: Route identifier (e.g. r403) example: "r403" - name: wsapikey in: query required: true schema: type: string description: Your Walk Score API key responses: '200': description: Transit route details content: application/json: schema: $ref: '#/components/schemas/TransitRoute' '400': description: Invalid route ID /transit/supported/cities/: get: operationId: listSupportedCities summary: List Supported Cities description: >- Returns a list of all cities supported by the Transit Score API, including city name, state (US) or country code (non-US), and estimated population. Use this to validate city/state combinations before requesting transit scores. tags: - Cities parameters: - name: wsapikey in: query required: true schema: type: string description: Your Walk Score API key responses: '200': description: Array of supported cities content: application/json: schema: type: array items: $ref: '#/components/schemas/SupportedCity' '400': description: Invalid API key components: securitySchemes: apiKey: type: apiKey in: query name: wsapikey description: Walk Score API key, contact Walk Score to obtain schemas: TransitScoreResponse: type: object properties: scored_lat: type: number format: double description: Scored latitude coordinate scored_lon: type: number format: double description: Scored longitude coordinate transit_score: type: integer minimum: 0 maximum: 100 description: Transit Score from 0 to 100 description: type: string description: Textual description of transit quality example: "World-Class" summary: type: string description: Summary of nearby route counts by category example: "266 nearby routes: 260 bus, 4 rail, 2 other" ws_link: type: string format: uri description: Walk Score page URL for this location help_link: type: string format: uri description: Transit Score methodology documentation link TransitStop: type: object properties: id: type: string description: Stop identifier example: "s17737" lat: type: number format: double description: Stop latitude lon: type: number format: double description: Stop longitude name: type: string description: Stop name or intersection example: "2nd Ave & Stewart St" distance: type: number format: double description: Distance in miles from search point summary_text: type: string description: Plain text description of stop and services summary_html: type: string description: HTML-formatted description of stop and services route_summary: type: array items: $ref: '#/components/schemas/RouteSummary' RouteSummary: type: object properties: id: type: string description: Route identifier name: type: string description: Route name short_name: type: string description: Short route name or number long_name: type: string description: Full route name category: type: string enum: ["Rail", "Bus", "Other"] description: Transit category agency: type: string description: Transit agency name agency_url: type: string format: uri description: Transit agency website color: type: string description: Route color as hex value example: "003087" text_color: type: string description: Route text color as hex value example: "ffffff" description: type: string description: Route description TransitNetwork: type: object properties: routes: type: object additionalProperties: $ref: '#/components/schemas/TransitRouteNetwork' description: Map of route ID to route details including stop IDs stops: type: object additionalProperties: $ref: '#/components/schemas/TransitStopNetwork' description: Map of stop ID to stop details including route IDs TransitRouteNetwork: type: object properties: id: type: string description: Route identifier name: type: string description: Route name category: type: string enum: ["Rail", "Bus", "Other"] description: Transit category stop_ids: type: array items: type: string description: List of stop IDs on this route TransitStopNetwork: type: object properties: id: type: string description: Stop identifier lat: type: number format: double description: Stop latitude lon: type: number format: double description: Stop longitude name: type: string description: Stop name route_ids: type: array items: type: string description: List of route IDs serving this stop TransitStopDetail: type: object properties: id: type: string description: Stop identifier lat: type: number format: double description: Stop latitude lon: type: number format: double description: Stop longitude name: type: string description: Stop name or intersection route_ids: type: array items: type: string description: List of route IDs serving this stop TransitRoute: type: object properties: id: type: string description: Route identifier name: type: string description: Route name short_name: type: string description: Short route name long_name: type: string description: Full route name category: type: string enum: ["Rail", "Bus", "Other"] description: Transit category agency: type: string description: Transit agency name agency_url: type: string format: uri description: Transit agency website color: type: string description: Route brand color as hex text_color: type: string description: Route text color as hex description: type: string description: Route description stop_ids: type: array items: type: string description: Array of stop IDs on this route geometry_wkt: type: string description: Well-Known Text geometry string for the route path SupportedCity: type: object properties: city: type: string description: Canonical city name example: "Seattle" state: type: string description: Two-letter US state code (US cities only) example: "WA" country: type: string description: Two-letter ISO-3166 country code (non-US cities only) population: type: integer description: Estimated city population example: 737000