Developer Reference
Unified Locations
One endpoint to look up carrier terminals across every US carrier at once - ABF, Central Transport, Estes, Saia, TForce, GLS, SEKO, and USPS - by ZIP code, city, or state. Returns a single normalized shape, and when an exact ZIP has no match it automatically falls back to the nearest locations. Bills one API call, open to every plan.
/api/locations
Search All Carriers
Provide at least one of zip, city, or state. Optional radius (miles, max 100) forces a nearby search; carriers (csv) restricts the fan-out. When an exact ZIP has no match, the search automatically falls back to the nearest terminals.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
zip
optional
|
string
|
5-digit US ZIP code |
city
optional
|
string
|
City name (pair with state for best results) |
state
optional
|
string
|
2-letter state code (e.g. GA) |
radius
optional
|
integer
|
Miles (1-100). Forces a nearby search around the resolved point. |
carriers
optional
|
string
|
Comma-separated carrier ids to restrict the fan-out (e.g. saia,usps) |
Response Fields
| Field | Type | Description |
|---|---|---|
success
|
boolean
|
Indicates whether the request succeeded |
query
|
object
|
The query parameters echoed back |
resolved
|
object
|
Canonical { city, state, lat, lng, zip } for the queried ZIP |
matchType
|
string
|
exact, nearby, or none |
total
|
integer
|
Total number of terminals returned |
carriers
|
array
|
Carrier ids that returned results |
byCarrier
|
object
|
Results grouped by carrier id |
results
|
array
|
Flat list of all matching terminals |
results[].carrier
|
string
|
Carrier id |
results[].carrierName
|
string
|
Carrier display name |
results[].name
|
string
|
Terminal / office name (may be null per carrier) |
results[].city / state / zip
|
string
|
Location of the terminal |
results[].lat / lng
|
number
|
Coordinates where the carrier provides them, else null |
results[].distanceMiles
|
number
|
Distance from the queried point; set for nearby rows |
results[].match
|
string
|
exact or nearby |
Code Examples
curl "https://freightapis.dev/api/locations?zip=30301" \
-H "Authorization: Bearer YOUR_API_KEY"
/api/locations/which-carriers
Which Carriers Serve a Location
Instead of raw terminal rows, get a coverage answer: which carriers serve a zip (or city+state), each tagged direct (terminal on the ZIP) or nearby. Add radius (miles, max 100) to count nearby terminals as coverage. notServedBy lists carriers with no coverage so you don’t have to diff the list yourself.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
zip
optional
|
string
|
5-digit US ZIP code |
city
optional
|
string
|
City name (pair with state) |
state
optional
|
string
|
2-letter state code |
radius
optional
|
integer
|
Miles (1-100). Counts nearby terminals as coverage. |
Response Fields
| Field | Type | Description |
|---|---|---|
success
|
boolean
|
Indicates whether the request succeeded |
query
|
object
|
The query parameters echoed back |
resolved
|
object
|
Canonical { city, state, lat, lng } for the queried point |
served
|
boolean
|
Whether any carrier serves the location |
carrierCount
|
integer
|
Number of carriers that serve the location |
carriers
|
array
|
Carriers that serve the location |
carriers[].carrier
|
string
|
Carrier id |
carriers[].name
|
string
|
Carrier display name |
carriers[].serviceType
|
string
|
direct or nearby |
carriers[].nearestTerminal
|
object
|
{ name, city, state, zip, distanceMiles } |
notServedBy
|
array
|
Carrier ids with no coverage of the location |
Code Examples
curl "https://freightapis.dev/api/locations/which-carriers?zip=30301&radius=25" \
-H "Authorization: Bearer YOUR_API_KEY"
/api/locations/can-reach
Can a Carrier Reach a Location
A boolean answer for one carrier. Required carrier (id, e.g. saia) plus zip or city+state. radius defaults to 25 miles (this is a "can it get there" check). When canReach is false, alternatives lists carriers that can reach the location, sorted nearest-first - turn a "no" into a re-route.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
carrier
required
|
string
|
Carrier id to check (e.g. saia) |
zip
optional
|
string
|
5-digit US ZIP code |
city
optional
|
string
|
City name (pair with state) |
state
optional
|
string
|
2-letter state code |
radius
optional
|
integer
|
Miles. Defaults to 25. |
Response Fields
| Field | Type | Description |
|---|---|---|
success
|
boolean
|
Indicates whether the request succeeded |
carrier
|
string
|
The queried carrier id |
carrierName
|
string
|
Carrier display name |
query
|
object
|
The query parameters echoed back |
resolved
|
object
|
Canonical { city, state, lat, lng } for the queried point |
canReach
|
boolean
|
Whether the carrier can reach the location |
serviceType
|
string
|
direct, nearby, or none |
nearestTerminal
|
object
|
Nearest terminal { name, city, state, zip, distanceMiles }, or null |
alternatives
|
array
|
Other carriers that can reach the location (nearest-first) when canReach is false |
Code Examples
curl "https://freightapis.dev/api/locations/can-reach?carrier=saia&zip=30301" \
-H "Authorization: Bearer YOUR_API_KEY"
/api/locations/batch
Batch ZIP Lookup
Resolve up to 20 ZIP codes (50 for Enterprise) across all carriers in one request.
Request Body
| Parameter | Type | Description |
|---|---|---|
zips
required
|
string[]
|
Array of 5-digit ZIP codes. Max 20 for Pro, 50 for Enterprise. |
Response Fields
| Field | Type | Description |
|---|---|---|
success
|
boolean
|
Indicates whether the request succeeded |
count
|
integer
|
Number of ZIPs resolved |
maxPerRequest
|
integer
|
Maximum ZIPs allowed for the current plan |
results
|
array
|
One entry per requested ZIP |
results[].zip
|
string
|
The requested ZIP |
results[].resolved
|
object
|
Canonical city/state/coords for the ZIP |
results[].matchType
|
string
|
exact, nearby, or none |
results[].total
|
integer
|
Total terminals for the ZIP |
results[].byCarrier
|
object
|
Results grouped by carrier id |
Code Examples
curl -X POST "https://freightapis.dev/api/locations/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"zips": ["30301", "01104"]}'
/api/locations/geocode
Geocode a ZIP
Resolve a US ZIP to coordinates plus canonical city/state - the same geocoder the nearby fallback uses.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
zip
required
|
string
|
5-digit US ZIP code |
Response Fields
| Field | Type | Description |
|---|---|---|
success
|
boolean
|
Indicates whether the request succeeded |
zip
|
string
|
The requested ZIP |
found
|
boolean
|
Whether the ZIP resolved to a known location |
location
|
object
|
{ lat, lng, city, state, zip }, or null if not found |
Code Examples
curl "https://freightapis.dev/api/locations/geocode?zip=30301" \
-H "Authorization: Bearer YOUR_API_KEY"
Unified Locations API - FAQ
How do I look up carrier terminals across all carriers at once?
Call GET /api/locations with a zip, city, or state parameter. FreightAPIs fans the query out across every supported US carrier (ABF, Central Transport, Estes, Saia, TForce, GLS, SEKO, USPS) and returns one normalized response grouped by carrier. It bills a single API call.
What does the nearby fallback do?
When an exact ZIP has no carrier terminal, /api/locations geocodes the ZIP and returns the nearest terminals within a radius, each tagged with its distance in miles, so an empty ZIP still yields useful results. You can also force it with the radius parameter.
How do I find which carriers serve a ZIP code?
Call GET /api/locations/which-carriers?zip=30301. It returns a coverage answer - the carriers that serve the ZIP (each tagged direct or nearby) plus a notServedBy list - instead of raw terminal rows. Add radius to count nearby terminals as coverage.
How do I check if a specific carrier can reach a ZIP code?
Call GET /api/locations/can-reach?carrier=saia&zip=30301. It returns a boolean canReach plus the nearest terminal, defaulting to a 25-mile reach check. When the answer is no, it also returns alternatives - other carriers that can reach the location, nearest first.
Is the unified locations endpoint Pro-only?
No. /api/locations and its which-carriers and can-reach coverage endpoints are open to every plan including the Free tier, like the other carrier-location and seaport endpoints. Plans differ only by monthly call quota.