Phantombuster Script API

The Script API from Phantombuster — 2 operation(s) for script.

GitHub OpenAPI

Operations 2

GET /script/by-name/{mode}/{name} Get script by name #
POST /script/{name} Update script #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/phantombuster:phantombuster-script-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

phantombuster-script-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: v1
  title: v1 Script API
  description: 'The Phantombuster API gives you control over your account. It is composed of HTTPS endpoints returning JSON data.


    Here’s a short list of what the API allows\:


    - Launch and abort agents

    - Get console output, status, progress and messages from an agent

    - Get real-time console output from an agent

    - Get user, agent and script records

    - Write scripts

    - ...


    We deliberately made the API extremely simple to use. Any developer should be able to get responses in a matter of minutes.'
servers:
- url: https://api.phantombuster.com/api/v1
tags:
- name: Script
paths:
  /script/by-name/{mode}/{name}:
    get:
      tags:
      - Script
      description: Get a script record by its name.
      operationId: getScriptByName
      parameters:
      - name: name
        in: path
        description: Name of the script to retrieve, with its extension (.js or .coffee).
        required: true
        schema:
          type: string
      - name: mode
        in: path
        description: JSON or raw text.
        required: true
        schema:
          type: string
          enum:
          - json
          - raw
      - name: withoutText
        in: query
        description: If true, do not send the script’s contents but only its metadata (only in JSON mode).
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                        example: 1902
                      name:
                        type: string
                        example: nice_agent.coffee
                      source:
                        type: string
                        example: phantombuster
                      url:
                        type: object
                        example: null
                      text:
                        type: string
                        example: ' ... script contents ... '
                      httpHeaders:
                        type: object
                        example: null
                      lastSaveDate:
                        type: number
                        example: 1427806874
                      nonce:
                        type: number
                        example: 123
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailApiResponse'
      security:
      - internalApiKey: []
      summary: Get script by name
      x-summary-source: derived
  /script/{name}:
    post:
      tags:
      - Script
      description: Update an existing script or create a new one if it does not exist (in this case, the new script ID is returned in the data field).
      operationId: updateScript
      parameters:
      - name: name
        in: path
        description: Name of the script to update or create, with its extension (.js or .coffee).
        required: true
        schema:
          type: string
      - name: text
        in: query
        description: Full text contents of the script. This parameter must be in the request body in x-www-form-urlencoded format.
        required: true
        schema:
          type: string
      - name: insertOnly
        in: query
        description: If true, make sure that we don’t update an existing script (optional). An error will be returned if a script with the same name already exists.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: number
                    example: 345
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailApiResponse'
      security:
      - internalApiKey: []
      summary: Update script
      x-summary-source: derived
components:
  schemas:
    FailApiResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
  securitySchemes:
    internalApiKey:
      type: apiKey
      in: header
      name: X-Phantombuster-Key-1
x-provenance:
  method: searched
  source: https://hub.phantombuster.com/reference
  harvested: '2026-11-15'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://hub.phantombuster.com/reference/abortagent-1.md
  - https://hub.phantombuster.com/reference/containeragent-1.md
  - https://hub.phantombuster.com/reference/getagentrecord-1.md
  - https://hub.phantombuster.com/reference/getscriptbyname-1.md
  - https://hub.phantombuster.com/reference/getuser-1.md
  - https://hub.phantombuster.com/reference/launchagent-1.md
  - https://hub.phantombuster.com/reference/outputagent-1.md
  - https://hub.phantombuster.com/reference/updatescript-1.md
  merge:
    pages: 8
    deduped: 13
    conflicts_kept_first: 0