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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Landcrab
Helper I
Helper I

Is it possible to limit number of calls to API per minute?

Hi there,

 

Is there any way to restrict Power BI/ Power Query to respect a limit of 60 API calls per minute when loading data?

 

In Power BI Desktop using OData connector, I get a 503 Service Unavailable error because Power BI/ Power Query fires off too many API requests at the same time. The data I am attempting to load consists of less than 100 sales transactions, so no real volume to speak of.

 

Although its a server (5xx error), the SaaS application provide says in needs to be handled in Power BI to restrict the number of calls to the API, haven't found any want to configure that in Power BI so far 😞

 

Any suggestions would be much appreciated.

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Landcrab 

Yes you can use Function.InvokeAfter.

This code has a 2 second delay between web requests.  Modify as needed,or post your query here for help.

You can try reducing the delay to 1 second but I'm not sure if the timing within PQ/PBI would be accurate.

 

let
    id_list = {1 .. 5},
    GetWeb = (id) => Json.Document(Web.Contents("https://jsonplaceholder.typicode.com/todos/" & Text.From(id))),
    Output = List.Transform(id_list, each Function.InvokeAfter( ()=>GetWeb(_), #duration(0,0,0,2)))    
in
    Output

 

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @Landcrab 

Yes you can use Function.InvokeAfter.

This code has a 2 second delay between web requests.  Modify as needed,or post your query here for help.

You can try reducing the delay to 1 second but I'm not sure if the timing within PQ/PBI would be accurate.

 

let
    id_list = {1 .. 5},
    GetWeb = (id) => Json.Document(Web.Contents("https://jsonplaceholder.typicode.com/todos/" & Text.From(id))),
    Output = List.Transform(id_list, each Function.InvokeAfter( ()=>GetWeb(_), #duration(0,0,0,2)))    
in
    Output

 

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Thank you @PhilipTreacy thats the sort of thing I was after.

For anyone else looking for a simple example of this check out Chris Webb's blog post > https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.