Guides
API principles

Rate limits

The Marketing API limits Mimicr applies (points per account, hourly use cases, budget, spend cap and edits), the usage headers and how to react.

The Marketing API limits calls per ad account and per use case. Mimicr counts the sandbox's calls with the same rules and returns the same headers, so you can test your limit handling without waiting for a real block.

Access tier

The sandbox's accessTier toggle picks the app's access tier:

development (default)standard
Points per account609,000
Block when exceeded5 min1 min
ads_management per hour300 + 40 × active ads100,000 + 40 × active ads
ads_insights per hour600 + 400 × active ads190,000 + 400 × active ads

Points per account

Each call scoped to an account adds points: a read is worth 1, a write is worth 3. Points decay over 5 minutes. Past the maximum, the account is blocked and every call to it answers:

json
{
  "error": {
    "message": "(#17) User request limit reached",
    "type": "OAuthException",
    "code": 17,
    "error_subcode": 2446079,
    "is_transient": false,
    "error_user_title": "Ad Account Has Too Many API Calls",
    "error_user_msg": "There have been too many calls from this ad-account. Please wait a bit and try again.",
    "fbtrace_id": "xiHgrJQ7fmQ"
  }
}

On the development tier, 20 back-to-back creates on the same account (60 points) are enough to block it for 5 minutes. Advance the clock to unblock: npx mimicr clock meta-ads +5m.

Hourly use cases

Besides points, each account has an hourly quota per use case. Exceeding ads_management: 80004 "There have been too many calls to this ad-account". Exceeding ads_insights: 80000. The window rolls over every hour of the sandbox clock.

Object limits

LimitErrorIn Mimicr
4 budget changes per hour per ad set613/1487632On by default (budgetChangeLimit)
1 edit per object every 30 s613/4841018Off by default (objectEditInterval)
10 account spend cap changes per day17/1885172Always
Leads per Page per day80005Not applied

Headers

Every response scoped to an account carries the current usage:

text
x-business-use-case-usage: {"100539998049706":[{"type":"ads_management","call_count":4,"total_cputime":1,"total_time":2,"estimated_time_to_regain_access":0,"ads_api_access_tier":"development_access"}]}
x-ad-account-usage: {"acc_id_util_pct":10,"reset_time_duration":30,"ads_api_access_tier":"development_access"}
  • call_count, total_cputime and total_time are percentages of the hourly quota.
  • estimated_time_to_regain_access is how many minutes remain until unblocking, when blocked.
  • acc_id_util_pct is the percentage of the account's points; reset_time_duration is when they reset, in seconds.

Insights calls also carry x-fb-ads-insights-throttle ({"app_id_util_pct":0,"acc_id_util_pct":…}). Calls outside an account (/me, /oauth/access_token, /debug_token) carry x-app-usage.

Each account's current state also appears in GET /v1/meta-ads, under rate_limits.

How to react

  • Treat 4, 17, 32, 613 and 80000 to 80014 as rate limits: don't retry right away.
  • Read estimated_time_to_regain_access or acc_id_util_pct and slow down before reaching 100%.
  • Batch reads: list with a high limit and fields with only what you need, or read several ids at once with ?ids=a,b, instead of one call per object. In Mimicr, edges inside fields (like campaigns{…} on an account) aren't expanded.
  • Send the budget only when it changes.

To test the handling without reaching the limit, chaos in the api area with "Operation failures" answers 613, 80004 or 17 at random (see Sandbox control).