---
ref: tool:apify/run-actor
name: Run an Actor
company: company:apify
workflows: []
access: [mcp, cli, api]
tags: [capability:scrape-web, category:scraper, has:api, has:cli, has:mcp]
docs: https://docs.apify.com/api/v2/actors-runs-post
updated: 2026-09-27
---

# Run an Actor

Starts an Apify Actor, such as a Google Maps or search-results scraper, with JSON input and returns the run's status and the ID of the dataset that holds its results.

Name the Actor as `username/actor-name` (`username~actor-name` in an API
path) and pass input that matches its input schema. The MCP tool waits up to
45 seconds for the run to finish and the API up to 60 with `waitForFinish`;
read the results with `get-dataset-items` once the run has succeeded. On the
CLI, `--output-dataset` prints the results. Over the API, `maxTotalChargeUsd`
caps what a run can cost, and `POST /actors/{actorId}/run-sync-get-dataset-items`
waits up to 300 seconds and returns the items in the response.

## Set up

Use the first option your agent supports.

### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "apify": { "url": "https://mcp.apify.com" } } }
```

Call the MCP tool `call-actor`.

Server URL: https://mcp.apify.com

### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g apify-cli
apify --version
```

Run `apify actors call`.

### API (official)

- Base URL: https://api.apify.com/v2
- Endpoint: `POST /actors/{actorId}/runs`
- Auth: send the header `Authorization: Bearer $APIFY_TOKEN`
- Get a key: https://console.apify.com/settings/integrations
- Docs: https://docs.apify.com/api/v2

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
