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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
iBusinessBI
Kudo Collector
Kudo Collector

Work efficiently with REST API calls in Power Query (429 Too Many Requests error)

I have 4 Queries that use API calls and 3 other Queries that reference these 4 and Merge them with some logic.
Everything worked well till yesterday when I started to get this error: "429 Too Many Requests"
There is a Rate limit of 100 calls per minute but only for the first Query, that should be run only ONCE (see below).
I think that because of Query folding the first Query is actually trigerred many times by all other Queries because they reference it.
Below is the description (unfortunately, I cannot upload the pbix file):
1. Query "Customers"- gets a list of customer ids from API call (https://api.somecrm.com/v1/customers)
2. Query "Purchase History" - References Query 1 and adds an "Invoke Custom Function" column.
The function gets purchase history for each customerid (from the first query) using another API call (https://api.somecrm.com/v1/purchasehist/{customerid})
3. Query "Customer Tickets" - Similar to Query 2: References Query 1 and adds an "Invoke Custom Function" column.
The function gets Customer Tickets history for each customerid (from the first query) using another API call (https://api.somecrm.com/v1/tickets/{customerid})
4. Query "Call Center" - Similar to Query 2: References Query 1 and adds an "Invoke Custom Function" column.
The function gets Customer Calls history for each customerid (from the first query) using another API call (https://api.somecrm.com/v1/calls/{customerid})
 
So, the list in Query 1 is the same for all the other 3 Queries.
All 4 Queries are not loaded, but are referenced by 3 other Queries that Merge them with some logic and only the Last Query is loaded into the model.
 
I feel that each time the custom functions run when referencing the first Query, they trigger it agai and again and again.
1. How can I check it?
2. How can I make sure the first Query is run ONLY ONCE? Even if other queries reference it, I want them to reference the already existing list of customer ids, and not re-run the first query.
3. Mybe Table.Buffer will work? Or some other "staging" mechanism?
Please help
 
1 REPLY 1
lbendlin
Super User
Super User

1. Use your favorite network sniffer, or use the Power Query "Diagnose" option.

2. You can't. Power Query has a mind of its own when it comes to meta data refresh.

3. Depends on the size of the result set.  May help tremendously or may not help at all. You'll have to try it out.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.