AlphaLoops Freight CLI
Command-line interface for the AlphaLoops FMCSA API. Look up carriers, fleet data, inspections, crashes, and contacts from your terminal.
Built on the AlphaLoops Freight SDK.
Installation
pip install alphaloops-freight-cli
Authentication
# Option 1: Save your key
loopsh login ak_your_key_here
# Option 2: Environment variable
export ALPHALOOPS_API_KEY=ak_your_key_here
# Option 3: Pass it directly
loopsh --api-key ak_... carriers get 2247505
Get your API key at runalphaloops.com.
Usage
Carrier Profiles
# Look up by DOT number
loopsh carriers get 2247505
# Look up by MC number
loopsh carriers mc 624748
# Field projection
loopsh carriers get 2247505 --fields legal_name,total_trucks,total_drivers
# Fuzzy search
loopsh carriers search "Swift Transportation"
loopsh carriers search "JB Hunt" --state AR --limit 5
# Authority history
loopsh carriers authority 2247505
# News
loopsh carriers news 2247505 --start-date 2025-01-01
Fleet Data
loopsh fleet trucks 2247505
loopsh fleet trucks 2247505 --limit 200
loopsh fleet trailers 2247505
Inspections
loopsh inspections list 2247505
loopsh inspections violations INS-12345
Crashes
loopsh crashes list 2247505
loopsh crashes list 2247505 --severity FATAL --start-date 2024-01-01
Contacts
# Search for people
loopsh contacts search --dot 2247505
loopsh contacts search --company "Swift" --levels c_suite,vp
# Enrich a contact (1 credit)
loopsh contacts enrich contact_id_here
JSON Output
Every command supports --json for machine-readable output:
loopsh --json carriers get 2247505
loopsh --json carriers search "Swift" | jq '.results[].legal_name'
loopsh --json fleet trucks 2247505 | jq '.results | length'
This makes the CLI agent-friendly — pipe to jq, feed into scripts, or use from AI agents.
Examples
# Find a carrier and get their fleet size
loopsh carriers search "Werner Enterprises" --limit 1
loopsh carriers get 2247505 --fields legal_name,total_trucks,total_drivers
# Get all fatal crashes for a carrier
loopsh --json crashes list 2247505 --severity FATAL | jq '.results[]'
# Find C-suite contacts and enrich them
loopsh --json contacts search --dot 2247505 --levels c_suite | jq '.results[].name'
loopsh contacts enrich abc123
# Pipeline: search → get details → get fleet
DOT=$(loopsh --json carriers search "Swift" | jq -r '.results[0].dot_number')
loopsh carriers get "$DOT"
loopsh fleet trucks "$DOT"
All Commands
| Command | Description |
|---|---|
loopsh login <key> |
Save API key to ~/.alphaloops |
loopsh carriers get <dot> |
Carrier profile by DOT number |
loopsh carriers mc <mc> |
Carrier profile by MC number |
loopsh carriers search <name> |
Fuzzy search carriers |
loopsh carriers authority <dot> |
Authority history |
loopsh carriers news <dot> |
News and press mentions |
loopsh fleet trucks <dot> |
Registered trucks |
loopsh fleet trailers <dot> |
Registered trailers |
loopsh inspections list <dot> |
Roadside inspections |
loopsh inspections violations <id> |
Violations for an inspection |
loopsh crashes list <dot> |
Crash history |
loopsh contacts search |
Find contacts at a carrier |
loopsh contacts enrich <id> |
Enrich a contact (email, phone) |
API Documentation
Full API reference: runalphaloops.com/fmcsa-api/docs
License
MIT — see LICENSE for details.
Metadata
Release files for alphaloops-freight-cli 0.4.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 | |
|---|---|---|---|
| alphaloops_freight_cli-0.4.0.tar.gz | 19.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alphaloops_freight_cli-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.9 kB
Release files / alphaloops_freight_cli-0.4.0.tar.gz
| Download URL | alphaloops_freight_cli-0.4.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
296b09bdcbeccc3826166757570941eb7f6d9b959792f29ca75541173b60cb1a
|
|
BLAKE2b-256 checksum How to use checksums |
ff92d9ba35996dc063ce16fea20a72fa470cd09658e6b8d77188eed5c7bd0301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logRelease files / alphaloops_freight_cli-0.4.0-py3-none-any.whl
| Download URL | alphaloops_freight_cli-0.4.0-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e12e3f0d442f8849aaae9ce5c279640c861956932484dd8d6e5aa9506a1ac4ad
|
|
BLAKE2b-256 checksum How to use checksums |
e7b3d23671128b76c899b53560e9e499675e56010e67c3d32fa2f026f096b193
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency log