When a truck arrives at a facility or appears in an inspection record, a license plate and state may be the only identifiers you have. By the end of this guide, you can use those values to look up carrier information, read the returned inspection data, and add the lookup to a Python application.
The Motor Carrier Search API searches for the company associated with a license plate and can return company details, inspections, crashes, and other carrier data. It also provides searches by USDOT number and company name, which are useful when a workflow starts with a different identifier.
Getting started on Zyla API Hub
Open the Motor Carrier Search API listing on Zyla API Hub. Create a free account if you do not already have one, then click Subscribe or Start Free Trial when available and get an API key.
Access uses a subscription and quota model, not pay-per-call billing. The first API has a 7-day trial or 50 requests; check the API page for current access options and pricing. The Hub has more than 10,000 public APIs, accessible through one account and API key.
Send the key in the Authorization header as Bearer YOUR_API_KEY. Keep the key on your server rather than embedding it in a browser or mobile client.
Available search endpoints
Search By License Plate
Use this endpoint when your starting point is a vehicle plate. Both parameters are required strings: Plate is the plate number, and State is its state.
Method: GET
URL: https://zylalabs.com/api/350/motor-carrier-search-api/279/search-by-license-plate
This request searches for plate AF60214 in PA. Replace YOUR_API_KEY with your Hub key before running it.
curl -s -X GET "https://zylalabs.com/api/350/motor-carrier-search-api/279/search-by-license-plate?Plate=AF60214&State=PA" \
-H "Authorization: Bearer YOUR_API_KEY"
The parameter names are case-sensitive in the example: use Plate and State, not variations of those names. Keep the plate and state together in your application because both are needed to construct this lookup.
Search By DOT Number
When you already have a USDOT number, use this endpoint to retrieve company data. Its required string parameter is DOT_NUMBER; the documented example value is 4259214.
Method: GET
URL: https://zylalabs.com/api/350/motor-carrier-search-api/280/search-by-dot-number
A DOT lookup is a separate request from a plate lookup. The documented DOT response places MCC_INFO at the top level, whereas the plate example places it inside an item in Data. Parse each endpoint according to its own response rather than sharing an assumed object path.
Search By Name
Use this endpoint to find trucking companies related to a search term. Its required string parameter is LEGAL_NAME; the documented example value is WIND.
Method: GET
URL: https://zylalabs.com/api/350/motor-carrier-search-api/281/search-by-name
A name search is useful when an operator has a company name but no plate or USDOT number. Present the returned companies for review rather than automatically treating a name match as the intended carrier.
Read the plate lookup response
The listing provides the following response excerpt for the plate request. It is cut off during the second inspection record, so it is not a complete JSON document; use the actual API response when testing a JSON parser.
{"Code":200,"Description":"OK","Data":[{"MCC_INFO":{"DOT_NUMBER":"1398624","LEGAL_NAME":"DMP TRUCKING INC","DBA_NAME":"","CARRIER_OPERATION":"Interstate","HM_FLAG":"No","PC_FLAG":"No","PHY_STREET":"1043 SCHULTZ RD","PHY_CITY":"EAST NORRITON","PHY_STATE":"PA","PHY_ZIP":"19403","PHY_COUNTRY":"US","MAILING_STREET":"PO BOX 121","MAILING_CITY":"EAGLESVILLE","MAILING_STATE":"PA","MAILING_ZIP":"19408","MAILING_COUNTRY":"US","TELEPHONE":"(610) 304-0341","FAX":"(610) 279-1252","EMAIL_ADDRESS":"[email protected]","MCS150_DATE":"04-DEC-23","MCS150_MILEAGE":"90000","MCS150_MILEAGE_YEAR":"2021","ADD_DATE":"25-JUL-05","OIC_STATE":"PA","NBR_POWER_UNIT":"1","DRIVER_TOTAL":"1"},"SMS_AB_Pass_Property":{"DOT_NUMBER":"1398624","INSP_TOTAL":"2","DRIVER_INSP_TOTAL":"2","DRIVER_OOS_INSP_TOTAL":"0","VEHICLE_INSP_TOTAL":"0","VEHICLE_OOS_INSP_TOTAL":"0","UNSAFE_DRIV_INSP_W_VIOL":"0","UNSAFE_DRIV_MEASURE":"0","UNSAFE_DRIV_AC":"N","HOS_DRIV_INSP_W_VIOL":"0","HOS_DRIV_MEASURE":"0","HOS_DRIV_AC":"N","DRIV_FIT_INSP_W_VIOL":"0","DRIV_FIT_MEASURE":"0","DRIV_FIT_AC":"N","CONTR_SUBST_INSP_W_VIOL":"0","CONTR_SUBST_MEASURE":"0","CONTR_SUBST_AC":"N","VEH_MAINT_INSP_W_VIOL":"0","VEH_MAINT_MEASURE":"0","VEH_MAINT_AC":"N"},"SMS_C_Pass_Property":null,"SMS_AB_Pass":null,"SMS_C_Pass":null,"Inspection":[{"UNIQUE_ID":"710252523","REPORT_NUMBER":"M302316448","REPORT_STATE":"PA","DOT_NUMBER":"1398624","INSP_DATE":"13-JUN-23","INSP_LEVEL_ID":"3","COUNTY_CODE_STATE":"PA","TIME_WEIGHT":"1","DRIVER_OOS_TOTAL":"0","VEHICLE_OOS_TOTAL":"0","TOTAL_HAZMAT_SENT":"0","OOS_TOTAL":"0","HAZMAT_OOS_TOTAL":"0","HAZMAT_PLACARD_REQ":"","UNIT_TYPE_DESC":"STRAIGHT TRUCK","UNIT_MAKE":"KW","UNIT_LICENSE":"AF60214","UNIT_LICENSE_STATE":"PA","VIN":"1NKWXPTX1KJ245229","UNIT_DECAL_NUMBER":"","UNIT_TYPE_DESC2":"","UNIT_MAKE2":"","UNIT_LICENSE2":"","UNIT_LICENSE_STATE2":"","VIN2":"","UNIT_DECAL_NUMBER2":"","UNSAFE_INSP":"Y","FATIGUED_INSP":"Y","DR_FITNESS_INSP":"Y","SUBT_ALCOHOL_INSP":"Y","VH_MAINT_INSP":"","HM_INSP":"","BASIC_VIOL":"0","UNSAFE_VIOL":"0","FATIGUED_VIOL":"0","DR_FITNESS_VIOL":"0","SUBT_ALCOHOL_VIOL":"0","VH_MAINT_VIOL":"0","HM_VIOL":"0"},{"UNIQUE_ID":"726851412","REPORT_NUMBER":"M319403356","REPORT_STATE":"PA","DOT_NUMBER":"1398624","INSP_DATE":"02-FEB-24","INSP_LEVEL_ID":"3","COUNTY_CODE_STATE":"PA","TIME_WEIGHT":"2","DRIVER_OOS_TOTAL":"0","VEHICLE_OOS_TOTAL":"0","TOTAL_HAZMAT_SENT":"0","OOS_TOTAL":"0","HAZMAT_OOS_TOTAL":"0","HAZMAT_PLACARD_REQ":"","UNIT_TYPE_DESC":"STRAIGHT TRUCK","UNIT_MAKE":"KW","UNIT_LICEN…
In this example, Code and Description describe the response, and Data contains carrier records. Within a record, MCC_INFO contains the legal name, DOT number, operation, addresses, and contact fields. Inspection contains inspection records; the first shown includes a report number, inspection date, plate, and state.
Several values that look numeric are JSON strings, including DOT_NUMBER, INSP_TOTAL, and MCS150_MILEAGE. Preserve identifiers as strings and convert quantities deliberately if your application needs arithmetic. The example also contains empty strings and null safety sections, so avoid assuming every field has a usable value.
Dates such as INSP_DATE and MCS150_DATE appear as date strings in the example, not timestamps with time zones. Keep the source value alongside any normalized date your application derives.
Call the plate endpoint from Python
This example uses Python’s standard library and the same URL and parameters as the curl request. It reads the carrier identity and the inspection report numbers returned in Data.
import json
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = (
"https://zylalabs.com/api/350/motor-carrier-search-api/"
"279/search-by-license-plate?Plate=AF60214&State=PA"
)
request = Request(
url,
headers={"Authorization": "Bearer YOUR_API_KEY"},
method="GET",
)
try:
with urlopen(request, timeout=30) as response:
payload = json.load(response)
except HTTPError as exc:
raise SystemExit(f"HTTP request failed: {exc.code}") from exc
except URLError as exc:
raise SystemExit(f"Request failed: {exc.reason}") from exc
except (TimeoutError, json.JSONDecodeError) as exc:
raise SystemExit(f"Could not read response: {exc}") from exc
records = payload.get("Data") or []
for record in records:
company = record.get("MCC_INFO") or {}
print("Company:", company.get("LEGAL_NAME"))
print("DOT number:", company.get("DOT_NUMBER"))
for inspection in record.get("Inspection") or []:
print(
"Inspection:",
inspection.get("REPORT_NUMBER"),
inspection.get("INSP_DATE"),
)
Replace the key before running the sample. For an application, load it from your server’s secret storage instead of committing it to source control. The timeout is an application-side choice; handle a timeout or request failure separately from a successful response that contains no records.
The loop handles multiple items in Data and treats a missing or null Inspection value as an empty list. If you display contact or vehicle information, show the source fields you actually received and let the user review them before taking action.
Build a useful workflow
For a gate check-in, collect the plate and state together and show the returned LEGAL_NAME and DOT_NUMBER to the operator. If inspection records are present, display their REPORT_NUMBER and INSP_DATE as supporting context rather than reducing the entire record to a single status.
For carrier onboarding, a reviewer can start with the plate lookup and compare the returned company and address fields with the information supplied by the carrier. Where a USDOT number is already available, the DOT endpoint gives the reviewer another way to retrieve company data.
For an internal research tool, keep the search inputs with the result so a reviewer can see which plate and state produced it. Treat a stored result as a snapshot: the example includes dated carrier and inspection information, so decide when your workflow should request it again rather than assuming a past response is current.
Use the API from an AI agent
Zyla API Hub also exposes APIs to compatible agents through MCP. Configure Claude Code, Cursor, Windsurf, or another MCP-compatible client with https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY, replacing the placeholder with your key.
An agent can use the plate and state supplied by a user to perform the lookup and summarize returned carrier and inspection fields. Require the agent to distinguish an actual returned value from a missing field, and review its output before using it for an operational decision.
FAQ
What do I need to search by license plate?
Provide both required string parameters, Plate and State, to the Search By License Plate GET endpoint. Authenticate with your Zyla API key in the bearer authorization header.
Can I search for a carrier without a plate?
Yes. Search By DOT Number accepts DOT_NUMBER, and Search By Name accepts LEGAL_NAME. Both are GET endpoints, but their response structures should be handled separately from the plate response.
Does every response contain inspection information?
The plate example includes an Inspection array, but applications should handle missing, empty, or null values defensively. The example also shows null safety sections and empty strings in some company fields.
How is access billed?
The Hub uses subscriptions and quotas rather than pay-per-call billing. The first API has a 7-day trial or 50 requests; check the listing for current access options and pricing.
Ready to run the plate lookup? Create your free Zyla API Hub account, get an API key, and Start 7-day trial on Motor Carrier Search API.