Authentication
All API endpoints require authentication using API keys generated from your dashboard.
Note: You must generate an API key from your dashboard to use the API.
How it works:
- Login to your dashboard
- Generate a new API key from the API Keys section
- Include the API key as a query parameter in your requests
- The API validates your key and tracks usage automatically
API Key Usage:
- Query Parameter:
?key=YOUR_API_KEY - Header:
X-API-Key: YOUR_API_KEY
cURL Example:
curl "https://api.thecarrierinfo.com/api/search/legal_name?q=HAMILTON&key=YOUR_API_KEY"
JavaScript Example:
fetch('https://api.thecarrierinfo.com/api/search/legal_name?q=HAMILTON&key=YOUR_API_KEY')
.then(res => res.json())
.then(data => console.log(data));
Search API
Powerful search functionality across all column names with pagination and API usage statistics.
Endpoint:
GET /api/search/:column?q=query&key=YOUR_API_KEY
Parameters:
:column- Column name to search in (optional)q- Search query (required)page- Page number (default: 1)limit- Results per page (default: 20, max: 20)key- Your API key (required)
Rate Limiting
To ensure fair usage, we implement rate limiting on all endpoints.
General API
10,000
requests per 15 minutes
Search Operations
1,000
requests per 15 minutes
Error Handling
All API responses follow a consistent error format.
Error Response Format:
{
"success": false,
"error": "Error message description"
}
HTTP Status Codes:
| Status | Description | Common Causes |
|---|---|---|
200 |
Success | Request completed successfully |
400 |
Bad Request | Missing parameters or invalid format |
401 |
Unauthorized | Invalid or missing API key |
404 |
Not Found | Requested resource not found |
429 |
Too Many Requests | Rate limit exceeded |
500 |
Internal Server Error | Server-side error |
MC Endpoints
Direct access to MC (Motor Carrier) information from our comprehensive database.
Search by MC ID
Search for MC information using the database ID.
GET /mc/:id?key=YOUR_API_KEY
/mc/12345?key=abc123def456
Search by MC Number
Search using the actual MC number.
GET /mc/number/:mc?key=YOUR_API_KEY
/mc/number/1234567?key=abc123
USDOT Endpoints
Access USDOT (U.S. Department of Transportation) information for carriers.
Endpoint:
GET /api/usdot/:usdot?key=YOUR_API_KEY
Example Request:
curl "https://api.thecarrierinfo.com/api/usdot/2952744?key=YOUR_API_KEY"
Company Endpoints
Comprehensive company information including history, inspections, accidents, and more.
Company Details
GET /api/company/:id?key=YOUR_API_KEY
Company History
GET /api/company/:id/history?key=YOUR_API_KEY
Inspections
GET /api/company/:id/inspections?key=YOUR_API_KEY
Accidents
GET /api/company/:id/accidents?key=YOUR_API_KEY
Violations
GET /api/company/:id/violations?key=YOUR_API_KEY
Financial
GET /api/company/:id/financial?key=YOUR_API_KEY
Health Check
Check the status and health of the API service.
GET /api/health
Example Response:
{
"success": true,
"status": "healthy",
"timestamp": "2024-01-20T10:30:00Z",
"version": "1.0.0"
}
Need Help?
Contact our technical team for personalized assistance.