Connect Apify to Claude Code

Find and run Apify Actors, ready-made scrapers and automations, and read the data they collect. Add Toolspoke to Claude Code once and it can use 16 Apify actions. Your Apify credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Apify and connect it

    Add Apify to a project in your Toolspoke workspace.

    API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API token
    console.apify.com → Settings → API & Integrations → Personal API tokens. Copy the default token, or create a new one and scope it to the Actors and storages it may reach.
  3. Choose what Claude Code may do

    All 16 actions start on. Switch off any of the 4 actions that change something in Apify, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Apify actions that only read, so they are safe to try first.

  • Search Apify Store for public Actors by keyword, e.g. "google maps" or "instagram profile"
  • List the Actors this account has created or used
  • Read one Actor: its title, description, versions, default run options, pricing and an example input
  • List the runs of one Actor, newest first when `desc` is set

What Claude Code can do in Apify

12 actions read, 3 write and one deletes or permanently changes something.

Reads

  • Search store

    Search Apify Store for public Actors by keyword, e.g. "google maps" or "instagram profile". Returns each Actor's id, username, name, title, description, pricing and usage stats. Free. Use the `username~name` it returns as the actor_id for get_actor and run_actor.

  • List actors

    List the Actors this account has created or used. Set `my` to list only the ones it owns.

  • Get actor

    Read one Actor: its title, description, versions, default run options, pricing and an example input. Read this before run_actor to see what input it expects.

  • List runs

    List this account's Actor runs across all Actors, with id, Actor id, status, start and finish times and usage cost. Newest first when `desc` is set. This is the connection test: it fails when the token cannot read runs, not just when the token is wrong.

  • List actor runs

    List the runs of one Actor, newest first when `desc` is set.

  • Get run

    Read one run: its status, timings, usage cost, and the ids of its default dataset and key-value store. Set `waitForFinish` (up to 60 seconds) to wait for a running run instead of polling.

  • Get run log

    Read a run's log as plain text. Use it to find out why a run failed. Logs can quote the pages the Actor scraped, so the payload is kept out of the audit log.

  • List datasets

    List this account's datasets, with id, name, item count and dates. Unnamed datasets (the default dataset of each run) are left out unless `unnamed` is set.

  • Get dataset items

    Read the items a run collected, as JSON. Take the dataset id from a run's defaultDatasetId. Hidden fields and empty items are left out. Page with `limit` and `offset`, and pick fields with `fields` to keep the answer small. The items are scraped content, so the payload is kept out of the audit log.

  • Get record

    Read one record from a key-value store, e.g. a run's OUTPUT or INPUT. Take the store id from a run's defaultKeyValueStoreId. The record can be anything the Actor saved, so the payload is kept out of the audit log.

  • List tasks

    List this account's saved tasks. Actors with a stored input and options, with id, name and Actor id.

  • Get monthly usage

    Read this account's usage and cost for one billing month, broken down by service and by day. Use it to check spend before starting a large run.

Writes

  • Run actor

    Start an Actor run and return the run at once, with its id, status and defaultDatasetId. Classified write because a run spends the account's money. Cap it with `maxTotalChargeUsd` on pay-per-event Actors and `timeout` on the rest. Set `waitForFinish` (up to 60 seconds) to wait for a short run; otherwise poll get_run, then read the results with get_dataset_items. The input is often content the caller wrote, so it is kept out of the audit log.

  • Run actor sync

    Run an Actor, wait for it to finish, and return the items it collected, in one call. Only for short runs: Apify returns 408 if the run takes more than 300 seconds, and the run keeps going. Use run_actor for anything longer. Classified write because a run spends money; cap it with `maxTotalChargeUsd` or `maxItems`. The items are scraped content, so the payload is kept out of the audit log, and so is the input.

  • Run task

    Start a run of a saved task with its stored input, and return the run at once. Classified write because a run spends money. `input` is merged over the task's stored input for this run only. Poll get_run, then read results with get_dataset_items.

Deletes or permanently changes

  • Abort run

    Stop a starting or running run. Classified destructive because the run's remaining work is lost unless someone resurrects it later. Set `gracefully` to send the Actor a persistState event and force-stop it after 30 seconds, which is what makes a later resurrect useful. Does nothing to a run that has already finished.

Apify in Claude Code: questions

Does Claude Code see my Apify credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Apify?

Yes. Each of the 16 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.

Will 16 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Apify action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Apify call does not run in a sandbox, so it bills nothing.

Apify in your other apps

More automation toolkits for Claude Code

Try Apify in Claude Code

Free to start, and tool calls cost nothing on any plan.