Forum Discussion
benryon1
6 years agoMicrosoft Employee
Delay an API call from a custom column
I have an API that has a rate limit of one call per second. I'm using a custom column and add the following code below. The actual quaery is in Column 1. How do I add a delay to avoid the rate limit...
amitchandak
6 years agoSuper User
benryon1 ,
Refer if these can help
https://community.powerbi.com/t5/Desktop/Delay-a-web-query-before-calling-it/m-p/916700
https://community.powerbi.com/t5/Power-Query/API-call-limit-introduce-delay/m-p/36215
https://www.youtube.com/watch?v=Eg-025tN-7U
- benryon16 years agoMicrosoft Employee
Yes! That video is it. Final conditional column code works out to be what I have below, with the missing URL data in Column 2 (for reference for anyone in the future):
= Function.InvokeAfter(()=> Json.Document(Web.Contents("https://api.xxxxxxxx.com/search/articles.json?q=" & [Column2] & "&api_key=xxxxxxxx")),#duration(0,0,0,1))