How do I get a feed of road closures for my website?
Two ways. Pull your state DOT's own feed, if it publishes one, and parse it. Or call one API that covers every state. The MileCheck API returns closures, crashes and construction for a state, or for a box on the map, as JSON.
One state, from the source
Most DOTs publish events through their 511 system. Some need a key, some are open. Formats include JSON, XML, GeoJSON and WZDx. If your site covers one state, this can be enough.
Several states, one format
The MileCheck API reads 53 upstream feeds in 19 formats and returns them in one shape:
curl "https://api.milecheckapp.com/v1/alerts?apikey=YOUR_KEY&state=WA"
Add bbox=minLon,minLat,maxLon,maxLat for just your area. Records carry the road and location the source gives. Direction, times and mile markers can be missing.
Cost
A test key is instant. It runs 14 days at 100 calls a day, with no email. Business is $299 a month for 100,000 calls a day. A website that caches results for a few minutes uses far fewer.
Live state DOT feeds in one format
Closures, crashes, construction, chain controls, drawbridges and border waits, plus GPS to mile marker. The test key is instant, with no email.
Questions, answered
Can I show the data publicly?
That depends on your MileCheck plan and each source's terms. Check the permitted uses and attribution before you publish.
Does it include Canada?
British Columbia, Alberta and Manitoba.