I'm running the ruby sample provided by DOL to access DOLs OSHA API. The relevant ruby code is:

    request.call_api 'Compliance/OSHA/full', 
        :select => 'activity_nr,estab_name,total_violations,site_address,site_city,site_state,site_zip', 
        :orderby => 'estab_name', 
        :filter => "(site_zip eq '27331')" do |results, error| 

where I'm passing in a zip code as the search filter. Running this particular query does not return any results. The table being searched is called 'full'.

If I run the same search via the DOL Data Enforcement Site's search tool, I get different results. I check the box to search the OSHA Inspections and enter a zip code and (as of this writing) 56 results are returned.

So my question is: What datasource is the web based search tool searching against and is it the same datasource that the API uses?

I would have assumed both would return the same set of results.

1 Answer 1


Those datasets were originally set up to support an app challenge targeted specifically at the hospitality, retail, and restaurant industries. The Enforcement Data site's search isn't as limited. We've recently lifted that limitation for Wage & Hour's data. I will be reaching out to the database owner to see if we can do the same with OSHA's.

  • Mike, thanks for the reply. Do you know off-hand if the OSHA compliance data is available for download? I'm using a snapshot of EPA's ECHO compliance data locally and ideally what i'd like to do is to search against both and find what facilities have both EPA and OSHA violations. The ECHO data itself is a summary that spans various EPA systems.
    – Suresh Rao
    Commented Oct 23, 2014 at 23:55
  • The download link you'd be looking for is at ogesdw.dol.gov/views/data_catalogs.php. Also, on Friday, I got a commitment from the enforcement database team to remove the filters from the datasets in the API. The full table will truly have everything shortly. Commented Oct 27, 2014 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.