Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
lmk
Frequent Visitor

Trying to Call an API from the Dept of Labor that filters Dates

How do I filter this table https://dataportal.dol.gov/datasets/10236 by all records after a certain date using a DOL API query.  {"field": "YOUR_FIELD","operator": "gt","value": "YOUR_VALUE"} If I put load_dt in the "value" and the Date, for example 2024-10-12. the query won't work.  What am I doing wrong?

7 REPLIES 7
v-pnaroju-msft
Community Support
Community Support

Hi lmk,

We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.

If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi lmk,

We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.

If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi lmk,

We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.

If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.

Thank you.

lmk
Frequent Visitor

Yes. I have an API key.  I don't know the proper format for filtering by date in the API call. 

Anonymous
Not applicable

Hi @lmk,

You can take a look at the PDF document 'Conditional Filtering ' part and it shows how the filter condition defines and usages:

dol-api-user-guide.pdf

Sample query:

https://apiprod.dol.gov/v4/get/agency/dataset/json?limit=10&offset=0&sort=asc&sort_by=Date
&filter_object={"and":[{"field":"dataset_id","operator":"eq","value":"10236"}, {"field":"date","operator":"eq","value":"2024-10-12"}]}&X-API-KEY= 
xxxxxxxx

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @lmk,

I check the document and find it include a login-in/registration function to get access tokens, and the other type of operation all required this in following rest api usages.

Spoiler
Getting Started
To use our APIs, you need to register for an account at https://dataportal.dol.gov/registration and
complete our questionnaire to get an API key. Once you register, there may be a slight delay while the
system incorporates your credentials, and you may need to wait for a few minutes and/or refresh your
screen before an API key is generated in your account. Your API key will look like a mixture of numbers,
letters, and special characters. You can create additional keys (up to 5) if you need to use them for
different purposes, client applications, or automation.
Your API key is what grants you access to the DOL API and is a required parameter for all metadata
and data requests. You can always find, manage, and create new keys by signing into the open data
portal and going to https://dataportal.dol.gov/api-keys. The sharing of your API key(s) with others,
including on public code repositories or other public forums is strictly prohibited and may result in
the termination of your API service.

DOL API User Guide - dataportal.dol.gov
Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

That API key requires registration.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.