Apify integration

Apify spend alerts and a usage brake

Costbrake reads your Apify account's usage for the current billing cycle every 5 minutes on Pro and Team, and every minute for 2 hours after a spike alert. An admin can lower Apify's maximum monthly usage to what the cycle has used so far, and Undo restores the exact previous limit.

Apify's own platform limit starts at your subscription price and suspends platform services once usage passes it. The Free plan checks hourly with email alerts; the brake comes with Pro at $12 a month and Team at $39 a month (see pricing).

Apify at a glance

Reads
This cycle's usage and limits, and daily usage per service
Key
Connect with Apify, or an API token with Limit token permissions off; the brake uses the same access
Setup
One click with Connect with Apify, or paste a token
Free plan
Checks every hour, email alerts, no brakes
Pro and Team
Checks every 5 minutes, Slack, Discord and webhook alerts, brakes
Spike checks
Every minute for 2 hours after a spike alert
Brakes
Cap monthly usage

Brakes

1 brake for Apify

An admin picks a brake, confirms it, and can undo it later. Brakes come with Pro and Team.

  • Admin confirms

    Cap monthly usage

    Lowers the account's maximum monthly usage to what this cycle has used so far, rounded up to the cent, so Apify suspends platform services once usage passes it.

    UndoRestores the previous maximum monthly usage exactly, unless someone changed the limit in the meantime.

    The suspension covers the whole account until the limit goes up or the next cycle starts, and Apify's limits can be off by up to 10%.

Can you set a hard spending limit on Apify?

Yes. Every Apify account has a platform limit on monthly usage, set under Billing, Limits, and it starts at your subscription price. If usage goes past it, Apify suspends platform services. Apify calls its limits estimates: actual spending can deviate by up to 10%.

ControlApplies toWhat happensGap
Platform limitThe whole accountSuspends platform services once usage passes itSet by hand; can be off by up to 10%
Plan maximumThe whole accountCaps the platform limit: $100 on Starter, $1,000 on Scale, $5,000 on BusinessGoing higher means a bigger plan
Limit notificationsThe whole accountWarns as usage nears the limitDoesn't lower the limit
Costbrake brakeThe whole accountLowers the limit to this cycle's usage so farAn admin starts it

A runaway Actor can spend right up to the limit before Apify steps in, and overage on a paid plan is invoiced right away once it reaches $50 on Starter or $200 on higher plans. Costbrake alerts when an hour costs over 3 times its 7-day usual and at least $5 more. How Apify pricing works and how to cap monthly usage covers the limit settings.

What Costbrake reads from Apify

Costbrake reads this cycle's usage and your limits from Apify's API at every check. Live spend is the change in usage between two checks, spread evenly over the hours between them. Every 3 hours it also reads the daily usage per service, which replaces the live figures once each day is over.

Which Apify access does Costbrake need?

Click Connect with Apify and approve, or paste an API token from API & Integrations in Apify Console. Apify only shows usage and limits to tokens without limited permissions, so leave Limit token permissions off when you create one.

Either way Costbrake gets full access to the account: Apify has no read-only token that can see usage, and its sign-in has a single scope. The brake uses the same access, so there is no second key. To cut access, revoke the sign-in or delete the token in Apify Console. With agent setup, Apify connects in one click.

How the Apify brake works

  1. An admin turns on the killswitch for the connection.
  2. Costbrake shows the account as the target, with this cycle's usage and the current limit.
  3. The admin picks Cap monthly usage and types the connection's name to confirm.
  4. Costbrake sets Apify's maximum monthly usage to this cycle's usage so far, rounded up to the cent.
  5. Undo puts back the exact limit from before, unless someone changed it after the brake.

The brake needs a limit to lower. If the account has none, or the limit already equals this cycle's usage, Costbrake says so and changes nothing.

What Costbrake can't do on Apify

  • Stop spend on its own. Alerts are automatic; a brake always waits for an admin.
  • Stop one Actor or run while the rest keep going. The cap covers the whole account.
  • Raise your limit past your plan's maximum, or change your subscription.
  • Make Apify's limit exact, since Apify says spending can deviate by up to 10%.

If an Apify token leaks, see What to do in the first hour after an API key leaks.

Questions and answers

Does Apify have a spending limit?

Yes. Every account has a platform limit on monthly usage that starts at your subscription price, and Apify suspends platform services once usage passes it. You can raise it up to your plan's maximum, such as $100 on Starter.

What does the Costbrake brake do on Apify?

It lowers the account's maximum monthly usage to what the current cycle has used so far, rounded up to the cent. Apify then suspends platform services for the whole account until the limit goes up or the next cycle starts. Undo restores the previous limit.

Why does Costbrake need a full-access Apify token?

Apify only lets tokens without limited permissions read usage and account limits, and Connect with Apify has a single full-access scope. The same access sets the monthly usage limit when an admin runs the brake.

How often does Costbrake check Apify usage?

Every 5 minutes on Pro and Team, every minute for 2 hours after a spike alert, and every hour on Free.

Does Costbrake stop Apify spend on its own?

No. Alerts go out automatically, but the brake only runs when an admin of your Costbrake workspace picks it and types the connection name to confirm.

Sources

Updated

Start with 14 days of Pro, free

Catch the next Apify spike before the invoice.

14 days of Pro, then Free for 2 accounts. No card needed.