routes-for-agency Method
Retrieve the list of all routes for a particular agency by id.
Example Request
https://api.pugetsound.onebusaway.org/api/where/routes-for-agency/40.json?key=TEST
Example Response
{"code":200,"currentTime":1710977596679,"data":{"limitExceeded":false,"list":[{"agencyId":"40","color":"2B376E","description":"Redmond - University District","id":"40_100511","longName":"Redmond - University District","nullSafeShortName":"542","shortName":"542","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/542"},{"agencyId":"40","color":"2B376E","description":"","id":"40_532","longName":"Everett - Bellevue","nullSafeShortName":"532","shortName":"532","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/ride-with-us/routes-schedules/532"},{"agencyId":"40","color":"2B376E","description":"","id":"40_535","longName":"Lynnwood - Bellevue","nullSafeShortName":"535","shortName":"535","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/ride-with-us/routes-schedules/535"},{"agencyId":"40","color":"9AB6D3","description":"S Line runs between King Street Station and Tacoma Dome or Lakewood Stations weekdays","id":"40_SNDR_TL","longName":"Seattle - Tacoma/Lakewood","nullSafeShortName":"S Line","shortName":"S Line","textColor":"000000","type":2,"url":"https://www.soundtransit.org/S"},{"agencyId":"40","color":"2B376E","description":"Auburn - Redmond","id":"40_102734","longName":"","nullSafeShortName":"566","shortName":"566","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/566"},{"agencyId":"40","color":"2b376e","description":"","id":"40_560","longName":"Bellevue - Sea-Tac - W. Seattle","nullSafeShortName":"560","shortName":"560","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/560"},{"agencyId":"40","color":"2b376e","description":"","id":"40_574","longName":"Lakewood - SeaTac","nullSafeShortName":"574","shortName":"574","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/574"},{"agencyId":"40","color":"2b376e","description":"","id":"40_577","longName":"Federal Way - Seattle","nullSafeShortName":"577","shortName":"577","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/577"},{"agencyId":"40","color":"2b376e","description":"","id":"40_578","longName":"Puyallup - Seattle","nullSafeShortName":"578","shortName":"578","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/578"},{"agencyId":"40","color":"9AB6D3","description":"N Line runs between Everett Station and King Street Station weekdays","id":"40_SNDR_EV","longName":"Everett - Seattle","nullSafeShortName":"N Line","shortName":"N Line","textColor":"000000","type":2,"url":"https://www.soundtransit.org/N"},{"agencyId":"40","color":"2b376e","description":"","id":"40_580","longName":"Puyallup / Lakewood","nullSafeShortName":"580","shortName":"580","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/580"},{"agencyId":"40","color":"2b376e","description":"","id":"40_586","longName":"Tacoma - U. District","nullSafeShortName":"586","shortName":"586","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/586"},{"agencyId":"40","color":"2b376e","description":"","id":"40_590","longName":"Tacoma - Seattle","nullSafeShortName":"590","shortName":"590","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/590"},{"agencyId":"40","color":"2b376e","description":"","id":"40_592","longName":"Olympia/DuPont - Seattle","nullSafeShortName":"592","shortName":"592","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/592"},{"agencyId":"40","color":"2b376e","description":"","id":"40_594","longName":"Lakewood - Seattle","nullSafeShortName":"594","shortName":"594","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/594"},{"agencyId":"40","color":"2b376e","description":"","id":"40_595","longName":"Gig Harbor - Seattle","nullSafeShortName":"595","shortName":"595","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/595"},{"agencyId":"40","color":"2b376e","description":"","id":"40_596","longName":"Bonney Lake - Sumner","nullSafeShortName":"596","shortName":"596","textColor":"ffffff","type":3,"url":"https://www.soundtransit.org/596"},{"agencyId":"40","color":"2B376E","description":"Woodinville - Roosevelt Link Station","id":"40_100232","longName":"Woodinville - Seattle","nullSafeShortName":"522","shortName":"522","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/522"},{"agencyId":"40","color":"2B376E","description":"Redmond - Seattle","id":"40_100236","longName":"Redmond - Seattle","nullSafeShortName":"545","shortName":"545","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/545"},{"agencyId":"40","color":"28813F","description":"1 Line runs between Northgate Station and Angle Lake Station seven days a week","id":"40_100479","longName":"Northgate - Angle Lake","nullSafeShortName":"1 Line","shortName":"1 Line","textColor":"FFFFFF","type":0,"url":"https://www.soundtransit.org/1"},{"agencyId":"40","color":"007CAD","description":"2 Line runs between South Bellevue Station and Redmond Tech Station seven days a week","id":"40_2LINE","longName":"South Bellevue - Redmond Tech Station","nullSafeShortName":"2 Line","shortName":"2 Line","textColor":"FFFFFF","type":0,"url":"https://www.soundtransit.org/2"},{"agencyId":"40","color":"2B376E","description":"Issaquah - Seattle","id":"40_100240","longName":"Issaquah - Seattle","nullSafeShortName":"554","shortName":"554","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/554"},{"agencyId":"40","color":"2B376E","description":"Bellevue - Seattle","id":"40_100239","longName":"Bellevue - Seattle","nullSafeShortName":"550","shortName":"550","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/550"},{"agencyId":"40","color":"2B376E","description":"Issaquah-University District","id":"40_100451","longName":"Issaquah - Northgate","nullSafeShortName":"556","shortName":"556","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/556"},{"agencyId":"40","color":"F38B00","description":"T Line runs between Tacoma Dome Station and St Joseph Station seven days a week","id":"40_TLINE","longName":"Tacoma Dome - St Joseph","nullSafeShortName":"T Line","shortName":"T Line","textColor":"000000","type":0,"url":"https://www.soundtransit.org/T"},{"agencyId":"40","color":"2B376E","description":"","id":"40_510","longName":"Everett - Seattle","nullSafeShortName":"510","shortName":"510","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/ride-with-us/routes-schedules/510"},{"agencyId":"40","color":"2B376E","description":"","id":"40_512","longName":"Everett - Northgate Station","nullSafeShortName":"512","shortName":"512","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/ride-with-us/routes-schedules/512"},{"agencyId":"40","color":"2B376E","description":"","id":"40_513","longName":"Seaway Transit Ctr - Northgate Station","nullSafeShortName":"513","shortName":"513","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/ride-with-us/routes-schedules/513"}],"references":{"agencies":[{"disclaimer":"","email":"main@soundtransit.org","fareUrl":"https://www.soundtransit.org/ride-with-us/how-to-pay/fares","id":"40","lang":"en","name":"Sound Transit","phone":"1-888-889-6368","privateService":false,"timezone":"America/Los_Angeles","url":"https://www.soundtransit.org"}],"routes":[],"situations":[],"stopTimes":[],"stops":[],"trips":[]}},"text":"OK","version":2}
Request Parameters
id
- the id of the agency, encoded directly in the URL:http://api.pugetsound.onebusaway.org/api/where/routes-for-agency/[ID GOES HERE].xml
Response
Returns a list of all route ids for routes served by the specified agency. See the full description for the <route/>
element.