Skip to content

PhantomBuster

PhantomBuster

PhantomBuster is a cloud-based data extraction and automation platform that enables users to automate actions on the web, such as scraping data from social networks, generating qualified leads, and automating tasks on platforms like LinkedIn, Twitter, and others. With the PhantomBuster integration in SquadOS, your agents can launch and monitor automations, manage leads in organization storage, run custom scripts, and export usage reports — all via API without manual intervention.

This tool uses API key (API_KEY) to connect.

You will need the following fields:

FieldRequiredDescription
api_keyYesAPI key from your PhantomBuster account, used to authenticate all API calls.
  1. Go to phantombuster.com and log in to your account.
  2. Click on your avatar or profile name in the upper-right corner and select Settings.
  3. In the settings sidebar, click API (or API Keys).
  4. Copy the API key displayed — this is the value to use in the api_key field when connecting in SquadOS.
  1. Go to Tools in the side menu (/admin/tools).
  2. Open the Available tab and search for PhantomBuster.
  3. Click the card to open the details modal and hit Connect.
  4. You’re taken to the secure connection page hosted by Composio, where you enter the credentials obtained above.
  5. Once done, you’re sent back to SquadOS with the account connected and the tool available for your agents. (Connection-flow details in Organization Tools.)

PHANTOMBUSTER_ABORT_AGENT_V1

Tool to abort all running instances of an agent using the legacy v1 API. Use when you need to immediately stop an agent’s execution. Supports soft abort for graceful shutdown.

NameTypeRequiredDescription
idintegerYesID of the agent to abort. All running instances of this agent will be stopped.
softAbortbooleanNoIf true, attempts a soft abort of the agent. Soft abort allows the agent to gracefully finish its current operation before stopping.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_DELETE_AGENT

Tool to delete an agent by id. Use when you need to remove a PhantomBuster agent. Ensure the agent is not currently running before deletion.

NameTypeRequiredDescription
idstringYesId of the agent to delete.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_DELETE_LEAD_OBJECTS

Tool to delete one or more lead objects from organization storage. Use when you need to remove lead data. Provide either leadObjectId, or both slug and type parameters.

NameTypeRequiredDescription
slugstringNoSlug of the object to delete. Must be used together with type parameter.
typestringNoType of object to delete. Must be used together with slug parameter.
leadObjectIdstringNoID of a lead object to delete. Provide either leadObjectId, or both slug and type.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_DELETE_LEADS_MANY

Tool to delete multiple leads from organization storage. Use when you need to bulk delete leads by their IDs.

NameTypeRequiredDescription
idsarrayYesList of lead IDs to delete. Each ID must be a valid lead identifier string.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_DELETE_LIST

Tool to delete a storage list by id (Beta). Use when you need to remove a list from organization storage.

NameTypeRequiredDescription
idstringYesId of the list to delete.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_DELETE_SCRIPT

Tool to delete a script by id. Use when you need to remove a specific script from PhantomBuster. Optionally specify a branch and environment to delete a specific version.

NameTypeRequiredDescription
idstringYesId of the script to delete.
branchstringNoBranch of the script to delete. Must be 1-50 characters, alphanumeric, underscores, or hyphens.
environmentstring (“staging” | “release”)NoEnum for script branch environment.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_AGENT

Tool to get an agent by its ID. Use when you need to retrieve detailed information about a specific Phantombuster agent, including its configuration, schedule, and execution settings.

NameTypeRequiredDescription
idstringYesId of the agent to fetch.
withCodestringNoSet to “true” if you want to include the agent’s script code in the response.
withSlavesstringNoSet to “true” if you want to include the agent’s slave agents in the response.
withManifeststringNoSet to “true” if you want to return the agent’s manifest in the response.
withSubSlavesstringNoSet to “true” if you want to include the agent’s sub-slave agents in the response (requires withSlaves=true).
withAgentObjectstringNoSet to “true” if you want to include the agent_object in the response.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_AGENT_CONTAINERS

Tool to get a list of ended containers for an agent, ordered by date. Use when you need to retrieve the last available output logs from an agent. This is a legacy v1 API endpoint.

NameTypeRequiredDescription
idstringYesID of the agent from which to retrieve the containers.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_AGENT_OUTPUT

Tool to get incremental data from an agent including console output, status, progress and messages. This is a legacy v1 API endpoint designed for easy incremental data retrieval. Use outputPos to track position.

NameTypeRequiredDescription
idstringYesID of the agent from which to retrieve the output, status and messages.
modestring (“track” | “most-recent”)NoMode for selecting which agent instance to track.
containerIdintegerNoID of the specific instance from which to get console output. Required when mode is ‘track’.
fromOutputPosintegerNoReturn the agent’s console output starting from this position. Use for incremental retrieval.
withoutResultObjectbooleanNoIf true, omit the agent’s result object from the response to reduce payload size.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_AGENTS_FETCH_ALL

Tool to fetch all agents associated with the current user or organization. Use after validating your Phantombuster API key to list available agents.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_AGENTS_FETCH_DELETED

Tool to get deleted agents for the current user or organization. Use when you need to audit recently removed agents.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_BRANCHES_DIFF

Tool to get the length difference between the staging and release branch of all scripts. Use when assessing branch changes before deployment.

NameTypeRequiredDescription
namestringYesName of the script branch to fetch the diff from.
X-Phantombuster-OrgstringNoID of the org performing the operation. Not required when using a personal API key.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_BRANCHES_FETCH_ALL

Tool to fetch all branches associated with the current organization. Use when you need to enumerate every branch across your scripts.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_CONTAINERS_FETCH_ALL

Tool to get all containers associated with a specified agent. Use when you need to retrieve every container for a given agent, for monitoring or reporting.

NameTypeRequiredDescription
agentIdstringYesID of the agent whose containers will be fetched.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_LEADS_BY_LIST

Tool to fetch leads by their list ID. Use when you need to retrieve leads from a specific list with optional pagination and filtering.

NameTypeRequiredDescription
listIdstringYesId of the lead list to fetch leads from.
withCompaniesbooleanNoOption for retrieving the company associated to the lead.
paginationOptionsobjectNoOptions for paginating through leads.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
withLeadObjectsOfTypesarrayNoArray of lead object types (max 3 items).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_LOCATION_IP

Tool to retrieve the country of a given or environment IP address. Use when you need to geolocate an IP endpoint. Example: get_location_ip(ip="8.8.8.8").

NameTypeRequiredDescription
ipstringNoIPv4 or IPv6 address to retrieve the country of. Omit to use the current environment’s public IP.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORGS_EXPORT_AGENT_USAGE

Tool to export agent usage CSV for current organization. Use when you need a downloadable report of all agents’ run statistics in CSV format.

NameTypeRequiredDescription
daysintegerYesNumber of days of data to export (1 to 180).
agentIdstringNoIf set, export data only for this agent ID.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORGS_EXPORT_CONTAINER_USAGE

Tool to export container usage CSV for current organization. Use when you need a downloadable CSV report of container execution history up to 6 months; URL expires in 30 days.

NameTypeRequiredDescription
daysintegerYesNumber of days of data to export (1 to 180).
agentIdstringNoIf set, export data only for this agent ID.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORGS_FETCH

Tool to fetch current organization details. Use when you need to retrieve the organization associated with the provided API key.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORGS_FETCH_AGENT_GROUPS

Tool to get agent groups and order for the current organization. Use when you need to review how agents are grouped and ordered.

NameTypeRequiredDescription
X-Phantombuster-OrgstringNoID of the org performing the operation (omit if using your own API key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORGS_FETCH_RESOURCES

Tool to get current organization’s resources and usage. Use when you need to monitor quotas.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORGS_FETCH_RUNNING_CONTAINERS

Tool to get the current organization’s running containers. Use after listing agents to identify active containers across the organization.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_ORG_STORAGE_LISTS_FETCH_ALL

Tool to fetch all storage lists for the authenticated organization. Use when you need to enumerate every storage list available (Beta).

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_SCRIPT

Tool to fetch a script by its unique ID. Use when you need to retrieve detailed metadata about a specific script, including its branches, visibility, and optionally its source code.

NameTypeRequiredDescription
idstringYesId of the script to fetch.
branchstringNoIf set, the specified branch will be used to retrieve the script.
withCodestring (“staging” | “release”)NoEnvironment enumeration for withCode parameter.
environmentstring (“staging” | “release”)NoEnvironment enumeration for script branches.
X-Phantombuster-OrgstringNoID of the org that is performing the operation. Not necessary when using a third party key.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_SCRIPT_BY_NAME

Tool to retrieve a script by its name from Phantombuster (Legacy v1 API). Use when you need to fetch script metadata or content by name. Supports both JSON (structured) and raw (plain text) response formats.

NameTypeRequiredDescription
modestring (“json”)NoResponse format: ‘json’ returns structured metadata.
namestringYesName of the script to retrieve, with its extension (.js or .coffee).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_SCRIPTS_CODE

Tool to get the code of a script. Use when you need to retrieve the source code content of a specific script.

NameTypeRequiredDescription
orgstringNoIf set, the specified org will be used to fetch the code.
branchstringNoIf set, the specified branch will be used to fetch the code.
scriptstringYesName of the script to fetch the code from.
environmentstring (“staging” | “release”)NoEnvironment enum for script code fetching.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_SCRIPTS_FETCH_ALL

Tool to fetch all scripts for the current user. Use after authenticating your Phantombuster API key to list scripts without their code bodies.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_GET_USER

Tool to get information about your PhantomBuster account and your agents using the legacy v1 API. Use when you need to check account quotas, remaining resources, or list associated agents.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_AGENTS_UNSCHEDULE_ALL

Tool to unschedule all scheduled launches for agents. Use when you need to disable every automated agent run organization-wide after verifying your API key.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_AI_COMPLETIONS

Tool to request a text completion from the AI module. Use when you need to generate text based on a prompt.

NameTypeRequiredDescription
nintegerNoNumber of completion choices to generate.
stoparrayNoSequences where the API will stop generating further tokens.
topPnumberNoNucleus sampling probability between 0 and 1.
modelstringNoIdentifier of the AI model to use for the completion.
promptstringYesInput text prompt to generate a completion for.
maxTokensintegerNoMaximum number of tokens to generate in the completion.
temperaturenumberNoSampling temperature between 0 and 1.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_BRANCHES_CREATE

Tool to create a new branch. Use when you need to isolate updates by creating a separate branch. Use after authenticating with your Phantombuster API key and optionally specifying an organization.

NameTypeRequiredDescription
namestringYesName of the branch to create.
X-Phantombuster-OrgstringNoID of the organization performing the operation (not needed when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_BRANCHES_DELETE

Tool to delete a branch by id. Use when you need to remove obsolete or incorrect script branches; ensure the branch exists before calling.

NameTypeRequiredDescription
idstringYesThe unique identifier of the branch to be deleted.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_HCAPTCHA

Tool to solve an hCaptcha challenge. Use when you need a valid hCaptcha token for form submissions or automation flows.

NameTypeRequiredDescription
proxystringNoProxy URL (e.g., http://user:pass@host:port) to route requests through.
pageUrlstringYesFull URL of the page where the hCaptcha appears.
siteKeystringYesThe public site key of the hCaptcha widget.
userAgentstringNoCustom User-Agent to simulate in the solving request.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_IDENTITIES_GENERATE_TOKEN

Tool to generate an identity token for PhantomBuster. Use when you need to create a new identity token for authentication or session management.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_ORG_STORAGE_LEADS_SAVE_MANY

Tool to save multiple leads (1-20) to organization storage in a single batch operation (Beta). Use when you need to create or update leads with LinkedIn profile data and optional enrichment fields.

NameTypeRequiredDescription
leadsarrayYesArray of leads to save. Must contain between 1 and 20 leads. Each lead requires a linkedinProfileUrl.
X-Phantombuster-OrgstringNoID of the organization performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_RECAPTCHA

Tool to solve a reCAPTCHA challenge (v2 or v3). Use when you need a valid reCAPTCHA response token for form submissions or automation. Note: API returns 200 status even on errors; check the error field in the response.

NameTypeRequiredDescription
keystringYesThe site key of the reCAPTCHA widget (found in the page HTML or network requests).
urlstringYesFull URL of the page where the reCAPTCHA widget appears.
typestring (“v2” | “v3”)YesVersion of reCAPTCHA to solve: ‘v2’ for checkbox or invisible reCAPTCHA, ‘v3’ for score-based reCAPTCHA.
minScorenumberNoMinimum score required for reCAPTCHA v3 (between 0 and 1). Only applicable for type=‘v3’.
pageActionstringNoAction name for reCAPTCHA v3 (matches the action parameter in grecaptcha.execute). Only applicable for type=‘v3’.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_POST_SCRIPTS_VISIBILITY

Tool to update the visibility of a script. Use when you need to change whether a script is private, public, or open source.

NameTypeRequiredDescription
namestringYesName of the script to change visibility for.
branchstringYesName of the branch to change visibility for.
visibilitystring (“private” | “semi public” | “public” | “semi open source” | “open source”)YesNew branch visibility.
X-Phantombuster-OrgstringNoID of the organization performing the operation (not needed when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_RELEASE_BRANCH

Tool to release a script branch. Use when you need to deploy a branch to production or release changes to specified scripts.

NameTypeRequiredDescription
namestringYesName of the branch to release.
scriptIdsarrayYesList of script IDs to release.
X-Phantombuster-OrgstringNoID of the organization performing the operation (not needed when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_AGENT

Tool to create a new agent or update an existing one. Use when you need to configure an agent’s launch schedule, settings, or behavior. If an agent ID is provided, the existing agent will be updated; otherwise, a new agent is created.

NameTypeRequiredDescription
idstringNoIf provided, updates the existing agent with this ID. If omitted, creates a new agent.
orgstringNoOrganization to link the agent to.
namestringNoName of the agent (max 100 characters).
branchstringNoBranch to assign the agent to (alphanumeric, dash, max 50).
scriptstringNoScript filename to assign to the agent (e.g., ‘myscript.js’).
argumentstringNoDefault argument used to launch the agent (string or object).
expireAtintegerNoUnix timestamp (epoch ms) when the agent will be deleted.
fileMgmtstring (“folders” | “mix” | “delete”)NoAgent file management type.
proxyTypestring (“none” | “http” | “pool” | “squid lease”)NoProxy type configuration.
launchTypestring (“manually” | “repeatedly” | “once” | “after agent”)NoLaunch type for the agent.
agentObjectstringNoSets the agent’s object as a JSON string.
environmentstring (“staging” | “release”)NoScript branch environment.
launchOnceAtintegerNoMust be set when launchType is ‘once’. Unix timestamp (epoch ms) for single launch.
proxyAddressstringNoHTTP proxy address (for proxyType=‘http’) or proxy pool name (for proxyType=‘pool’).
notificationsobjectNoNotification settings for the agent.
proxyPasswordstringNoPassword for proxy authentication (used with proxyType=‘http’).
proxyUsernamestringNoUsername for proxy authentication (used with proxyType=‘http’).
idempotencyKeystringNoOptional key for idempotent operations — only for creating an agent.
maxParallelismintegerNoMaximum number of concurrent executions of the agent.
maxRetryNumberintegerNoMaximum number of retries the agent will attempt before aborting.
executionTimeLimitnumberNoExecution time limit in seconds. Agent will be stopped if this limit is exceeded.
fileMgmtMaxFoldersintegerNoMaximum number of folders for file management.
launchAfterAgentIdstringNoMust be set when launchType is ‘after agent’. ID of the agent that triggers this agent.
repeatedLaunchTimesobjectNoSchedule configuration for repeated launches.
repeatedLaunchPresetstringNoPreset launch schedules (e.g., “Once per day”, “Once per hour”).
squidLeaseIdentifierobjectNoSquid lease configuration.
masterAgentLaunchAfternumberNoDelay in seconds before launching after a slave agent finishes. Platform defaults to 10-15 minutes if not set.
masterAgentLaunchOnExitCodesstringNoLaunch if slave agent’s exit code matches array values, or set to ‘all’ to launch on any exit code.
applyScriptManifestDefaultSettingsbooleanNoIf true, applies the manifest’s default settings to the agent.
wasSetupValidWhenSubmittedByTheFrontendbooleanNoIf true, the agent’s setup is considered complete.
shouldPropagateUpdatedSettingsToWorkersRegardlessOfSessionTypebooleanNoIf true, propagates updated settings to workers regardless of session type.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_AGENT_GROUPS

Tool to update agent groups and order for the current user’s organization. Use when you need to reorganize agents into groups or change their display order.

NameTypeRequiredDescription
agentGroupsarrayYesNew agent groups. Can be a list of agent IDs (strings) or AgentGroup objects with id, name, and agents. Order of the groups and agents will be preserved.
X-Phantombuster-OrgstringNoID of the org performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_COMPANY_OBJECT

Tool to save one company object to the organization storage. Use when you need to create or update a company object with LinkedIn company data and custom properties.

NameTypeRequiredDescription
idstringNoThe internal id of the company object. If provided, updates the existing object.
slugstringYesThe slug of the company object.
typestringYesThe type of company object.
orgIdstringNoThe org id associated with the company object.
propertiesobjectYesThe properties of the object. Can contain any additional company data.
linkedinCompanyIdstringYesThe external id of the company scraped from LinkedIn.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_COMPANY_OBJECTS_MANY

Tool to save many company objects to organization storage. Use when you need to bulk insert or update company data with a minimum of 1 and maximum of 20 objects per request.

NameTypeRequiredDescription
companiesarrayYesList of company objects to save. Minimum 1, maximum 20 objects.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_IDENTITY_EVENT

Tool to save an identity event to Phantombuster. Use when you need to record user interactions or activities associated with specific social media profiles.

NameTypeRequiredDescription
timestampintegerNoOptional timestamp of the identity event in milliseconds since epoch. Must be between 1000000000000 and 9999999999999.
event_dataobjectYesEvent data of the identity event containing additional information about the event.
event_typestringYesType of the identity event (e.g., profile_view, connection_request).
profile_idstringYesProfile ID of the identity event.
identity_typestringYesIdentity type of the identity event (e.g., linkedin, twitter, facebook).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_LEAD

Tool to save or update a lead in Phantombuster org storage. Use when you need to store LinkedIn profile data or other lead information.

NameTypeRequiredDescription
linkedinProfileUrlstringYesLinkedIn profile URL of the lead (required). This is the unique identifier for the lead.
errorstringNoError message if there was an issue processing the lead.
civilitystringNoCivility or title of the lead (e.g., Mr., Ms., Dr.).
lastNamestringNoLast name of the lead.
locationstringNoGeographic location of the lead.
metadataobjectNoAdditional metadata for the lead.
websitesarrayNoList of websites associated with the lead.
firstNamestringNoFirst name of the lead.
companyNamestringNoCurrent company name of the lead.
phoneNumbersarrayNoList of phone numbers of the lead.
companyWebsitestringNoWebsite of the lead’s current company.
personalEmailsarrayNoList of personal email addresses of the lead.
audienceOfLeadsarrayNoAudience segments this lead belongs to.
companyIndustrystringNoIndustry of the lead’s current company.
linkedinHeadlinestringNoLinkedIn headline of the lead.
linkedinJobTitlestringNoCurrent job title of the lead on LinkedIn.
linkedinCompanyIdstringNoLinkedIn company ID of the lead’s current company.
linkedinProfileIdstringNoLinkedIn profile ID of the lead.
twitterProfileUrlstringNoTwitter profile URL of the lead.
linkedinCompanyUrlstringNoLinkedIn company URL.
linkedinProfileUrnstringNoURN of the lead’s LinkedIn profile.
linkedinSchoolNamestringNoName of the lead’s school on LinkedIn.
professionalEmailsarrayNoList of professional email addresses of the lead.
linkedinCompanySlugstringNoLinkedIn company slug.
linkedinDescriptionstringNoLinkedIn description or summary of the lead.
linkedinJobLocationstringNoLocation of the lead’s current job on LinkedIn.
linkedinOpenProfilebooleanNoWhether the lead has an open LinkedIn profile.
linkedinSkillsLabelstringNoSkills label from the lead’s LinkedIn profile.
previousCompanyNamestringNoName of the lead’s previous company.
linkedinJobDateRangestringNoDate range of the lead’s current job on LinkedIn.
linkedinSchoolDegreestringNoDegree obtained at the lead’s school on LinkedIn.
aiGeneratedPropertiesobjectNoAI-generated properties for the lead.
customResultsFileNamestringNoCustom results file name for the lead.
linkedinIsHiringBadgebooleanNoWhether the lead has a hiring badge on LinkedIn.
linkedinFollowersCountnumberNoNumber of LinkedIn followers the lead has.
linkedinJobDescriptionstringNoDescription of the lead’s current job on LinkedIn.
linkedinProfileImageUrlstringNoURL of the lead’s LinkedIn profile image.
linkedinProfileImageUrnstringNoURN of the lead’s LinkedIn profile image.
linkedinSchoolDateRangestringNoDate range of the lead’s school attendance on LinkedIn.
linkedinPreviousJobTitlestringNoPrevious job title of the lead on LinkedIn.
linkedinSchoolCompanyUrlstringNoLinkedIn URL of the lead’s school.
salesNavigatorProfileUrlstringNoSales Navigator profile URL of the lead.
linkedinIsOpenToWorkBadgebooleanNoWhether the lead has an open to work badge on LinkedIn.
linkedinSchoolDescriptionstringNoDescription of the lead’s school on LinkedIn.
linkedinPreviousCompanyUrlstringNoLinkedIn URL of the lead’s previous company.
linkedinPreviousSchoolNamestringNoName of the lead’s previous school on LinkedIn.
linkedinPreviousJobLocationstringNoLocation of the lead’s previous job on LinkedIn.
crmAccountRelativePropertiesarrayNoCRM account relative properties for the lead.
linkedinPreviousJobDateRangestringNoDate range of the lead’s previous job on LinkedIn.
linkedinPreviousSchoolDegreestringNoDegree obtained at the lead’s previous school on LinkedIn.
linkedinPreviousJobDescriptionstringNoDescription of the lead’s previous job on LinkedIn.
linkedinPreviousSchoolDateRangestringNoDate range of the lead’s previous school attendance on LinkedIn.
linkedinPreviousSchoolCompanyUrlstringNoLinkedIn URL of the lead’s previous school.
linkedinAccountRelativePropertiesarrayNoLinkedIn account relative properties for the lead.
linkedinPreviousSchoolDescriptionstringNoDescription of the lead’s previous school on LinkedIn.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_LEAD_OBJECT

Tool to save a lead object to organization storage. Use when you need to store or update lead information with custom properties.

NameTypeRequiredDescription
slugstringYesSlug of the object to save. Must be 470 characters or less.
typestringYesType of object to save.
leadIdstringNoID of a lead to associate with this object.
agentIdstringYesID of the agent associated with this lead object.
leadUrnstringNoURN of a lead to associate with this object.
leadSlugstringNoSlug of a lead to associate with this object.
propertiesobjectYesProperties of the object. Can contain any key-value pairs.
leadObjectIdstringNoID of a lead object to update. If provided, updates existing object instead of creating new one.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_LEADS_OBJECTS_MANY

Tool to save multiple lead objects to Phantombuster’s organization storage. Use when you need to create or update multiple lead objects in a single API call.

NameTypeRequiredDescription
leadsObjectsarrayYesArray of lead objects to save. Each object must include type, slug, properties, and agentId.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_LIST

Tool to save (create or update) a list with filter criteria. Use when you need to create a new list or update an existing one by providing a filter configuration. This is a Beta feature.

NameTypeRequiredDescription
idstringNoA string for updating existing lists (omit when creating new ones).
namestringYesA string specifying the list’s title.
tagsarrayNoAn array of strings for organizational categorization. Allowed values: ‘hidden’, ‘workflow’, ‘pbai’, ‘opinion-leaders’.
filterobjectYesAn object that configures which leads are included in the list. Supports global search using ‘global_search’ key, simple field filters, logical AND/OR operators, and complex nested filters.
descriptionstringNoA string describing the list’s purpose.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SAVE_SCRIPT

Tool to create a new script or update an existing one. Provide an id to update; otherwise creates new script. Use when you need to save JavaScript automation code to Phantombuster.

NameTypeRequiredDescription
idstringNoIf provided, the script with this ID will be updated. Otherwise, a new script is created.
codestringNoJavaScript source code of the script (max 600,000 chars).
namestringYesName of the script file. Must end with .js or .coffee. Prepend with ‘lib-’ to define as a module.
branchstringNoName of the branch to associate with the script (alphanumeric, hyphens, 1-50 chars).
manifestobjectNoJSON script manifest required to create/update a script.
markdownstringNoMarkdown description of the script (max 200,000 chars).
X-Phantombuster-OrgstringNoID of the organization performing the operation (not needed when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SEARCH_COMPANY_OBJECTS

Tool to search company objects in Phantombuster’s organizational storage. Use when you need to find companies by specific criteria or perform a global search.

NameTypeRequiredDescription
orarrayNoArray of filter conditions joined by OR logic. Each condition is an object with field names as keys and string values.
andarrayNoArray of filter conditions joined by AND logic. Each condition is an object with field names as keys and string values.
filterobjectNoNested filter object for more complex filtering logic with field names as keys and string values.
__global_search__stringNoGlobal search string to search across all fields of company objects.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_SEARCH_LEAD_OBJECTS

Tool to search lead objects in Phantombuster org storage. Use when you need to find leads based on search criteria or filter conditions.

NameTypeRequiredDescription
filterobjectYesFilter criteria for searching leads. Use ‘global_search’ for simple text searches across all fields.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_STOP_AGENT

Tool to stop a running agent. Use when you need to halt agent execution, optionally cascading to slave agents or switching to manual launch mode.

NameTypeRequiredDescription
idstringYesId of the agent to stop.
softAbortbooleanNoIf true, tries to softly abort the agent.
dontLaunchSoonbooleanNoIf true, disables the next scheduled ‘launch soon’ of the agent.
cascadeToAllSlavesbooleanNoIf true, slave agents will recursively be stopped (even nested slaves).
switchToManualLaunchbooleanNoIf true, the agent will switch to manual launch.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_UPDATE_SCRIPT

Tool to update an existing script or create a new one if it does not exist (Legacy v1 API). Use when you need to save script code to Phantombuster. If insertOnly is true, the operation will fail if a script with the same name already exists.

NameTypeRequiredDescription
namestringYesName of the script to update or create, with its extension (.js or .coffee).
textstringYesFull text contents of the script.
insertOnlybooleanNoIf true, make sure that we don’t update an existing script. An error will be returned if a script with the same name already exists.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PHANTOMBUSTER_UPDATE_SCRIPTS_ACCESS_LIST

Tool to update the access list of a script. Use when you need to add or remove users/orgs from a script’s access list in a specific branch.

NameTypeRequiredDescription
addstringNoOrg or user to add in the access list.
namestringYesName of the script to update the access list of.
branchstringYesName of the branch to update the access list of.
removestringNoOrg or user to remove from the access list.
X-Phantombuster-OrgstringNoID of the org that is performing the operation (not necessary when using a third party key).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.