Is there a way to get the number of violations for an establishment using an API call similar to what shows up in the establishment search (image 1)?

When I make a call using the API when using the appropriate activity number, the violations returned only INCLUDES the activity number from the search. For example, if an activity # was 123, the search would return violations for activity 123, 1234, 12345, 4123, etc. The activity # filter is just being included in the search, not matching exactly. Because of this, I can't even get the rows and "count" them to get a correct number.

Another somewhat related question: Is there a way to identify an establishment even in situations when an establishment has the same name in different states? Specifically in the inspection table in the data.dol api. Link: https://developer.dol.gov/health-and-safety/dol-osha-enforcement/

Example URL to test: https://data.dol.gov/get/violation/filter_column/activity_nr=1065192



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.