freightapis (Python)
Tiny client for FreightAPIs — NMFC freight classification, multi-carrier terminal locations, global seaports, and shipment tracking. Uses requests if installed, else the stdlib (zero required dependencies).
pip install freightapis
Usage
import os
from freightapis import FreightAPIs
fa = FreightAPIs(os.environ["FREIGHTAPIS_KEY"])
# Carrier locations
ga = fa.carrier_by_state_or_zip("estes", state="GA")
search = fa.carrier_search("saia", "atlanta")
cov = fa.carrier_coverage("abf", state="AR")
batch = fa.carrier_batch("usps", {"states": ["NY", "NJ"]})
# Seaports
cn = fa.ports_by_country("CN")
sh = fa.port("CNSHA")
near = fa.ports_nearby(31.2, 121.5, radius=200)
cosco = fa.ports_by_company("COSCO")
# Shipment tracking (Starter plan and up)
carriers = fa.track_carriers() # which carriers, which number types
load = fa.track("uber-freight", "123456789", type="load")
print(load["shipments"][0]["status"]) # "in_transit", "delivered", …
many = fa.track_batch([{"carrier": "tql", "ref": "38996062"}])
# NMFC classification (Pro plan)
cls = fa.nmfc_search("furniture")
art = fa.article("63321")
dens = fa.density({
"dimensionType": "Inch", "weightType": "Pound", "resultUnitType": "PoundsPerCubicFeet",
"unitDimensions": [{"HandlingUnitCount": 1, "length": 48, "width": 40, "height": 48, "handlingUnitWeight": 500}],
})
# Any endpoint not covered by a helper:
days = fa.request("GET", "/api/abf-location/service-days", query={"zip": "72401"})
Errors
Non-2xx responses raise FreightAPIError with .status and .body:
from freightapis import FreightAPIError
try:
fa.article("does-not-exist")
except FreightAPIError as e:
print(e.status, e.body)
API reference: https://freightapis.dev/docs · MIT licensed.
Metadata
Release files for freightapis 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| freightapis-1.1.0.tar.gz | 4.9 kB | Without provenance | Details for freightapis-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| freightapis-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for freightapis-1.1.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / freightapis-1.1.0.tar.gz
| Download URL | freightapis-1.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07e3a84af4929e60be9aba816f86fd2fc84a2eed50dcde9e0ea9afa04622761a
|
|
BLAKE2b-256 checksum How to use checksums |
1e4c60fd25d813fff804f9a05af13c5ba27848d974134adf05cd8a84ec39c96d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.7
|
Release files / freightapis-1.1.0-py3-none-any.whl
| Download URL | freightapis-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5a024d7e23e075643d4fd32aa130b2dec144ee79977bb75214ba11d3e3c9cc3
|
|
BLAKE2b-256 checksum How to use checksums |
68c8411b6a7eb800650ccfb34357629e16656afc00238946c715ad6f1bcfa609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.7
|
Security for freightapis 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.