User request limit reached on updating campaign budget in the Ads API - facebook-graph-api

It seems that changing campaign budgets has a much lower rate limit than updating other options: http://developers.facebridge.net/bugs/285486761555036?browse=search_50da9ab10555f6203542865
Even changing the budget three times in quick succession doesn't seem to work. Is this budget-specific rate limit publicized anywhere?

The exact numbers aren't published, but FB did release new API Rate Limiting documentation a few weeks ago.
You can check it out at https://developers.facebook.com/docs/reference/ads-api/api-rate-limiting/#adcampaignlimit.
Daily and lifetime budgets do indeed have their own specific rate limiting (again, without exact numbers).

Related

How can I see request count (not rate) for a Google Cloud Run application?

I deployed a Google Cloud Run service running in a docker container. Out of the box, it looks like I get insight into some metrics on the Metrics tab of the service page such as Request count, Request latencies and more. Although it sounds like request count would answer my question, what I am really looking for is insight into adoption so that I can answer "How many visits to my application were there in the past week" or something like that. Is there a way to get insight like that out of the box?
Currently, the Request count metric reports responses/second, so I can see blips that look like "0.05/s", which can give me some insight but it's hard to aggregate.
I've tried using the Monitoring > Metrics explorer as well, but I'm not seeing any data for the metrics I select. I'm considering hooking into Google Analytics from within my application if that seems like the suggested solution. Thank you!
I've realized it's quite difficult to have Metrics Explorer give you a straight answer on "how many requests I received this month". However, it's possible:
Go to Metrics Explorer as you said, choose resource type "Cloud Run Revision" (cloud_run_revision) and you'll see "Request Count" (run.googleapis.com/request_count) metric:
Description: Number of requests reaching the revision. Excludes requests that are not reaching your container instances (e.g. unauthorized requests or when maximum number of instances is reached).
Resource type: cloud_run_revision
Unit: number Kind: Delta Value type: Int64
Then, choose Aggregator: None, and click Show Advanced Options. In the form, choose Aligner: sum (instead of default "Rate" default). You now should be able to see total request count per minute:
Now if you change "Alignment Period" to "10 minutes", you'll see one data point for every 10m (sadly, there seems to be a bug that says X req/s, but that's more like X reqs/10m in this case):
If you collect enough data, you can change "Alignment Period" to "Custom" and set 30 days, then update your timeframe on the top to 1 year and see monthly request count.
This does not show sums of all Alignment Periods (I think that part is up to you to do manually, maybe possible via the API), but it lets you see requests per month. For example, here's a service I've been running for some months and I set alignment period to 7 days, viewing past 6 weeks, so I get 6 data points on weekly request count. Hope this helps.

What is Blogger API reading quota?

I am going to create a simple blog app which has included only reading facility (list/search/get). So, what is the quota limitation for reading in Blogger API? In my Quotas section which show as follows,
Queries per day 10,000
Queries per 100 seconds per user 100
I wanted know that what is the reading data quota limit from above stats?
10,000 request (list/search/get) per day; with the limit of 100 request per 100 second for each unique IP address.
These numbers are since, as stated here:
Depending on the API, Quota information may include requests per day,
requests per minute, and requests per minute per user.
Additionally, according to this you may modify these limits given your preference and performance, as well as monitor your API Usage following this.

AWS Personalize in Cost Explorer

I am using for 4 dataset group for example:-
Movies
Mobile
Laptops
AC
And in each datasetGroup, we have 3 datasets with name Users, Item and Item_User_INTERACTIONS
And we also have one solution and Campaigns for each dataset group.
I am also sending the real-time event to AWS Personalize using API (putEvent)
The above things cost me about 100USD in two days and showing 498 TPS hours used and I am unable to find the real reason for this much cost.
Or does AWS Personalize simply cost this much?
As your billing tells you, you have used 498 TPS hours, let's calculate if it should be $100.
According to official Amazon Personalize pricing:
https://aws.amazon.com/personalize/pricing/
For first 20K TPS-hour per month you have to pay $0.20 per TPS-hour.
You have used 498 TPS hours in two days, it gives us:
$0.2 * 498 = $99.6 in total.
The answer is: yes, it's expensive.
Another question is:
How TPS usage is calculated?
They charge you for each TPS that is currently reserved. So if you have a campaign with 1 TPS and it's created for 24 hours, then you will be charged for 24[h] x 1[TPS] = 24 TPS hours = $4.8.
The problem is, that $0.2 doesn't look expensive, but if you multiply it by hours, it becomes very expensive.
For testing purposes you should always set TPS to 1, since you cannot set it to 0. 1 TPS allows you to get 3600 recommendations per hour, which is a lot anyways.
The reason for such high price is because of created Campaign which exists and therefore running (this part of AWS Personalize uses more resources than uploading data to s3/creating a model. It is based on TPS-hour per month metric)
E.g. suppose you uploaded a dataset with 100000 rows
Training will cost you about $0.24*2=0.5$ (assuming training took 2h)
Uploading to s3 and dataset - almost free
A created campaign which allows 1 request per second will cost $0.2*24*30=144$ per month
If in the production environment you will set a campaign to support 20 requests per second, it will be 2880$ per month.
So definitely, if these are your first steps with AWS Personalize, create campaigns only that support 1 request per second and verify that you delete unused resources on time.
In case of the SIMS recipe, there is also another way which might save you some money. Try to check how much it will cost for you just to retrain the model every 3d, for example, and to create batch recommendations for your items. Using this strategy we are spending now only 50$ per month per e-Shop instead of 1000$ per month.
Find more data in AWS docs

"Average Daily Active Users" for Facebook API Limits

I've suddenly started running into API limits. I've been restricting my API calls to: number of users * 200, but I'm getting error #4 about once per day.
This calculation was based on the docs from end of 2015 that said number of users your app had yesterday, plus new logins today.
But it looks like that has changed to:
The number of users your app has is the average daily active users of your app, plus today's new logins
Can someone explain to me what "average daily active users" is? And is there a way I can get access to this number?
Some information on what I'm doing:
My app fetches pages and posts from pages. To do this, I hit the Facebook API to get user's liked pages. Then each hour, I fetch posts from pages the system knows about.
I do the following:
Batch requests (50 per batch)
I'm only fetching posts since the last fetch (using since, until and limit params. 90% of the requests return 0 posts)
I'm only fetching posts from pages my users like
I'm using my app token for these requests
I limit the number of calls per hour to users * 200
Batch Requests don´t reduce API limits, they are only faster, that´s all. That being said: You wrote that you are using an "App Token" for the requests - you should use a "User Token" instead. It´s still a LOT of calls though, the only thing you can do in addition is to reduce the amount of API calls.
I found this endpoint in the documentation: https://developers.facebook.com/docs/graph-api/reference/application/
I tested this via
https://graph.facebook.com/v2.10/<my_app_id>?access_token=<my_access_token>&fields=daily_active_users
And it returned
{
"daily_active_users": "152",
"id": "<my_app_id>"
}
It is not average daily active users though

Any way to find out my Amazon Product API Limits

I was given an Amazon awsAccessKeyId and awsSecretKey,
also our company has affiliated with Amazon, we get a Associate Tag​.
And I was told we may get higher API limits, because we are affiliated.
But I don't have any detailed info about the API limits,
I want to know how many calls i can make in a second
Is there any way I could check our API Key status?
The call i use will be check product info like:
Service=AWSECommerceService
&Operation=ItemLookup&ItemId=[ID]
&IdType=ASIN
.....
When you exceed the requests limit, Amazon Product Advertising API sends a (possibly gzipped) response with 503 status code. Example response for ItemLookup query:
<?xml version="1.0"?>
<ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2013-08-01/">
<Error>
<Code>RequestThrottled</Code>
<Message>AWS Access Key ID: YOUR-AWS-ACCESS-KEY-ID. You are submitting requests too quickly. Please retry your requests at a slower rate.</Message>
</Error>
<RequestId>fabebd87-54a2-44ec-b547-deb5feee900a</RequestId>
</ItemLookupErrorResponse>
The rules have changed since #at0mzk's answer.
You have to make sales to use the API. The limits are set by sales in the last 30 days.
Effective 23-Jan-2019, the usage limit for each account is calculated based on revenue performance attributed to calls (also called requests) to the Product Advertising API (PA API) during your account’s latest 30-day trailing period.
Each account used for Product Advertising API is allowed an initial usage limit up to a maximum of 1 request per second and a cumulative daily maximum of 8640 requests per day (TPD) for the first 30-day period after your account has been approved. Following that period, your PA API usage limit will solely be based on your shipped item revenue. Your account will earn a usage limit of 1 TPD for every 5 cents or 1 TPS (up to a maximum of 10 TPS) for every $4320 of shipped item revenue generated via the use of Product Advertising API for shipments in the previous 30-day period.
Docs
Apparently there's not way of checking exactly what those limits are and they will change based on the performance of your account.
It seems that the minimum rate limits are:
1 request per second
8640 requests per day
Those limits will increase if your account has a good performance (as in shipped items revenue) using the API links.
From: Amazon Product API - Troubleshooting
API Rates
Curious to know how we provision API call rates for Product Advertising API 5.0? First, some definitions:
TPS – Transactions per second, refers to the maximum number of API calls you can make in one second. Each API call counts as one transaction. For example, if you send 10 ASINs in the request parameter of a GetItems() call, it counts as a single transaction.
TPD – Transactions per day, refers to the maximum number of API calls you can make in one day. If Associate has 1 TPS and 8640 TPD, then maximum of 1 request can be sent per second and 8640 per day. Even if 1 TPS is there, once TPD is exhausted requests will be throttled.
Primary Account – This refers to the Amazon username (email address) and password that you used to create your Associates account and used to generate Product Advertising API 5.0 credentials.
Shipped revenue – This refers to the total sales volume of all items Amazon has shipped from orders resulting from clicks through links you created using Product Advertising API 5.0.
Also:
As soon as you create your Product Advertising API 5.0 credentials, you are allowed an initial usage limit up to a maximum of one request per second (one TPS) and a cumulative daily maximum of 8640 requests per day (8640 TPD) for the first 30-day period. This will help you begin your integration with the API, test it out, and start building links and referring products to your readers.
Your PA API usage limit will be adjusted based on your shipped item revenue. Your account will earn a usage limit of one TPD for every five cents or one TPS (up to a maximum of ten TPS) for every $4320 of shipped item revenue generated via the use of Product Advertising API 5.0 for shipments in the previous 30-day period. For correct attribution of shipped item revenue please ensure that you always call Product Advertising API 5.0 with the primary account credentials and retain all the URL parameters that the API returns in its response.
...
If you are trying to submit requests that exceed your account’s usage limit, or if your access has been revoked you will receive a 429 TooManyRequests error message from Product Advertising API 5.0. Please refer our API integration best practices to learn more on how to avoid these situations and optimally access the API.