> **Building with AI coding agents?** If you're using an AI coding agent, install the official Scalekit plugin. It gives your agent full awareness of the Scalekit API — reducing hallucinations and enabling faster, more accurate code generation.
>
> - **Claude Code**: `/plugin marketplace add scalekit-inc/claude-code-authstack` then `/plugin install <auth-type>@scalekit-auth-stack`
> - **GitHub Copilot CLI**: `copilot plugin marketplace add scalekit-inc/github-copilot-authstack` then `copilot plugin install <auth-type>@scalekit-auth-stack`
> - **Codex**: run the bash installer, restart, then open Plugin Directory and enable `<auth-type>`
> - **Skills CLI** (Windsurf, Cline, 40+ agents): `npx skills add scalekit-inc/skills --list` then `--skill <skill-name>`
>
> `<auth-type>` / `<skill-name>`: `agentkit`, `full-stack-auth`, `mcp-auth`, `modular-sso`, `modular-scim` — [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# PhantomBuster

**Authentication:** API Key
**Categories:** Ai, Automation
## What you can do

Connect this agent connector to let your agent:

- **Attach container** — Attach to a running PhantomBuster container and stream its console output in real-time
- **Launch agent** — Launch a PhantomBuster automation agent asynchronously
- **Fetch agent, org, lists** — Get the output of the most recent container of an agent
- **Completions ai** — Get an AI text completion from PhantomBuster's AI service
- **Release branch** — Release (promote to production) specified scripts on a branch in the current PhantomBuster organization
- **Stop agent** — Stop a currently running PhantomBuster agent execution

## Authentication

This connector uses **API Key** authentication. Your users provide their PhantomBuster API key once, and Scalekit stores and manages it securely. Your agent code never handles keys directly — you only pass a `connectionName` and a user `identifier`.

Before calling this connector from your code, create the PhantomBuster connection in **AgentKit** > **Connections** and copy the exact **Connection name** from that connection into your code. The value in code must match the dashboard exactly.

## Set up the connector

Register your PhantomBuster API key with Scalekit so it can authenticate and proxy automation requests on behalf of your users. PhantomBuster uses API key authentication — there is no redirect URI or OAuth flow.

1. ### Get your PhantomBuster API key

    - Sign in to [phantombuster.com](https://phantombuster.com) and go to **Settings** → **API** in the left sidebar.

    - Your API key is displayed on this page. Click the copy icon to copy it. If you need a new key, click **Regenerate**.

    > Image: PhantomBuster Settings API page showing the API key field with copy button

    > caution: Keep your API key secret
>
> Your PhantomBuster API key grants full access to your organization — including launching agents, reading lead data, and managing billing. Never expose it in client-side code or commit it to source control.

    > note: Plan requirements
>
> PhantomBuster tools require different subscription tiers. Review the table below before choosing a plan at [phantombuster.com/pricing](https://phantombuster.com/pricing):
>
> | Plan | Included resources | Notes |
> | --- | --- | --- |
> | **Trial** | 2 hrs execution time/month, 1 agent | Core agent and container tools only |
> | **Starter** | 20 hrs/month, up to 5 agents | Leads, lists, basic org tools |
> | **Pro** | 80 hrs/month, up to 15 agents | CRM integration, AI credits, SERP credits |
> | **Team** | 300 hrs/month, unlimited agents | Custom scripts, branches, full org export |
> | **Business** | Custom | SSO, dedicated support, custom limits |
>
> Specific tool requirements:
> - `phantombuster_ai_completions` — requires **AI credits** (included in Pro+, or purchasable add-on)
> - `phantombuster_org_save_crm_contact` — requires a **HubSpot CRM integration** configured in org settings (Pro+)
> - `phantombuster_branch_*` — requires **custom script access** (Team+)
> - `phantombuster_org_export_*` — requires **Pro+** for full date ranges (up to 6 months)

2. ### Create a connection in Scalekit

    - In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** > **Create Connection**. Find **PhantomBuster** and click **Create**.

    - Note the **Connection name** — you will use this as `connection_name` in your code (e.g., `phantombuster`).

    > Image: Scalekit connection configuration page for PhantomBuster showing the connection name and API Key authentication type

3. ### Add a connected account

    Connected accounts link a specific user identifier in your system to a PhantomBuster API key. Add accounts via the dashboard for testing, or via the Scalekit API in production.

    **Via dashboard (for testing)**

    - Open the connection you created and click the **Connected Accounts** tab → **Add account**.

    - Fill in:
      - **Your User's ID** — a unique identifier for this user in your system (e.g., `user_123`)
      - **API Key** — the PhantomBuster API key you copied in step 1

    - Click **Save**.

    > Image: Add connected account form for PhantomBuster in Scalekit dashboard showing User ID and API Key fields

    **Via API (for production)**

    
      ### Node.js

```typescript
await scalekit.actions.upsertConnectedAccount({
  connectionName: 'phantombuster',
  identifier: 'user_123',
  credentials: { api_key: 'your-phantombuster-api-key' },
});
```

      ### Python

```python
scalekit_client.actions.upsert_connected_account(
    connection_name="phantombuster",
    identifier="user_123",
    credentials={"api_key": "your-phantombuster-api-key"}
)
```

    

    > tip: Production usage tip
>
> In production, call `upsertConnectedAccount` when a user connects their PhantomBuster account — for example, after they paste their API key into a settings page in your app.

> note: Rate limits
>
> PhantomBuster enforces per-plan API rate limits. Exceeding them returns `429 Too Many Requests`. Monitor your execution time and resource usage at [phantombuster.com](https://phantombuster.com) → **Dashboard** → **Usage**.

## Code examples

Once a connected account is set up, call the PhantomBuster API through the Scalekit proxy. Scalekit injects the API key as the `X-Phantombuster-Key` header automatically — you never handle credentials in your application code.

## Proxy API calls

  ### Node.js

```typescript

const connectionName = 'phantombuster'; // connection name from your Scalekit dashboard
const identifier = 'user_123';          // your user's unique identifier

// Get your credentials from app.scalekit.com → Developers → Settings → API Credentials
const scalekit = new ScalekitClient(
  process.env.SCALEKIT_ENV_URL,
  process.env.SCALEKIT_CLIENT_ID,
  process.env.SCALEKIT_CLIENT_SECRET
);
const actions = scalekit.actions;

// List all agents via Scalekit proxy — no API key needed here
const result = await actions.request({
  connectionName,
  identifier,
  path: '/api/v2/agents',
  method: 'GET',
});
console.log(result.data);
```

  ### Python

```python

from dotenv import load_dotenv
load_dotenv()

connection_name = "phantombuster"  # connection name from your Scalekit dashboard
identifier = "user_123"            # your user's unique identifier

# Get your credentials from app.scalekit.com → Developers → Settings → API Credentials
scalekit_client = scalekit.client.ScalekitClient(
    client_id=os.getenv("SCALEKIT_CLIENT_ID"),
    client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
    env_url=os.getenv("SCALEKIT_ENV_URL"),
)
actions = scalekit_client.actions

# List all agents via Scalekit proxy — no API key needed here
result = actions.request(
    connection_name=connection_name,
    identifier=identifier,
    path="/api/v2/agents",
    method="GET"
)
print(result)
```

> tip: No OAuth flow needed
>
> PhantomBuster uses API key auth — unlike OAuth connectors, there is no authorization link or redirect flow. Once you call `upsertConnectedAccount` (or add an account via the dashboard), your users can make requests immediately.

## Scalekit tools

Use `execute_tool` to call PhantomBuster tools directly from your code. Scalekit resolves the connected account, injects the API key, and returns a structured response — no raw HTTP or credential management needed.

### Launch an agent and retrieve results

The most common PhantomBuster workflow: launch an automation agent, stream its console output while it runs, then read the final result.

```python title="examples/phantombuster_launch.py"

from dotenv import load_dotenv
load_dotenv()

scalekit_client = scalekit.client.ScalekitClient(
    client_id=os.getenv("SCALEKIT_CLIENT_ID"),
    client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
    env_url=os.getenv("SCALEKIT_ENV_URL"),
)
actions = scalekit_client.actions

connection_name = "phantombuster"
identifier = "user_123"

# Step 1: Resolve the connected account for this user
response = actions.get_or_create_connected_account(
    connection_name=connection_name,
    identifier=identifier
)
connected_account = response.connected_account

# Step 2: Find the agent you want to run
agents = actions.execute_tool(
    tool_name="phantombuster_agents_fetch_all",
    connected_account_id=connected_account.id,
    tool_input={}
)
agent_id = agents.result[0]["id"]  # pick the first agent, or filter by name

# Step 3: Launch the agent
launch_result = actions.execute_tool(
    tool_name="phantombuster_agent_launch",
    connected_account_id=connected_account.id,
    tool_input={
        "id": agent_id,
        "output": "result-object",
    }
)
container_id = launch_result.result["containerId"]
print(f"Agent launched. Container ID: {container_id}")

# Step 4: Poll for output until the agent finishes
output_pos = 0
while True:
    output = actions.execute_tool(
        tool_name="phantombuster_container_fetch_output",
        connected_account_id=connected_account.id,
        tool_input={"id": container_id, "fromOutputPos": output_pos}
    )
    print(output.result.get("output", ""), end="", flush=True)
    output_pos = output.result.get("nextOutputPos", output_pos)
    if output.result.get("status") in ("finished", "error"):
        break
    time.sleep(3)  # poll every 3 seconds

# Step 5: Fetch the structured result
final_result = actions.execute_tool(
    tool_name="phantombuster_container_fetch_result",
    connected_account_id=connected_account.id,
    tool_input={"id": container_id}
)
print("Scraped profiles:", final_result.result)
```

### Save scraped profiles as leads

After a scraping run, bulk-save extracted profiles to a PhantomBuster lead list for downstream CRM enrichment or outreach.

```python title="examples/phantombuster_save_leads.py"
# First: fetch available lead lists (or create one in the PhantomBuster dashboard)
lists = actions.execute_tool(
    tool_name="phantombuster_lists_fetch_all",
    connected_account_id=connected_account.id,
    tool_input={}
)
list_id = lists.result[0]["id"]  # use the first list, or filter by name

# Bulk-save up to 1,000 profiles in one call — more efficient than looping
actions.execute_tool(
    tool_name="phantombuster_leads_save_many",
    connected_account_id=connected_account.id,
    tool_input={
        "listId": list_id,
        "leads": [
            {
                "firstName": p.get("firstName"),
                "lastName": p.get("lastName"),
                "email": p.get("email"),
                "linkedinUrl": p.get("linkedinUrl"),
                "company": p.get("company"),
                "jobTitle": p.get("title"),
                "additionalFields": {
                    "source": "phantombuster-scraper",
                    "agentId": agent_id,
                    "containerId": container_id,
                },
            }
            for p in final_result.result
        ],
    }
)
print(f"{len(final_result.result)} leads saved to list {list_id}.")
```

### Check resource usage before running agents

Avoid quota errors by verifying execution time and credit balances before launching a large scraping run.

```python title="examples/phantombuster_check_resources.py"
resources = actions.execute_tool(
    tool_name="phantombuster_org_fetch_resources",
    connected_account_id=connected_account.id,
    tool_input={}
)

exec_time = resources.result.get("executionTime", {})
ai_credits = resources.result.get("aiCredits", {})

if exec_time.get("remaining", 0) < 30:
    raise RuntimeError(
        f"Insufficient execution time: {exec_time.get('remaining')} min remaining. "
        "Upgrade at phantombuster.com/pricing or wait for your plan to reset."
    )

print(f"Execution time: {exec_time['remaining']} min remaining ({exec_time.get('used')} used)")
print(f"AI credits: {ai_credits.get('remaining', 'N/A')}")
```

### Run AI completions on scraped data

Use PhantomBuster's AI service to extract structured data from raw agent output — such as parsing job titles into seniority levels or extracting skills from profile summaries.

> note: Requires AI credits
>
> `phantombuster_ai_completions` consumes AI credits from your plan. Monitor usage at **PhantomBuster dashboard → Usage**. AI credits are included in Pro+ plans and available as an add-on.

```python title="examples/phantombuster_ai_enrichment.py"
# Extract structured data from a raw LinkedIn profile headline
completion = actions.execute_tool(
    tool_name="phantombuster_ai_completions",
    connected_account_id=connected_account.id,
    tool_input={
        "model": "gpt-4o",
        "messages": [
            {
                "role": "system",
                "content": "Extract the seniority level and primary skill from this LinkedIn headline. Return JSON only.",
            },
            {
                "role": "user",
                "content": "Senior Software Engineer at Acme Corp | React, TypeScript, GraphQL",
            },
        ],
        "responseSchema": {
            "type": "object",
            "properties": {
                "seniority": {"type": "string", "enum": ["junior", "mid", "senior", "lead", "exec"]},
                "primarySkill": {"type": "string"},
            },
            "required": ["seniority", "primarySkill"],
        },
    }
)
print("Parsed profile:", completion.result)
# → {'seniority': 'senior', 'primarySkill': 'React'}
```

### LangChain integration

Let an LLM decide which PhantomBuster tool to call based on natural language. This example builds an agent that can manage automation runs and leads in response to user input.

```python title="examples/phantombuster_langchain.py"

from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain_core.prompts import (
    ChatPromptTemplate, SystemMessagePromptTemplate,
    HumanMessagePromptTemplate, MessagesPlaceholder, PromptTemplate
)
load_dotenv()

scalekit_client = scalekit.client.ScalekitClient(
    client_id=os.getenv("SCALEKIT_CLIENT_ID"),
    client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
    env_url=os.getenv("SCALEKIT_ENV_URL"),
)
actions = scalekit_client.actions

identifier = "user_123"

# Resolve connected account (API key auth — no OAuth redirect needed)
actions.get_or_create_connected_account(
    connection_name="phantombuster",
    identifier=identifier
)

# Load all PhantomBuster tools in LangChain format. Use page_size=100 so connector tool lists are not truncated.
tools = actions.langchain.get_tools(
    identifier=identifier,
    providers=["PHANTOMBUSTER"],
    page_size=100
)

prompt = ChatPromptTemplate.from_messages([
    SystemMessagePromptTemplate(prompt=PromptTemplate(
        input_variables=[],
        template=(
            "You are a PhantomBuster automation assistant. "
            "Use the available tools to manage agents, check resource usage, "
            "manage leads, and analyse automation run results."
        )
    )),
    MessagesPlaceholder(variable_name="chat_history", optional=True),
    HumanMessagePromptTemplate(prompt=PromptTemplate(
        input_variables=["input"], template="{input}"
    )),
    MessagesPlaceholder(variable_name="agent_scratchpad")
])

llm = ChatOpenAI(model="gpt-4o")
agent = create_openai_tools_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

result = agent_executor.invoke({
    "input": "List all my agents, show which ones ran in the last 24 hours, and tell me how many leads are in each list"
})
print(result["output"])
```

## Tool list

Use the exact tool names from the **Tool list** below when you call `execute_tool`. If you're not sure which name to use, list the tools available for the current user first.

## Tool list

### `phantombuster_agent_delete`

Permanently delete a PhantomBuster agent and all its associated data. This action is irreversible.

Parameters:

- `agentId` (`string`, required): The unique identifier of the agent to permanently delete.

### `phantombuster_agent_fetch`

Retrieve details of a specific PhantomBuster agent by its ID. Returns agent name, script, schedule, launch type, argument configuration, and current status.

Parameters:

- `agentId` (`string`, required): The unique identifier of the agent to retrieve.

### `phantombuster_agent_fetch_output`

Get the output of the most recent container of an agent. Designed for incremental data retrieval — use fromOutputPos to fetch only new output since the last call.

Parameters:

- `id` (`string`, required): ID of the agent to fetch output from.
- `fromOutputPos` (`number`, optional): Start output from this byte position (for incremental fetching).
- `prevContainerId` (`string`, optional): Retrieve output from the container after this previous container ID.
- `prevRuntimeEventIndex` (`number`, optional): Return runtime events starting from this index.
- `prevStatus` (`string`, optional): Previously retrieved status from user-side (for delta detection).

### `phantombuster_agent_launch`

Launch a PhantomBuster automation agent asynchronously. Starts the agent execution immediately and returns a container ID to track progress. Use the Get Container Output or Get Container Result tools to retrieve results.

Parameters:

- `agentId` (`string`, required): The unique identifier of the agent to launch.
- `arguments` (`object`, optional): JSON object of input arguments to pass to the agent for this execution.
- `output` (`string`, optional): Output mode for the launch response.
- `saveArguments` (`boolean`, optional): Whether to persist the provided arguments as the agent's default arguments for future launches.

### `phantombuster_agent_launch_soon`

Schedule a PhantomBuster agent to launch within a specified number of minutes. Useful for delayed execution without setting up a full recurring schedule.

Parameters:

- `id` (`string`, required): ID of the agent to schedule.
- `minutes` (`integer`, required): Number of minutes from now after which the agent will launch.
- `argument` (`object`, optional): Input arguments to pass to the agent for this execution (object or JSON string).
- `saveArgument` (`boolean`, optional): If true, saves the provided argument as the agent's default for future launches.

### `phantombuster_agent_save`

Create a new PhantomBuster agent or update an existing one. Supports configuring the script, schedule, proxy, notifications, execution limits, and launch arguments. Pass an ID to update; omit to create.

Parameters:

- `argument` (`object`, optional): Default launch argument for the agent (object or JSON string).
- `branch` (`string`, optional): Script branch to use (e.g., main, staging).
- `executionTimeLimit` (`number`, optional): Maximum execution time in seconds before the agent is killed.
- `id` (`string`, optional): ID of the agent to update. Omit to create a new agent.
- `launchType` (`string`, optional): How the agent is launched.
- `maxParallelism` (`number`, optional): Maximum number of concurrent executions allowed for this agent.
- `maxRetryNumber` (`number`, optional): Maximum number of retries before aborting on failure.
- `name` (`string`, optional): Display name for the agent.
- `proxyAddress` (`string`, optional): HTTP proxy address or proxy pool name.
- `proxyPassword` (`string`, optional): Proxy authentication password.
- `proxyType` (`string`, optional): Proxy configuration type.
- `proxyUsername` (`string`, optional): Proxy authentication username.
- `script` (`string`, optional): Script slug or name to assign to this agent.

### `phantombuster_agent_stop`

Stop a currently running PhantomBuster agent execution. Gracefully halts the agent and saves any partial results collected up to that point.

Parameters:

- `agentId` (`string`, required): The unique identifier of the agent to stop.

### `phantombuster_agents_fetch_all`

Retrieve all automation agents in the PhantomBuster organization. Returns agent IDs, names, associated scripts, schedules, and current status.

### `phantombuster_agents_fetch_deleted`

Retrieve all deleted agents in the PhantomBuster organization. Returns agent IDs, names, creation timestamps, deletion timestamps, and who deleted each agent.

### `phantombuster_agents_unschedule_all`

Disable automatic launch for ALL agents in the current PhantomBuster organization. Agents will remain but will only run when launched manually.

### `phantombuster_ai_completions`

Get an AI text completion from PhantomBuster's AI service. Supports multiple models including GPT-4o and GPT-4.1-mini. Optionally request structured JSON output via a response schema.

Parameters:

- `messages` (`array`, required): Array of conversation messages. Each must have a role (system, assistant, or user) and content string.
- `model` (`string`, optional): AI model to use for the completion.
- `temperature` (`number`, optional): Sampling temperature (0–2). Lower = more deterministic, higher = more creative.

### `phantombuster_branch_create`

Create a new script branch in the current PhantomBuster organization.

Parameters:

- `name` (`string`, required): Name for the new branch. Only letters, numbers, underscores, and hyphens allowed. Max 50 characters.

### `phantombuster_branch_delete`

Permanently delete a branch by ID from the current PhantomBuster organization.

Parameters:

- `id` (`string`, required): ID of the branch to delete.

### `phantombuster_branch_release`

Release (promote to production) specified scripts on a branch in the current PhantomBuster organization.

Parameters:

- `name` (`string`, required): Name of the branch to release.
- `scriptIds` (`array`, required): Array of script IDs to release on this branch.

### `phantombuster_branches_fetch_all`

Retrieve all branches associated with the current PhantomBuster organization.

### `phantombuster_container_attach`

Attach to a running PhantomBuster container and stream its console output in real-time. Returns a live stream of log lines as the agent executes.

Parameters:

- `id` (`string`, required): ID of the running container to attach to.

### `phantombuster_container_fetch`

Retrieve a single PhantomBuster container by its ID. Returns status, timestamps, launch type, exit code, and optionally the full output, result object, and runtime events.

Parameters:

- `id` (`string`, required): ID of the container to fetch.
- `withNewerAndOlderContainerId` (`boolean`, optional): Set to true to include the IDs of the next and previous containers for this agent.
- `withOutput` (`boolean`, optional): Set to true to include the container's console output.
- `withResultObject` (`boolean`, optional): Set to true to include the container's result object.
- `withRuntimeEvents` (`boolean`, optional): Set to true to include runtime events (progress, notifications, etc.).

### `phantombuster_container_fetch_output`

Retrieve the console output and execution logs of a specific PhantomBuster container (agent run). Useful for monitoring execution progress, debugging errors, and viewing step-by-step agent activity.

Parameters:

- `containerId` (`string`, required): The unique identifier of the container whose output to retrieve.

### `phantombuster_container_fetch_result`

Retrieve the final result object of a completed PhantomBuster container (agent run). Returns the structured data extracted or produced by the agent, such as scraped profiles, leads, or exported records.

Parameters:

- `containerId` (`string`, required): The unique identifier of the container whose result to retrieve.

### `phantombuster_containers_fetch_all`

Retrieve all execution containers (past runs) for a specific PhantomBuster agent. Returns container IDs, status, launch type, exit codes, timestamps, and runtime events for each execution.

Parameters:

- `agentId` (`string`, required): The unique identifier of the agent whose containers to retrieve.

### `phantombuster_leads_delete_many`

Permanently delete multiple leads from PhantomBuster organization storage by their IDs.

Parameters:

- `ids` (`array`, required): Array of lead IDs to delete.

### `phantombuster_leads_fetch_by_list`

Fetch paginated leads belonging to a specific lead list in PhantomBuster organization storage.

Parameters:

- `listId` (`string`, required): ID of the lead list to fetch leads from.
- `includeTotalCount` (`boolean`, optional): Include the total count of leads in the response.
- `paginationOffset` (`integer`, optional): Offset for pagination.
- `paginationOrder` (`string`, optional): Sort order for pagination.
- `paginationSize` (`integer`, optional): Number of leads per page.

### `phantombuster_leads_save`

Save a single lead to PhantomBuster organization storage.

Parameters:

- `lead` (`object`, required): Lead data object to save.

### `phantombuster_leads_save_many`

Save multiple leads at once to PhantomBuster organization storage.

Parameters:

- `leads` (`array`, required): Array of lead objects to save.

### `phantombuster_list_delete`

Permanently delete a lead list from PhantomBuster organization storage by its ID.

Parameters:

- `id` (`string`, required): ID of the lead list to delete.

### `phantombuster_list_fetch`

Retrieve a specific lead list from PhantomBuster organization storage by its ID.

Parameters:

- `id` (`string`, required): ID of the lead list to fetch.

### `phantombuster_lists_fetch_all`

Retrieve all lead lists in the PhantomBuster organization's storage.

### `phantombuster_location_ip`

Retrieve the country associated with an IPv4 or IPv6 address using PhantomBuster's geolocation service.

Parameters:

- `ip` (`string`, required): IPv4 or IPv6 address to look up.

### `phantombuster_org_export_agent_usage`

Export a CSV file containing agent usage metrics for the current PhantomBuster organization over a specified number of days (max 6 months).

Parameters:

- `days` (`string`, required): Number of days of usage data to export. Maximum is ~180 days (6 months).

### `phantombuster_org_export_container_usage`

Export a CSV file containing container usage metrics for the current PhantomBuster organization. Optionally filter to a specific agent.

Parameters:

- `days` (`string`, required): Number of days of usage data to export. Maximum is ~180 days (6 months).
- `agentId` (`string`, optional): Filter the export to a specific agent ID.

### `phantombuster_org_fetch`

Retrieve details of the current PhantomBuster organization including plan, billing, timezone, proxy config, and CRM integrations.

Parameters:

- `withCrmIntegrations` (`boolean`, optional): Include the organization's CRM integrations.
- `withCustomPrompts` (`boolean`, optional): Include the organization's custom prompts.
- `withGlobalObject` (`boolean`, optional): Include the organization's global object in the response.
- `withProxies` (`boolean`, optional): Include the organization's proxy pool configuration.

### `phantombuster_org_fetch_agent_groups`

Retrieve the agent groups and their ordering for the current PhantomBuster organization.

### `phantombuster_org_fetch_resources`

Retrieve the current PhantomBuster organization's resource usage and limits. Returns daily and monthly usage for execution time, mail, captcha, AI credits, SERP credits, storage, and agent count.

### `phantombuster_org_fetch_running_containers`

List all currently executing containers across the PhantomBuster organization. Returns container IDs, associated agent IDs/names, creation timestamps, launch types, and script slugs.

### `phantombuster_org_save_agent_groups`

Update the agent groups and their ordering for the current PhantomBuster organization. The order of groups and agents within groups is preserved as provided.

Parameters:

- `agentGroups` (`array`, required): Array of agent groups. Each item is either an agent ID string or an object with id, name, and agents array.

### `phantombuster_org_save_crm_contact`

Save a new contact to the organization's connected CRM (HubSpot). Requires a CRM integration to be configured in the PhantomBuster organization settings.

Parameters:

- `crmName` (`string`, required): The CRM to save the contact to.
- `firstname` (`string`, required): Contact's first name.
- `lastname` (`string`, required): Contact's last name.
- `pb_linkedin_profile_url` (`string`, required): LinkedIn profile URL of the contact.
- `company` (`string`, optional): Company the contact works at.
- `email` (`string`, optional): Contact's email address.
- `jobtitle` (`string`, optional): Contact's job title.
- `phone` (`string`, optional): Contact's phone number.

### `phantombuster_script_fetch`

Retrieve a specific PhantomBuster script by ID including its manifest, argument schema, output types, and optionally the full source code.

Parameters:

- `id` (`string`, required): ID of the script to fetch.
- `branch` (`string`, optional): Branch of the script to fetch.
- `withCode` (`boolean`, optional): Set to true to include the script's source code in the response.

### `phantombuster_scripts_fetch_all`

Retrieve all scripts associated with the current PhantomBuster user. Returns script IDs, names, slugs, descriptions, branches, and manifest details.

Parameters:

- `branch` (`string`, optional): Filter scripts by branch name.
- `exclude` (`string`, optional): Exclude modules or non-modules from results.
- `org` (`string`, optional): Filter scripts by organization.


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
