home / skills / openclaw / skills / phantombuster

phantombuster skill

/skills/andrewdmwalker/phantombuster

This skill lets you manage PhantomBuster agents from the command line, listing, launching, retrieving results, and aborting runs to automate workflows.

npx playbooks add skill openclaw/skills --skill phantombuster

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.6 KB
---
name: phantombuster
description: Control PhantomBuster automation agents via API. List agents, launch automations, get output/results, check status, and abort running agents. Use when the user needs to run LinkedIn scraping, Twitter automation, lead generation phantoms, or any PhantomBuster workflow.
version: 1.0.0
author: captmarbles
---

# PhantomBuster Skill

Control your [PhantomBuster](https://phantombuster.com) automation agents from the command line.

## Setup

1. Get your API key from [Workspace Settings](https://phantombuster.com/workspace-settings)
2. Set the environment variable:
   ```bash
   export PHANTOMBUSTER_API_KEY=your-api-key-here
   ```

## Usage

All commands use the bundled `pb.py` script in this skill's directory.

### List Agents

See all your configured PhantomBuster agents.

```bash
python3 pb.py list
python3 pb.py list --json  # JSON output
```

### Launch an Agent

Start a phantom by ID or name.

```bash
python3 pb.py launch <agent-id>
python3 pb.py launch <agent-id> --argument '{"search": "CEO fintech"}'
```

### Get Agent Output

Fetch the results/output from the most recent run.

```bash
python3 pb.py output <agent-id>
python3 pb.py output <agent-id> --json  # Raw JSON
```

### Check Agent Status

See if an agent is running, finished, or errored.

```bash
python3 pb.py status <agent-id>
```

### Abort Running Agent

Stop an agent that's currently running.

```bash
python3 pb.py abort <agent-id>
```

### Get Agent Details

Full details about a specific agent.

```bash
python3 pb.py get <agent-id>
```

### Fetch Result Data

Download the actual result data (CSV) from an agent's latest run.

```bash
python3 pb.py fetch-result <agent-id>
python3 pb.py fetch-result <agent-id> > output.csv
```

This downloads the `result.csv` file from the agent's S3 storage, perfect for integrating PhantomBuster data into your workflows.

## Example Prompts

- *"List my PhantomBuster agents"*
- *"Launch my LinkedIn Sales Navigator scraper"*
- *"Get the output from agent 12345"*
- *"Check if my Twitter follower phantom is still running"*
- *"Abort the currently running agent"*

## Common Phantoms

PhantomBuster offers many pre-built automations:
- **LinkedIn Sales Navigator Search** — Extract leads from searches
- **LinkedIn Profile Scraper** — Get profile data
- **Twitter Follower Collector** — Scrape followers
- **Instagram Profile Scraper** — Get IG profile data
- **Google Maps Search Export** — Extract business listings

## Rate Limits

PhantomBuster has execution time limits based on your plan. The API itself is not heavily rate-limited, but agent execution consumes your plan's minutes.

Overview

This skill lets you control PhantomBuster automation agents via API from scripts or the command line. It enables listing agents, launching automations, retrieving outputs/results, checking run status, and aborting running agents. Use it to integrate PhantomBuster workflows into data pipelines, lead-generation tasks, or scheduled automation.

How this skill works

The skill calls PhantomBuster's API using your workspace API key to list agents, start phantoms, poll run status, fetch run outputs (CSV or JSON), and stop active runs. It can download result files from the agent's S3 storage for easy integration with downstream tools. Commands map to common operations: list, launch, status, output, fetch-result, abort, and get details.

When to use it

  • Automating LinkedIn or Twitter scraping jobs from your CI or scheduler
  • Triggering lead-generation phantoms from a CRM or webhook
  • Fetching most recent run outputs for ETL pipelines
  • Checking or aborting long-running agents remotely
  • Downloading CSV results for reporting or archival

Best practices

  • Store your PHANTOMBUSTER_API_KEY in a secure environment variable, not in code
  • Validate agent IDs and names before launching to avoid unexpected runs
  • Use JSON arguments for phantoms that accept custom inputs to keep runs reproducible
  • Poll status with reasonable intervals to avoid excessive API calls
  • Download result.csv immediately after run completion and archive in your storage

Example use cases

  • Start a LinkedIn Sales Navigator phantom with a saved search and ingest results into a lead database
  • Schedule nightly runs of a Twitter follower collector and append CSV results to a data lake
  • Abort a phantom that gets stuck during a website change without manually logging into the dashboard
  • List all agents in a workspace to build an automated health-check dashboard
  • Fetch the latest agent output programmatically and trigger downstream processing

FAQ

How do I authenticate?

Set PHANTOMBUSTER_API_KEY as an environment variable from your workspace settings and the skill uses it for API calls.

Can I get raw JSON output instead of CSV?

Yes. Several commands support a JSON flag to return raw API responses; results also include links to exported files such as result.csv.