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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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?

8 REPLIES 8
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, as this helps the broader community.
Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

Thank you.

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

Thankyou, lbendlin and Xiaoxin Sheng for your response.

Hi lmk,

We would like to check if the solution provided by lbendlin and Xiaoxin Sheng has resolved your issue. If you have found an alternative approach, we encourage you to share it with the community to assist others facing similar challenges.
If you found the response helpful, please mark it as the accepted solution and add kudos. This recognition benefits other members seeking solutions to 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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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