New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoiding "User request limit reached" #30
Comments
Was looking more into it. It seems that the cause is that even though I'm only making a few calls (<25) - the "cost" of these calls combined is higher than allowed? So FB built an API that's useless to access Insights? I can create a server/proxy farm that would cycle IPs, but was hoping someone had a better solution. |
Hi arass, Looks like you've got throttled for making too many api calls within short time. If you make tens of API calls within a few seconds, that could happen. Suggested solution:
|
Tried going through adsets before, but got killed on too many requests there also. Went to the batch mode, for now, while we test (at least gets me a full set of insights). But your solution2 seems like the ultimate answer and is worth perusing. Thanks a lot! This makes more sense than encountering such a tiny rate limit and trying to work with it. Much appreciated! |
Yes he is right. accessing edges like adsets and ads directly from Ad_accounts node is better than accessing them individually . It would require less api requests. |
Accessing edges like adsets and ads directly from Ad_accounts node is better than accessing them individually . It would require less api requests. |
I'm not using this api. It's not me.
- Alex
On Sat, Nov 17, 2018 at 1:59 AM, priyachetwani<notifications@github.com> wrote:
Hi arass,
Looks like you've got throttled for making too many api calls within short time. If you make tens of API calls within a few seconds, that could happen.
Suggested solution:
- Use AdAccount/Campaign/AdSet level insights and set 'level' to 'ad', so that you can get the insights of all ads in one HTTP request, instead of making one api call for each of the ads.
- Apply for higher access tier if eligible. This will increase your rate limit. You can see more details on https://developers.facebook.com/docs/marketing-api/access.
Yes he is right. accessing edges like adsets and ads directly from Ad_accounts node is better than accessing them individually . It would require less api requests.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Just adding: You can use expand fields
or Insights api with account node with level
This looks like a neat approach to me. I welcome suggestions! |
How can I pass insights time_range? I have tried to pass this parameter but it does not work. |
in json: url param: &time_range={"since":"yyyy-mm-dd","until":"yyyy-mm-dd"} |
Hello Andrew, I want to pass multiple params, I have tried like this: insights(time_range={"since":"2021-07-14","until":"2021-07-14"},action_attribution_windows=['1d_click','1d_view','7d_view','7d_click']) but it's not work. I am only able to pass one params at a time like this: insights.time_range({"since":"2021-07-14","until":"2021-07-14"}){reach,impressions,clicks,cpc,cpm,cpp,ctr} Can you please help me with how can I pass multiple params? I want to pass time_range and action_attribution_windows. Thanks! |
@mohitg8a Not sure posting a question unrelated to the closed issue is the right place for your answers. For insights, consider using the inner classes on the top-level class representing the level of insights you want to fetch (Campaign, AdAccount, etc). Those inner classes all say
Then I can pass these fields into each of the setters on the APIRequestGetInsights class (this example is used to get all the campaigns that have some activity within the start and end date range for a given Ad Account):
|
Thanks, it's really helpful for me. Thank you again. |
Hello Guys, how can have a similar ad creative showing that they are being used in multiple ads? We are building an internal reporting system for creative ads reporting. And we would like to know how can have the similar ad creative showing that they are being used in multiple ads similar to what FB does: https://prnt.sc/1qh0ezk |
I haven't ran a wireshark (too lazy), but I seem to be running into the issue with 200 requests per hour max over an account with only 25 ads.
I have code that looks like this:
APINodeList ads = adAccount.getAds()..[blah blah blah]..execute() (1 call, returns 25 ads)
Then I go through all ads, requesting insights:
for (Ad ad : ads) {
APINodeList adInsights = ad.getInsights().[blah].execute() (should get called 25 times)
methodThatExaminesInsights(each adInsight)
}
Now considering there should be only 26 calls to go to backend, I getthe 200-max error after going through 180 or so insights. Which means that looking at an insight generates a call?
This seems silly as that means there is no way to examine even a single account's insights
Seems like a bug.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: