search_routes

Pack: transit-land · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/search_routes for the schema, then POST the same URL with its arguments for the data.

Search public transit routes in Transitland, the global GTFS feed aggregator, by route name, GTFS route type, operating agency, or a lat/lon point with radius. Returns matching routes with short and long name, route type, operating agency and Transitland onestop_id. Answers which bus, tram, metro, rail or ferry lines serve a place or belong to an operator. route_type: ${ROUTE_TYPES}.

Parameters

NameTypeRequiredDescription
querystringnoFree-text search by route name/long name
route_typenumbernoGTFS route_type code
agency_idstringno
operator_idstringnoTransitland operator onestop_id
latnumberno
lonnumberno
radius_mnumberno
limitnumberno

Example call

Arguments

{
  "route_type": 3
}

curl

curl -X POST https://gateway.pipeworx.io/transit-land/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_routes","arguments":{"route_type":3}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_routes', {
  "route_type": 3
});

More examples

{
  "operator_id": "o-9q8yvz-bart",
  "lat": 37.7749,
  "lon": -122.4194,
  "radius_m": 2000
}

Response shape

FieldTypeDescription
metaobject
routesarrayList of matching routes
Full JSON Schema
{
  "type": "object",
  "properties": {
    "meta": {
      "type": "object",
      "properties": {
        "after": {
          "type": "number"
        },
        "next": {
          "type": "string"
        }
      }
    },
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "agency": {
            "type": "object",
            "properties": {
              "agency_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "agency_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "onestop_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Operator/agency details"
          },
          "continuous_drop_off": {
            "description": "(type varies; observed both null and non-null)"
          },
          "continuous_pickup": {
            "description": "(type varies; observed both null and non-null)"
          },
          "feed_version": {
            "type": "object",
            "properties": {
              "feed": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "onestop_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "fetched_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "sha1": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "id": {
            "type": "number",
            "description": "Transitland onestop_id"
          },
          "onestop_id": {
            "type": "string"
          },
          "route_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "route_desc": {
            "type": [
              "string",
              "null"
            ]
          },
          "route_id": {
            "type": "string",
            "description": "GTFS route_id"
          },
          "route_long_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "route_short_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "route_sort_order": {
            "type": [
              "number",
              "null"
            ]
          },
          "route_text_color": {
            "description": "(type varies; observed both null and non-null)"
          },
          "route_type": {
            "type": "number",
            "description": "GTFS route_type code"
          },
          "route_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "description": "List of matching routes"
    }
  },
  "description": "Search results for transit routes"
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the transit-land pack
{
  "mcpServers": {
    "transit-land": {
      "url": "https://gateway.pipeworx.io/transit-land/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 5, 2026