1. Get your key
- Open the magic link in your email, or request a new one at the developer portal sign-in.
- In the portal, choose Issue key or Regenerate.
- Copy the key when it is shown. We hash it immediately and cannot show the full value again.
A key looks like sxlf_live_ followed by a long random string. Treat it like a password. Do not put it in frontend JavaScript, public repos, screenshots, or chat.
2. Put it in the X-API-Key header
Every request must send the key in the X-API-Key HTTP header. Query-string keys are not accepted (they leak in logs and Referer headers).
X-API-Key: sxlf_live_your_key_here
3. Make your first request
Call the lane rates endpoint with origin, destination, and optional equipment. Use POST or GET. The live URL is:
https://stretchxlfreight.com/api/?endpoint=api/lane_rates
The same handler also answers at /stretch-crm/api/?endpoint=api/lane_rates.
curl
curl -X POST 'https://stretchxlfreight.com/api/?endpoint=api/lane_rates' \
-H 'X-API-Key: $SXLF_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"origin_city": "Atlanta",
"origin_state": "GA",
"dest_city": "Miami",
"dest_state": "FL",
"equipment": "van"
}'
JavaScript (Node)
const res = await fetch(
'https://stretchxlfreight.com/api/?endpoint=api/lane_rates',
{
method: 'POST',
headers: {
'X-API-Key': process.env.SXLF_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
origin_city: 'Atlanta',
origin_state: 'GA',
dest_city: 'Miami',
dest_state: 'FL',
equipment: 'van',
}),
}
);
const json = await res.json();
if (!json.success) throw new Error(json.message || 'lookup failed');
console.log(json.data.per_mile, json.data.quota);
Python
import os, requests
r = requests.post(
'https://stretchxlfreight.com/api/?endpoint=api/lane_rates',
headers={'X-API-Key': os.environ['SXLF_API_KEY']},
json={
'origin_city': 'Atlanta',
'origin_state': 'GA',
'dest_city': 'Miami',
'dest_state': 'FL',
'equipment': 'van',
},
timeout=10,
)
r.raise_for_status()
data = r.json()['data']
print(data['per_mile'], data['quota'])
4. Parameters
| Name | Required | Notes |
|---|---|---|
origin_city | Yes | Case-insensitive, e.g. Atlanta |
origin_state | Yes | 2-letter USPS code, e.g. GA |
dest_city | Yes | Case-insensitive |
dest_state | Yes | 2-letter USPS code |
equipment | No | van, reefer, flatbed, step_deck, hotshot, power_only. Omit for any. |
5. Response shape
Successful responses are JSON with success: true and a data object:
{
"success": true,
"data": {
"lane": {
"origin": "Atlanta, GA",
"destination": "Miami, FL",
"equipment": "van"
},
"samples": 48,
"rate": { "median": 3450, "low": 3200, "high": 3600 },
"per_mile": { "median": 2.45, "low": 2.20, "high": 2.70 },
"distance_avg": 662,
"data_freshness": {
"newest_load": "2026-11-10T20:30:31+00:00",
"cache_fetched": "2026-11-11 07:15:00"
},
"is_estimate": false,
"tier": "free",
"quota": {
"daily_quota": 100,
"daily_used": 1,
"daily_remaining": 99,
"monthly_quota": 3000,
"monthly_used": 1,
"monthly_remaining": 2999
},
"fetched_at": "2026-11-11T12:15:00+00:00"
}
}
When no live loads match the lane in the last 24 hours, is_estimate is true, rate may be null, and per_mile is a national bucket for that equipment.
6. Quotas and rate limits
| Plan | Daily | Monthly |
|---|---|---|
| Free | 100 | 3,000 |
| Starter | 500 | 5,000 |
| Pro | 5,000 | 50,000 |
| Enterprise | 50,000 | 1,500,000 |
Quota counters increment only on accepted, authenticated requests. Exceeding a quota returns 429. Invalid or revoked keys do not consume quota.
7. Error codes
| HTTP | When |
|---|---|
| 400 | Missing origin/destination fields. Need origin_city, origin_state, dest_city, dest_state |
| 401 | Missing, invalid, or revoked API key. |
| 403 | Key is suspended, or the key is not entitled to this endpoint. |
| 429 | Daily or monthly quota exceeded, or too many invalid-key attempts from one IP. |
{ "success": false, "message": "Invalid or revoked API key", "data": null }
8. How to regenerate or revoke
- Sign in at the developer portal with a login link sent to your email.
- Regenerate creates a new key and immediately revokes the old one. Update your integration before you drop the new value — we only show the full key once.
- Revoke disables a key immediately. Later requests with that key return 401.