{"openapi":"3.1.0","info":{"title":"Lane Cost API","version":"1.0.0","description":"US truckload rate estimates for any lane in the lower 48, for 8 truck types, monthly from 2003-12 to 2026-10. Works without a key at 60 requests a minute per IP; a free key from /developers, sent as `Authorization: Bearer <key>`, raises that to 600. Figures are modeled estimates, not quotes or offers to haul freight. Credit Lane Cost where you show them."},"servers":[{"url":"https://lanecost.com/api/v1"}],"externalDocs":{"url":"https://lanecost.com/developers","description":"Guide and examples"},"security":[{},{"apiKey":[]}],"paths":{"/estimate":{"get":{"operationId":"estimateLane","summary":"Estimate a lane","description":"The all-in cost of one full truckload between two places, for every truck type or one. Linehaul plus fuel, standard freight, picked up a few days out.","parameters":[{"name":"origin","in":"query","required":true,"example":"chicago-il","schema":{"type":"string"},"description":"A city and state (`Chicago, IL`, `chicago-il` or `Chicago, Illinois`) or a 5-digit ZIP. A city alone picks the largest of that name. The response says which place was used."},{"name":"destination","in":"query","required":true,"example":"atlanta-ga","schema":{"type":"string"},"description":"A city and state (`Chicago, IL`, `chicago-il` or `Chicago, Illinois`) or a 5-digit ZIP. A city alone picks the largest of that name. The response says which place was used."},{"name":"equipment","in":"query","required":false,"description":"Limit the answer to one truck type. Default: all.","schema":{"type":"string","enum":["dry-van","reefer","flatbed","step-deck","power-only","hotshot","box-truck","sprinter-van"]}},{"name":"month","in":"query","required":false,"description":"Price the lane as of an earlier month, YYYY-MM from 2003-12. Default: the latest month.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"origin":{"type":"object","properties":{"slug":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"}}},"destination":{"type":"object","properties":{"slug":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"}}},"miles":{"type":"integer","description":"Estimated road miles."},"month":{"type":"string"},"estimates":{"type":"array","items":{"type":"object","properties":{"equipment":{"type":"string"},"name":{"type":"string"},"totalUsd":{"type":"number","description":"Expected all-in price."},"lowUsd":{"type":"number"},"highUsd":{"type":"number"},"ratePerMile":{"type":"number"},"linehaulUsd":{"type":"number"},"fuelUsd":{"type":"number"},"transitDays":{"type":"integer"}}}},"url":{"type":"string","description":"The lane's page on the site."}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such place or endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estimate/history":{"get":{"operationId":"estimateLaneHistory","summary":"A lane's monthly history","description":"The same estimate for every month since 2003-12, for one truck type.","parameters":[{"name":"origin","in":"query","required":true,"example":"chicago-il","schema":{"type":"string"},"description":"A city and state (`Chicago, IL`, `chicago-il` or `Chicago, Illinois`) or a 5-digit ZIP. A city alone picks the largest of that name. The response says which place was used."},{"name":"destination","in":"query","required":true,"example":"atlanta-ga","schema":{"type":"string"},"description":"A city and state (`Chicago, IL`, `chicago-il` or `Chicago, Illinois`) or a 5-digit ZIP. A city alone picks the largest of that name. The response says which place was used."},{"name":"equipment","in":"query","required":false,"description":"Truck type. Default: dry-van.","example":"dry-van","schema":{"type":"string","enum":["dry-van","reefer","flatbed","step-deck","power-only","hotshot","box-truck","sprinter-van"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"origin":{"type":"object","properties":{"slug":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"}}},"destination":{"type":"object","properties":{"slug":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"}}},"miles":{"type":"integer"},"equipment":{"type":"string"},"history":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"totalUsd":{"type":"number"},"ratePerMile":{"type":"number"},"fuelUsd":{"type":"number"}}}},"url":{"type":"string"}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such place or endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rates":{"get":{"operationId":"listRates","summary":"National rates","description":"This month's national average rate per mile for every truck type, on a 750-mile haul, with 1, 3 and 12-month changes.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"month":{"type":"string"},"referenceMiles":{"type":"integer"},"rates":{"type":"array","items":{"type":"object","properties":{"equipment":{"type":"string"},"name":{"type":"string"},"ratePerMile":{"type":"number","description":"All-in US dollars per mile on a 750-mile haul."},"fuelPerMile":{"type":"number","description":"The fuel part of that rate."},"change1mPct":{"type":"number"},"change3mPct":{"type":"number"},"change12mPct":{"type":"number"},"high52w":{"type":"number"},"low52w":{"type":"number"}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rates/{equipment}":{"get":{"operationId":"getRate","summary":"One truck type, with history","description":"The rate per mile for one truck type and its monthly history since 2003-12: national, or for freight leaving or entering one state.","parameters":[{"name":"equipment","in":"path","required":true,"description":"Truck type.","example":"reefer","schema":{"type":"string","enum":["dry-van","reefer","flatbed","step-deck","power-only","hotshot","box-truck","sprinter-van"]}},{"name":"state","in":"query","required":false,"description":"Two-letter code of a lower-48 state. Default: national.","schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"description":"With `state`: freight leaving the state or entering it. Default: outbound.","schema":{"type":"string","enum":["outbound","inbound"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"equipment":{"type":"string"},"name":{"type":"string"},"ratePerMile":{"type":"number","description":"All-in US dollars per mile on a 750-mile haul."},"fuelPerMile":{"type":"number","description":"The fuel part of that rate."},"change1mPct":{"type":"number"},"change3mPct":{"type":"number"},"change12mPct":{"type":"number"},"high52w":{"type":"number"},"low52w":{"type":"number"},"month":{"type":"string"},"referenceMiles":{"type":"integer"},"scope":{"type":"object","properties":{"state":{"type":["string","null"]},"name":{"type":"string"},"direction":{"type":["string","null"]}}},"history":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"ratePerMile":{"type":"number"},"fuelPerMile":{"type":"number"}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/states":{"get":{"operationId":"listStateRates","summary":"Rates by state","description":"Outbound and inbound rate per mile for each of the lower 48 states and DC, for one truck type.","parameters":[{"name":"equipment","in":"query","required":false,"description":"Truck type. Default: dry-van.","example":"flatbed","schema":{"type":"string","enum":["dry-van","reefer","flatbed","step-deck","power-only","hotshot","box-truck","sprinter-van"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"equipment":{"type":"string"},"month":{"type":"string"},"referenceMiles":{"type":"integer"},"states":{"type":"array","items":{"type":"object","properties":{"state":{"type":"string"},"name":{"type":"string"},"outboundRatePerMile":{"type":"number"},"inboundRatePerMile":{"type":"number"},"outboundVsNationalPct":{"type":"number"}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/equipment":{"get":{"operationId":"listEquipment","summary":"Truck types","description":"The truck types the index prices, with deck size and capacity. The `equipment` value is the one every other endpoint takes.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"equipment":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string"},"description":{"type":"string"},"deck":{"type":"string"},"capacityLbs":{"type":"integer"},"pallets":{"type":["integer","null"]},"typicalFreight":{"type":"string"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/diesel":{"get":{"operationId":"getDieselPrice","summary":"Diesel price","description":"The US average on-highway diesel price (EIA): the latest week, and each month since 2003-12. It is the fuel input to every estimate.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"unit":{"type":"string"},"source":{"type":"string"},"latest":{"type":"object","properties":{"week":{"type":"string"},"pricePerGallon":{"type":"number"}}},"month":{"type":"string"},"history":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"pricePerGallon":{"type":"number"}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/places":{"get":{"operationId":"searchPlaces","summary":"Find a place","description":"City-name or ZIP-prefix search. Returns the slugs the estimate endpoints take.","parameters":[{"name":"q","in":"query","required":true,"description":"Start of a city name (optionally with a state: `spring il`), or three or more digits of a ZIP.","example":"dallas","schema":{"type":"string","minLength":2}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"zip":{"type":"string"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached. Retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Optional. A free key from /developers raises the rate limit."}},"schemas":{"Meta":{"type":"object","properties":{"apiVersion":{"type":"string"},"indexMonth":{"type":"string","description":"Latest month the index covers, YYYY-MM."},"dataUpdated":{"type":"string","description":"When the underlying public series were last refreshed."},"basis":{"type":"string","description":"Always `modeled_estimate`."},"docs":{"type":"string"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_parameter","place_not_found","not_found","method_not_allowed","invalid_api_key","rate_limited","internal_error"]},"message":{"type":"string"},"param":{"type":"string"},"docs":{"type":"string"}}}}}}}}