DAT APIdat.com ↗
Access DAT freight market conditions, diesel fuel prices, historical rate trends, and blog content via a structured API. Van, reefer, and flatbed data included.
What is the DAT API?
The DAT.com API exposes 6 endpoints covering freight market conditions, diesel fuel prices, and up to 3 years of monthly rate history across equipment types. The get_market_conditions endpoint returns load-to-truck ratios and spot rate percentage changes for van, reefer, flatbed, and national segments on week-over-week, month-over-month, and year-over-year bases — without requiring a DAT subscription.
// select an endpoint above
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace dat-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: DAT freight analytics SDK — bounded, re-runnable."""
from parse_apis.dat_one_freight_analytics_api import DAT, Equipment, RateType, NotFoundError
dat = DAT()
# Current market conditions — typed nested resources
market = dat.markets.get()
print(market.van_trends.wow_load_to_truck_ratio, market.van_trends.wow_spot_rate)
print(market.reefer_trends.yoy_spot_rate, market.flatbed_trends.mom_load_to_truck_ratio)
print(market.national_trends.wow_load_postings, market.national_trends.yoy_fuel_price)
# Current diesel fuel price
fuel = dat.fuelprices.get()
print(fuel.when, fuel.price_per_gallon_usd)
# Historical rate trends filtered by equipment and rate type enums
for rate in dat.rates.list(equipment=Equipment.REEFER, rate_type=RateType.CONTRACT, limit=5):
print(rate.year, rate.month, rate.rate_usd, rate.average_fuel_surcharge_per_trip_usd)
# Blog posts with pagination cap
for post in dat.posts.list(limit=3):
print(post.title, post.date, post.category_name)
# Search resource library with typed error handling
try:
guide = dat.guides.search(query="freight", limit=1).first()
if guide:
print(guide.name, guide.date, guide.img_url_large)
except NotFoundError as exc:
print(f"resource not found: {exc}")
print("exercised: markets.get / fuelprices.get / rates.list / posts.list / guides.search")
About the DAT API
Market Conditions and Fuel Prices
get_market_conditions returns trend objects for four segments — vanTrends, reeferTrends, flatbedTrends, and nationalTrends — each carrying percentage changes in load-to-truck ratio and spot rate across three time horizons. nationalTrends also includes load posting and truck posting change data. get_fuel_prices returns two fields: when (the report date in YYYY-MM-DD format) and pricePerGallon USD, the national average diesel price.
Historical Rate Trends
get_rate_trends accepts two optional parameters — equipment (VAN, REEFER, or FLATBED) and rate_type (SPOT or CONTRACT) — and returns an array of monthly rate objects spanning approximately 36 months. Each object includes year, month, rateUSD (national average per mile), and averageFuelSurchargePerTripUsd. This makes it suitable for time-series analysis without managing your own historical data collection.
Blog and Resource Library
get_blog_posts retrieves posts from DAT's 'The Edge' blog, returning 12 posts per page with fields including title, content, date, img_url, category_name, and url. A total_records count enables pagination planning. search_resources queries the DAT resource library — covering guides, white papers, and toolkits — by keyword, returning objects with id, name, content, excerpt, url, date, slug, and image URLs, along with total_pages, total_posts, and current_page for full pagination control.
The DAT API is a managed, monitored endpoint for dat.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when dat.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official dat.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor weekly load-to-truck ratio shifts across van, reefer, and flatbed segments to time freight procurement decisions.
- Track national diesel price movements using
get_fuel_pricesto model carrier cost exposure in fuel surcharge calculations. - Build 3-year rate trend charts by equipment type and rate type using the monthly
rateUSDandaverageFuelSurchargePerTripUsdfields. - Feed contract vs. spot rate comparisons into shipper dashboards using
get_rate_trendswith differentrate_typevalues. - Aggregate DAT blog content into industry newsletters or internal logistics briefings using
get_blog_posts. - Index DAT white papers and guides in an internal search tool using
search_resourceskeyword filtering and pagination. - Alert systems that flag when year-over-year spot rate changes exceed a threshold, using
nationalTrendsfields fromget_market_conditions.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does DAT have an official developer API?+
What time horizons does `get_market_conditions` cover?+
get_market_conditions returns percentage changes for three periods: week-over-week, month-over-month, and year-over-year. Each of the four trend objects (van, reefer, flatbed, national) includes both load-to-truck ratio and spot rate changes across all three horizons. It does not return absolute rate values — only directional percentage changes.Can I retrieve rate trend data for a specific lane or origin-destination pair?+
get_rate_trends returns national averages aggregated by equipment type (VAN, REEFER, FLATBED) and rate type (SPOT, CONTRACT). Lane-level or origin-destination breakdowns are not exposed. You can fork this API on Parse and revise it to add a lane-specific endpoint if that granularity is available from the source.Does the API expose real-time load board postings or individual shipment data?+
How far back does the historical rate data in `get_rate_trends` go?+
year, month, rateUSD, and averageFuelSurchargePerTripUsd. The exact start date depends on what DAT publishes and may shift over time.