
{"openapi":"3.1.0","info":{"title":"NYC Transit Live","version":"2.2.1","description":"Real-time NYC transit data for agents. Canonical discovery exposes POST JSON operations for subway arrivals, bus ETAs, and Citi Bike pickup/return availability near a coordinate; browser-friendly GET aliases remain supported. Each paid check costs $0.02 via x402 or MPP.","x-guidance":"Use this API when the user needs real-time NYC subway, bus, or Citi Bike availability near a known coordinate. Resolve place names to latitude/longitude before calling; the API does not geocode.\n\nCanonical agent invocation uses POST with JSON body { lat, lng, limit? }. limit defaults to 5 and must be an integer between 1 and 10. Reason over the full result set to answer constraint queries (e.g. stations with ≥3 e-bikes, stops within 8 walking minutes, specific subway lines, return docks with ≥5 open slots), then present the top 3 results to the user unless they ask for more. Equivalent GET query routes remain available for browser and manual use, but OpenAPI POST operations are the preferred discovery target.\n\nChoose /subway/nearest for live train arrivals, /bus/nearest for live bus ETAs, /citibike/nearest for bike pickup availability, and /citibike/dock for return docks. For trip-planning questions, call origin and destination endpoints in parallel and compare walking time, arrival minutes, and bike or dock counts. Example: compare /subway/nearest and /citibike/nearest near the trip origin, then /subway/nearest and /citibike/dock near the destination."},"x-discovery":{"ownershipProofs":[]},"paths":{"/citibike/nearest":{"post":{"operationId":"citibikeNearest","summary":"Find nearby Citi Bike stations with available bikes and e-bikes.","description":"Canonical agent invocation uses POST with JSON body { lat, lng, limit? }. GET with query parameters remains supported for browser/manual use.","tags":["Citi Bike"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"USDC"}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","distance_feet","walk_minutes","ebikes_available","bikes_available","docks_available","lat","lng"],"properties":{"name":{"type":"string"},"distance_feet":{"type":"integer","minimum":0},"walk_minutes":{"type":"integer","minimum":0},"ebikes_available":{"type":"integer","minimum":0},"bikes_available":{"type":"integer","minimum":0},"docks_available":{"type":"integer","minimum":0},"lat":{"type":"number"},"lng":{"type":"number"}}}}}}}}},"402":{"description":"Payment Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lat","lng"],"properties":{"lat":{"type":"number","description":"Latitude in WGS84 decimal degrees."},"lng":{"type":"number","description":"Longitude in WGS84 decimal degrees."},"limit":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"Optional number of nearby results to return (1–10, defaults to 5). Fetch the full set to filter by user constraints (min bikes, max walk time, e-bikes only, specific lines/routes), then present the top 3 to the user."}}}}}}}},"/citibike/dock":{"post":{"operationId":"citibikeDock","summary":"Find nearby Citi Bike stations with open docks for returns.","description":"Canonical agent invocation uses POST with JSON body { lat, lng, limit? }. GET with query parameters remains supported for browser/manual use.","tags":["Citi Bike"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"USDC"}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","distance_feet","walk_minutes","docks_available","bikes_available","lat","lng"],"properties":{"name":{"type":"string"},"distance_feet":{"type":"integer","minimum":0},"walk_minutes":{"type":"integer","minimum":0},"docks_available":{"type":"integer","minimum":0},"bikes_available":{"type":"integer","minimum":0},"lat":{"type":"number"},"lng":{"type":"number"}}}}}}}}},"402":{"description":"Payment Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lat","lng"],"properties":{"lat":{"type":"number","description":"Latitude in WGS84 decimal degrees."},"lng":{"type":"number","description":"Longitude in WGS84 decimal degrees."},"limit":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"Optional number of nearby results to return (1–10, defaults to 5). Fetch the full set to filter by user constraints (min bikes, max walk time, e-bikes only, specific lines/routes), then present the top 3 to the user."}}}}}}}},"/subway/nearest":{"post":{"operationId":"subwayNearest","summary":"Find nearby subway stations with live train arrivals.","description":"Canonical agent invocation uses POST with JSON body { lat, lng, limit? }. GET with query parameters remains supported for browser/manual use.","tags":["Subway"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"USDC"}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","distance_feet","walk_minutes","lines","arrivals","lat","lng"],"properties":{"name":{"type":"string"},"distance_feet":{"type":"integer","minimum":0},"walk_minutes":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"string"}},"arrivals":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["line","direction","minutes"],"properties":{"line":{"type":"string"},"direction":{"type":"string","enum":["Uptown","Downtown"]},"minutes":{"type":"integer","minimum":0}}}},"lat":{"type":"number"},"lng":{"type":"number"}}}}}}}}},"402":{"description":"Payment Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lat","lng"],"properties":{"lat":{"type":"number","description":"Latitude in WGS84 decimal degrees."},"lng":{"type":"number","description":"Longitude in WGS84 decimal degrees."},"limit":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"Optional number of nearby results to return (1–10, defaults to 5). Fetch the full set to filter by user constraints (min bikes, max walk time, e-bikes only, specific lines/routes), then present the top 3 to the user."}}}}}}}},"/subway/alerts":{"post":{"operationId":"subwayAlerts","summary":"Get active subway service alerts, optionally filtered by line.","description":"Returns active MTA subway alerts with a normalized severity bucket, direction (Uptown / Downtown / both), and estimated delay minutes when the MTA includes them in the description text. Canonical invocation uses POST with JSON body { lines?: string[], limit? }. Omit lines (or pass an empty array) for all active alerts. GET clients may pass lines as a comma-separated string: GET /subway/alerts?lines=L,G.","tags":["Subway"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"USDC"}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["lines","effect","severity","direction","header","description"],"properties":{"lines":{"type":"array","items":{"type":"string"},"description":"Subway lines affected by this alert."},"effect":{"type":"string","description":"Raw GTFS-RT Alert.Effect enum: NO_SERVICE, REDUCED_SERVICE, SIGNIFICANT_DELAYS, DETOUR, ADDITIONAL_SERVICE, MODIFIED_SERVICE, OTHER_EFFECT, UNKNOWN_EFFECT, STOP_MOVED."},"severity":{"type":"string","enum":["no_service","reduced","delays","detour","info"],"description":"Simplified severity bucket normalized from effect. Prefer severity over effect for agent decisioning."},"direction":{"type":"string","enum":["both","Uptown","Downtown"],"description":"Which direction is affected. 'both' for route-level alerts or alerts affecting both directions of a stop."},"header":{"type":"string","description":"Short summary text from the alert header."},"description":{"type":"string","description":"Full human-readable description. Often contains specific delay minutes when the MTA provides them."},"estimated_minutes":{"type":["string","null"],"description":"Delay in minutes extracted from description text when present (e.g. '10-15'). Null when no structured minute estimate is in the alert text."},"active_until":{"type":["string","null"],"description":"ISO 8601 timestamp when the currently-active period ends, or null if open-ended."}}}}}}}}},"402":{"description":"Payment Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"lines":{"type":"array","items":{"type":"string"},"maxItems":26,"description":"Optional list of subway line letters/numbers to filter by (e.g. [\"L\", \"G\"]). Omit or pass an empty array to get all currently active alerts. GET clients may pass a comma-separated string."},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"Optional maximum number of alerts to return (1–50, default 20)."}}}}}}}},"/bus/nearest":{"post":{"operationId":"busNearest","summary":"Find nearby bus stops with live ETA predictions.","description":"Canonical agent invocation uses POST with JSON body { lat, lng, limit? }. GET with query parameters remains supported for browser/manual use.","tags":["Bus"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"USDC"}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","distance_feet","walk_minutes","routes","arrivals","lat","lng"],"properties":{"name":{"type":"string"},"distance_feet":{"type":"integer","minimum":0},"walk_minutes":{"type":"integer","minimum":0},"routes":{"type":"array","items":{"type":"string"}},"arrivals":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["route","destination","minutes","proximity","stops_away"],"properties":{"route":{"type":"string"},"destination":{"type":"string"},"minutes":{"type":["integer","null"],"minimum":0},"proximity":{"type":["string","null"]},"stops_away":{"type":["integer","null"],"minimum":0}}}},"lat":{"type":"number"},"lng":{"type":"number"}}}}}}}}},"402":{"description":"Payment Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["lat","lng"],"properties":{"lat":{"type":"number","description":"Latitude in WGS84 decimal degrees."},"lng":{"type":"number","description":"Longitude in WGS84 decimal degrees."},"limit":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"Optional number of nearby results to return (1–10, defaults to 5). Fetch the full set to filter by user constraints (min bikes, max walk time, e-bikes only, specific lines/routes), then present the top 3 to the user."}}}}}}}}},"x-service-info":{"categories":["transportation","transit","nyc","new-york-city","citibike","bike-share","subway","bus","mta","real-time","train-arrivals","bus-arrivals","public-transportation","commute","directions","trip-planning","navigation","manhattan","brooklyn","queens","bronx","staten-island"],"keywords":["NYC","New York City","New York","subway","MTA","bus","MTA bus","Citi Bike","Citibike","bike share","e-bike","ebike","real-time","live","transit","train arrivals","bus arrivals","next train","next bus","public transportation","public transit","mass transit","commute","directions","how do I get","fastest way","quickest route","best way","cheapest way","nearest station","closest","near me","walking distance","from A to B","L train","1 train","6 train","7 train","A train","G train","J train","N train","Q train","R train","M train","F train","the L","the 1","the 6","the A","the 7","the G","Canarsie line","Flushing line","Lex Ave line","Broadway line","Queens Boulevard line","express bus","SBS","Select Bus Service","M15","M60","M86","M104","B44","B46","Bx1","Bx12","Q58","Q70","S53","Staten Island Railway","SIR","Manhattan","Brooklyn","Queens","Bronx","Staten Island","Williamsburg","Greenpoint","Bushwick","Bed-Stuy","Park Slope","DUMBO","Downtown Brooklyn","Astoria","Long Island City","LIC","Jackson Heights","Forest Hills","Flushing","Fordham","Riverdale","SoHo","Tribeca","Chinatown","Flatiron","Chelsea","Hell's Kitchen","Midtown","Lower East Side","East Village","West Village","FiDi","Financial District","Upper East Side","Upper West Side","Harlem","Washington Heights","Hudson Yards","Times Square","Central Park","Penn Station","Grand Central","Port Authority","JFK","LaGuardia","LGA","Newark","EWR","Barclays Center","MSG","Madison Square Garden","Yankee Stadium","Citi Field","Rockefeller Center","Empire State Building","World Trade Center","WTC","Lincoln Center","Prospect Park","Tompkins Square","Washington Square","the High Line","Brooklyn Bridge","Williamsburg Bridge","Javits Center","GTFS-RT","SIRI","GBFS"],"docs":{"homepage":"https://transit402.dev","llmsTxt":"/llms.txt","skill":"/skill.md","openapi":"/openapi.json"}},"servers":[{"url":"https://transit402.dev"}]}