Skip To Main Content
U.S. Department of Transportation Federal Motor Carrier Safety Administration

API Documentation

SaferBus API

The SaferBus API is a RESTful service API provided by FMCSA for the purpose of making available, the safety performance data of U.S. Department of Transportation (U.S. DOT) registered bus companies. The primary goal is to encourage the development of products, tools or services that can help consumers more easily check the safety record of bus companies to avoid those that have been placed out of service or those that do not have the proper operating authority.

The SaferBus API provides the company’s Compliance, Safety and Accountability (CSA) performance in the form of the Behavior Analysis and Safety Improvement Categories (BASICs):Unsafe Driving, Fatigued Driving, Driver Fitness, Controlled Substances and Alcohol, and Vehicle Maintenance. Knowing a company’s safety performance record may impact which company a consumer chooses for their trip. More information on CSA and the BASICs can be found here http://csa.fmcsa.dot.gov/about/BASICs.aspx

SaferBus API Services

The SaferBus API provides safety data in response to five different input parameters:

  1. Carrier Name (Legal Name or DBA Name)
  2. Carrier's unique U.S. DOT number
  3. Carrier's motor carrier Motor Carrier (MC) Number.
  4. Carrier's Registered State Code
  5. Carrier's Registered Zip Code

A list of Carrier Type filter Codes: Any combination of codes can be used for filtering. See table below for example

  1. Motor Coaches (MC)
  2. School Buses (SB)
  3. Limousines (LIMO)
  4. Mini-Buses (MB)
  5. VAN (VAN)

API Access information

  • All access to the API requires an API key at the end as a query parameter, seeAccess Requirements
  • All API return data is in XML or JSON format. The default response is XML, for JSON , for JSON append .json extension at the end of the URL before query parameters.
  • When the API returns data on more than one carrier, data is limited to the first 25 carriers. Please use query parameter start?number to get segmented result.

API URL

The path for all API resources must start with: https://mobile.fmcsa.dot.gov/saferbus/resource/v1/ The following are the Endpoints

EndPoint Name Optional Query Parameters Result Limit Example
/carriers/{company_name} start=number, size=number, carrierType=MC,MB,VAN,SB,LIMO 25 /carriers/greyhound{.xml|.json}?carrierType=MB,VAN&start=1&size=10& webKey=jk+k...
/carrier/{DOT #} N/A N/A /carrier/44110{.xml|.json}?webKey=jk+k...
/carrier/{MC #}/mc N/A N/A /carrier/1515/mc{.xml|.json}?webKey=jk+k...
carriers/zipcode/{zipcode} start=number, size=number, carrierType=MC,MB,VAN,SB,LIMO 25 /carriers/zipcode/02142{.xml|.json}?carrierType=MB,VAN,SB&?start=26&size=25&webKey=jk+k..
carriers/state/{statecode} start=number, size=number, carrierType=MC,MB,VAN,SB,LIMO 25 carriers/state/MA{.xml|.json}?carrierType=MC,MB,VAN,SB,LIMO&start=26&size=25&webKey=jk+k..
/carriers/not_allowed_to_operate start=number, size=number; 25 /carriers/not_allowed_to_operate?start=26&size=25&webKey=jk+k..

API Response XML - Example

The following example of a REST URL provides three methods of accessing the same resource:

Sample Response

  1. Carrier response data description
  2. Carrier XML sample
  3. Carrier BASIC Measure XML sample

Error Codes

Possible error codes returned in case of errors such as authentication or other data request errors:

  • 401 Unauthorized
  • Bad request 400
  • Not found 404
  • 405 Method Not Allowed/Bad request
  • General Application Exception
  • Entity Not found Exception/ Requested input is not found

Sample ErrorCode

<errorMessage><errorCode>401</errorCode><errorMessage>Request is Unauthorized</errorMessage><errorType>Bad Credentials</errorType></errorMessage>

Feedback | Privacy Policy | USA.gov | Freedom of Information Act (FOIA) | Accessibility | OIG Hotline | Web Policies and Important Links | Site Map | Plug-ins

Federal Motor Carrier Safety Administration
1200 New Jersey Avenue SE, Washington, DC 20590 • 1-800-832-5660 • TTY: 1-800-877-8339 • Field Office Contacts