# PhantomBuster

> Launch PhantomBuster Phantoms, wait for their runs, and pull their extracted data (LinkedIn, social, and web scraping results) into your workflows. Create, update, stop and delete Phantoms, and keep an eye on the workspace's plan usage.

App · Contact Management · 13 actions. Web page: https://docs.lodol.com/docs/integrations/phantombuster

## Actions

### Create Phantom

Add a Phantom to the workspace from PhantomBuster's catalogue, such as a LinkedIn Profile Scraper, optionally with its inputs filled in. It uses one of your plan's Phantom slots.

**Inputs**

- Phantom type (`script`, text, required): The Phantom to create, named exactly as its page on phantombuster.com shows it.
- Name (`name`, text, required): What to call the Phantom in your workspace, up to 100 characters.
- Inputs (`arguments`, object): The Phantom's inputs and settings, under the field names it uses, such as spreadsheetUrl, sessionCookie or numberOfProfiles. You can paste the JSON from the Phantom's JSON view in PhantomBuster.

**Outputs**

- `agent_id` (text)
- `name` (text)
- `script` (text)

**Example output**

```json
{
  "agent_id": "1234567890123457",
  "name": "Profile Scraper for Lodol",
  "script": "LinkedIn Profile Scraper"
}
```

### Delete Phantom

Delete a Phantom from the workspace, freeing its slot. PhantomBuster won't delete a Phantom while it is running.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom. Pick it from the list, give its ID, or paste the address of its page in PhantomBuster: the ID is the number after /phantoms/.

**Outputs**

- `agent_id` (text)
- `deleted` (true/false)

**Example output**

```json
{
  "agent_id": "1234567890123457",
  "deleted": true
}
```

### Describe Phantom

Look up a Phantom's saved settings, including its saved inputs, useful for finding the exact input field names the Phantom expects. Also gives its schedule, how it files results, and links to its results files. Session cookies and passwords are shown as hidden.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom. Pick it from the list, give its ID, or paste the address of its page in PhantomBuster: the ID is the number after /phantoms/.

**Outputs**

- `argument` (object): The saved inputs, by field name.
- `execution_time_limit` (number)
- `file_management` (text): mix | folders | delete
- `id` (text)
- `last_end_type` (text)
- `launch_after_agent_id` (text)
- `launch_count` (number)
- `launch_once_at` (text)
- `launch_type` (text)
- `max_parallel_runs` (number)
- `metadata` (object)
- `name` (text)
- `result_files` (object): Links to its csv and json results files.
- `script` (text)
- `updated_at` (text)
- `webhook_configured` (true/false)

**Example output**

```json
{
  "argument": {
    "columnName": "profileUrl",
    "sessionCookie": "(hidden)",
    "spreadsheetUrl": "https://docs.google.com/spreadsheets/d/..."
  },
  "execution_time_limit": null,
  "file_management": "mix",
  "id": "1234567890123456",
  "last_end_type": "finished",
  "launch_after_agent_id": null,
  "launch_count": 12,
  "launch_once_at": null,
  "launch_type": "manually",
  "max_parallel_runs": 1,
  "metadata": {},
  "name": "LinkedIn Followers Export",
  "result_files": {
    "csv": "https://phantombuster.s3.amazonaws.com/orgFolder/agentFolder/result.csv",
    "json": "https://phantombuster.s3.amazonaws.com/orgFolder/agentFolder/result.json"
  },
  "script": "LinkedIn Profile Scraper",
  "updated_at": "2026-10-14T16:20:00Z",
  "webhook_configured": false
}
```

### Fetch result data

Bring a Phantom's results file (the rows it has collected across its runs) into the workflow. For one run's rows only, use Get run results. For large results, use the Limit and Rows to skip fields to fetch a portion at a time; a link to the full results file is always included.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom whose results to fetch.
- Run ID (`container_id`, text): Optional run ID to note which run these results relate to. The results file is read either way; Get run results reads just one run's rows.
- Format (`format`, text): Which results file to read. Auto reads the JSON file and falls back to the CSV one, which is all PhantomBuster's free plan exports. One of: `auto`, `json`, `csv`. Default: `auto`.
- Limit (`limit`, number): Maximum number of rows to return. At least 0.
- Rows to skip (`offset`, number): Skip this many rows before returning results, so you can fetch large results in batches. At least 0. Default: `0`.

**Outputs**

- `format` (text)
- `result_url` (text)
- `row_count` (number)
- `rows` (list): Parsed result rows.
- `total_rows` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "format": "json",
  "result_url": "https://phantombuster.s3.amazonaws.com/orgFolder/agentFolder/result.json",
  "row_count": 1,
  "rows": [
    {
      "email": "jane@example.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "profileUrl": "https://www.linkedin.com/in/jane-doe"
    }
  ],
  "total_rows": 1,
  "truncated": false
}
```

### Get run results

Bring the rows one run collected into the workflow, by its run ID. Unlike Fetch result data, which reads everything the Phantom has collected across its runs, this is only what that run found. Use it once the run has finished.

**Inputs**

- Run ID (`container_id`, text, required): The run ID returned by the Launch Phantom action. This identifies one run, and is not the Phantom's own ID. The address of the run's log page in PhantomBuster works too.
- Limit (`limit`, number): Maximum number of rows to return. At least 0.
- Rows to skip (`offset`, number): Skip this many rows before returning results, so you can fetch large results in batches. At least 0. Default: `0`.

**Outputs**

- `container_id` (text)
- `result_object` (object): What the run saved, when it isn't a list of rows.
- `result_url` (text): The file the rows came from, when the run saved too many to hold inline.
- `row_count` (number)
- `rows` (list): The rows the run collected.
- `total_rows` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "container_id": "9876543210987654",
  "result_object": null,
  "result_url": null,
  "row_count": 1,
  "rows": [
    {
      "companyName": "Acme",
      "firstName": "Jane",
      "lastName": "Doe",
      "profileUrl": "https://www.linkedin.com/in/jane-doe"
    }
  ],
  "total_rows": 1,
  "truncated": false
}
```

### Get run status

Check the status of a Phantom run: running, finished, error or stopped. A run that ends with an error is reported as 'error', with the errors the Phantom gave. To wait for a run to end, use Wait for run to finish.

**Inputs**

- Run ID (`container_id`, text, required): The run ID returned by the Launch Phantom action. This identifies one run, and is not the Phantom's own ID. The address of the run's log page in PhantomBuster works too.
- Include console log (`include_log`, true/false): Also return the run's console log, the same one PhantomBuster shows on the Phantom's page. Useful to find out why a run failed. Default: `false`.

**Outputs**

- `container_id` (text)
- `created_at` (text)
- `done` (true/false): True once the run has ended, however it ended.
- `end_type` (text)
- `ended_at` (text)
- `errors` (list): The errors the Phantom reported during the run.
- `exit_code` (number)
- `launch_type` (text)
- `launched_at` (text)
- `log` (text)
- `log_truncated` (true/false)
- `metadata` (object)
- `notices` (list): Everything else the Phantom reported, such as that its input was already processed, which is why a run can end with no new results.
- `raw_status` (text)
- `retry_number` (number)
- `status` (text): running | finished | error | stopped | unknown
- `succeeded` (true/false): True when the run finished without an error.

**Example output**

```json
{
  "container_id": "9876543210987654",
  "created_at": "2026-10-15T09:00:00Z",
  "done": true,
  "end_type": "finished",
  "ended_at": "2026-10-15T09:03:12Z",
  "errors": [],
  "exit_code": 0,
  "launch_type": "user api call",
  "launched_at": "2026-10-15T09:00:04Z",
  "metadata": {
    "source": "lodol"
  },
  "notices": [],
  "raw_status": "finished",
  "retry_number": 0,
  "status": "finished",
  "succeeded": true
}
```

### Get workspace usage

See the workspace's PhantomBuster plan and how much of it is used: execution time, email and AI credits, storage and Phantom slots, each with its limit and when it resets. Check it before launching a long run.

**Inputs**: None.

**Outputs**

- `ai_credits` (object): AI credits.
- `captchas` (object): Captchas solved.
- `daily_reset_at` (text)
- `discovered_emails` (object): Emails found by email discovery.
- `emails` (object): Email credits.
- `execution_time` (object): Time Phantoms have spent running.
- `max_parallel_runs` (number)
- `monthly_reset_at` (text)
- `phantoms` (object): Phantom slots.
- `plan` (text)
- `plan_cancels_at` (text)
- `search_credits` (object): Search engine credits.
- `storage` (object): Storage for results files.

**Example output**

```json
{
  "ai_credits": {
    "daily": {
      "limit": 100,
      "remaining": 100,
      "used": 0
    },
    "monthly": {
      "limit": 1000,
      "remaining": 995,
      "used": 5
    }
  },
  "captchas": {
    "daily": {
      "limit": 10,
      "remaining": 10,
      "used": 0
    },
    "monthly": {
      "limit": 100,
      "remaining": 100,
      "used": 0
    }
  },
  "daily_reset_at": "2026-10-16T00:00:00Z",
  "discovered_emails": {
    "daily": {
      "limit": 0,
      "remaining": 0,
      "used": 0
    },
    "monthly": {
      "limit": 0,
      "remaining": 0,
      "used": 0
    }
  },
  "emails": {
    "daily": {
      "limit": 100,
      "remaining": 100,
      "used": 0
    },
    "monthly": {
      "limit": 500,
      "remaining": 480,
      "used": 20
    }
  },
  "execution_time": {
    "daily": {
      "limit": 600,
      "remaining": 560,
      "used": 40
    },
    "monthly": {
      "limit": 1200,
      "remaining": 900,
      "used": 300
    }
  },
  "max_parallel_runs": 1,
  "monthly_reset_at": "2026-11-01T00:00:00Z",
  "phantoms": {
    "limit": 5,
    "remaining": 2,
    "used": 3
  },
  "plan": "Start",
  "plan_cancels_at": null,
  "search_credits": {
    "daily": {
      "limit": 0,
      "remaining": 0,
      "used": 0
    },
    "monthly": {
      "limit": 0,
      "remaining": 0,
      "used": 0
    }
  },
  "storage": {
    "limit": 10000000,
    "remaining": 9988000,
    "used": 12000
  }
}
```

### Launch Phantom

Launch a Phantom. Any run inputs you provide (for example, a spreadsheet URL, a column name, or a profile URL) apply to this run only. The run continues in the background, so use Wait for run to finish, or Get run status, with the returned run ID to see when it finishes.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom to launch. Pick it from the list, or give its ID.
- Run inputs (`arguments`, object): Inputs for this run only, such as a spreadsheet URL or profile URL, under the field names the Phantom uses (Describe Phantom lists them). They override the Phantom's saved settings for this launch, and you can paste the JSON from the Phantom's JSON view in PhantomBuster. A Phantom takes one value per field: for many profiles, give a spreadsheet URL or launch it once per profile.
- Max runs at once (`max_instance_count`, number): Only launch if fewer than this many runs of this Phantom are already in progress. Helps you stay within your PhantomBuster limits. At least 1.
- Metadata (`metadata`, object): Your own labels and values to save with this run, so you can identify it later. List runs shows them.

**Outputs**

- `agent_id` (text)
- `container_id` (text): The run ID.
- `status` (text)

**Example output**

```json
{
  "agent_id": "1234567890123456",
  "container_id": "9876543210987654",
  "status": "launched"
}
```

### List Phantoms

List all Phantoms in the connected PhantomBuster workspace, so you can pick which one to launch. Each comes with its type, whether it is running now, and how its last run ended.

**Inputs**

- Include saved inputs (`include_settings`, true/false): Also return each Phantom's saved inputs. Session cookies and passwords are shown as hidden. Default: `false`.

**Outputs**

- `agent_count` (number)
- `agents` (list): The workspace's Phantoms.

**Example output**

```json
{
  "agent_count": 1,
  "agents": [
    {
      "created_at": "2026-09-01T10:00:00Z",
      "id": "1234567890123456",
      "last_run": {
        "end_type": "finished",
        "ended_at": "2026-10-14T16:20:00Z",
        "exit_code": 0,
        "status": "finished"
      },
      "launch_type": "manually",
      "name": "LinkedIn Followers Export",
      "running": false,
      "running_count": 0,
      "script": "LinkedIn Profile Scraper"
    }
  ]
}
```

### List runs

List a Phantom's recent runs, newest first, with how each one ended and the labels it was launched with.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom. Pick it from the list, give its ID, or paste the address of its page in PhantomBuster: the ID is the number after /phantoms/.
- Limit (`limit`, number): How many runs to return, up to 100. Defaults to 20. From 1 to 100. Default: `20`.
- Ended runs only (`finished_only`, true/false): Leave out runs that are still in progress. Default: `false`.

**Outputs**

- `limit_reached` (true/false): True when there are more runs than listed.
- `run_count` (number)
- `runs` (list)

**Example output**

```json
{
  "limit_reached": false,
  "run_count": 1,
  "runs": [
    {
      "container_id": "9876543210987654",
      "created_at": "2026-10-15T09:00:00Z",
      "done": true,
      "end_type": "finished",
      "ended_at": "2026-10-15T09:03:12Z",
      "errors": [],
      "exit_code": 0,
      "launch_type": "user api call",
      "launched_at": "2026-10-15T09:00:04Z",
      "metadata": {
        "source": "lodol"
      },
      "notices": [],
      "raw_status": "finished",
      "retry_number": 0,
      "status": "finished",
      "succeeded": true
    }
  ]
}
```

### Stop Phantom

Stop a Phantom's run in progress. Optionally turn off its schedule too, so it doesn't launch again on its own.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom. Pick it from the list, give its ID, or paste the address of its page in PhantomBuster: the ID is the number after /phantoms/.
- Let it wrap up (`graceful`, true/false): Ask the Phantom to stop cleanly, saving what it has collected so far, rather than stopping it at once. Default: `false`.
- Turn off its schedule (`turn_off_schedule`, true/false): Also switch the Phantom to manual launch, so it only runs again when someone launches it. Default: `false`.

**Outputs**

- `agent_id` (text)
- `graceful` (true/false)
- `schedule_turned_off` (true/false)
- `stopped` (true/false)

**Example output**

```json
{
  "agent_id": "1234567890123456",
  "graceful": false,
  "schedule_turned_off": false,
  "stopped": true
}
```

### Update Phantom

Change a Phantom's saved settings for every run from now on: its name, its inputs (such as a new session cookie or search URL), how it files results, or the webhook PhantomBuster calls when a run ends. Inputs you give are merged into its saved ones unless you choose to replace them.

**Inputs**

- Phantom (`agent_id`, text, required): The Phantom. Pick it from the list, give its ID, or paste the address of its page in PhantomBuster: the ID is the number after /phantoms/.
- Name (`name`, text): A new name for the Phantom, up to 100 characters.
- Inputs (`arguments`, object): Inputs to save, under the field names the Phantom uses (Describe Phantom lists them). A field set to null is removed.
- Replace all inputs (`replace_arguments`, true/false): Save exactly the inputs given, dropping every other saved one, instead of merging them in. Default: `false`.
- Results file (`file_management`, text): How the Phantom files each run's results. Starting a new file also makes it process inputs it has already seen. One of: `mix` (Add to the existing file), `folders` (New file for each run), `delete` (Replace the file each run).
- Webhook URL (`webhook_url`, text): A public address PhantomBuster posts each run's outcome and results to when it ends, such as a Lodol workflow's webhook trigger. PhantomBuster drops the webhook if the address answers with an error.

**Outputs**

- `agent_id` (text)
- `updated` (list): The settings that were changed.

**Example output**

```json
{
  "agent_id": "1234567890123456",
  "updated": [
    "name",
    "arguments"
  ]
}
```

### Wait for run to finish

Wait for a Phantom run to end, then report how it ended. If it is still going when the wait is up, the step hands it back with timed_out set, so a later step can wait again. A run that fails does not fail this step: check succeeded.

**Inputs**

- Run ID (`container_id`, text, required): The run ID returned by the Launch Phantom action. This identifies one run, and is not the Phantom's own ID. The address of the run's log page in PhantomBuster works too.
- Longest wait (seconds) (`max_wait_seconds`, number): How long to wait for the run before moving on, up to 900 seconds. Defaults to 300. From 0 to 900. Default: `300`.

**Outputs**

- `container_id` (text)
- `created_at` (text)
- `done` (true/false): True once the run has ended, however it ended.
- `end_type` (text)
- `ended_at` (text)
- `errors` (list): The errors the Phantom reported during the run.
- `exit_code` (number)
- `launch_type` (text)
- `launched_at` (text)
- `metadata` (object)
- `notices` (list): Everything else the Phantom reported, such as that its input was already processed, which is why a run can end with no new results.
- `raw_status` (text)
- `retry_number` (number)
- `status` (text): running | finished | error | stopped | unknown
- `succeeded` (true/false): True when the run finished without an error.
- `timed_out` (true/false): True when the run was still going.

**Example output**

```json
{
  "container_id": "9876543210987654",
  "created_at": "2026-10-15T09:00:00Z",
  "done": true,
  "end_type": "finished",
  "ended_at": "2026-10-15T09:03:12Z",
  "errors": [],
  "exit_code": 0,
  "launch_type": "user api call",
  "launched_at": "2026-10-15T09:00:04Z",
  "metadata": {
    "source": "lodol"
  },
  "notices": [],
  "raw_status": "finished",
  "retry_number": 0,
  "status": "finished",
  "succeeded": true,
  "timed_out": false
}
```
