{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Audience & Spaces Intelligence | from $0.20/1K",
    "description": "Multi-mode X (Twitter) intelligence: (1) No-auth tweet hydration — batch by ID, zero proxy cost; (2) X Spaces metadata — host, title, listeners, playlist URL (PPE, only Spaces actor); (3) Follower/following delta KV feed — scheduled change alerts. Self-healing queryId.",
    "version": "0.1",
    "x-build-id": "Nm1KaSSVQKbTvoFGt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bovi~twitter-x-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bovi-twitter-x-intelligence",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/bovi~twitter-x-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-bovi-twitter-x-intelligence",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/bovi~twitter-x-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-bovi-twitter-x-intelligence",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "tweet_hydrate",
              "spaces",
              "follower_delta"
            ],
            "type": "string",
            "description": "Which data to collect:\n\n• **tweet_hydrate** — No-auth batch tweet hydration. Supply tweetIds. Zero proxy cost, no account needed. Works immediately.\n\n• **spaces** — X Spaces metadata (host, title, state, total listeners, replay count, playlist URL). Requires authToken + ct0 cookies from your X account.\n\n• **follower_delta** — Follower or following change-feed. Each run fetches the full list, diffs it against the KV snapshot from the last run, and pushes only new/lost events. Ideal for scheduled monitoring. Requires authToken + ct0.",
            "default": "tweet_hydrate"
          },
          "tweetIds": {
            "title": "Tweet IDs (for tweet_hydrate mode)",
            "type": "array",
            "description": "List of numeric tweet IDs to hydrate. Example: ['1519480761749016577', '20']. Used only in tweet_hydrate mode. The actor fetches each tweet from X's public CDN embed endpoint — no proxy, no account required. Deleted, age-restricted, and NSFW tweets return no record (silently skipped).",
            "items": {
              "type": "string"
            }
          },
          "spaceIds": {
            "title": "Space IDs (for spaces mode)",
            "type": "array",
            "description": "List of X Spaces IDs to fetch metadata for. The Space ID is the alphanumeric string at the end of a Spaces URL: x.com/i/spaces/<SPACE_ID>. Example: ['1YqKDkVZwDkKV', '1dRKZlwEQzOGB']. Used only in spaces mode. Requires authToken + ct0.",
            "items": {
              "type": "string"
            }
          },
          "targetHandles": {
            "title": "Target X Handles (for follower_delta mode)",
            "type": "array",
            "description": "List of X screen names to monitor for follower/following changes. Include or omit the @ prefix — both work. Example: ['elonmusk', '@sama', 'OpenAI']. Used only in follower_delta mode. Requires authToken + ct0. Recommended: schedule this actor daily or weekly for ongoing monitoring.",
            "items": {
              "type": "string"
            }
          },
          "direction": {
            "title": "Direction (for follower_delta mode)",
            "enum": [
              "followers",
              "following"
            ],
            "type": "string",
            "description": "Which relationship to track: 'followers' (who follows the target account) or 'following' (who the target account follows). Default: followers.",
            "default": "followers"
          },
          "maxUsers": {
            "title": "Max Users per Handle (for follower_delta mode)",
            "minimum": 10,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum followers/following to fetch per target account per run. Higher values increase run cost (more GraphQL pages fetched) — keep at 500 or below for SMB/influencer accounts. For accounts with >10k followers, consider lowering to reduce CU cost. Default: 500.",
            "default": 500
          },
          "emitFullList": {
            "title": "Also emit full follower list (for follower_delta mode)",
            "type": "boolean",
            "description": "When true, the actor pushes the entire current follower/following list as records (mode=follower or mode=following) in addition to the delta events. Useful for an initial export on the first run. Significantly increases result count and PPE cost. Default: false (delta events only).",
            "default": false
          },
          "authToken": {
            "title": "X auth_token cookie (required for spaces + follower_delta)",
            "type": "string",
            "description": "Your X account's auth_token cookie value. Required for spaces and follower_delta modes. To find it: open X.com in Chrome → DevTools (F12) → Application → Cookies → x.com → copy the value of 'auth_token'. This is YOUR account's token — keep it confidential. The actor runs these modes on your account; suspension risk is account-holder's responsibility."
          },
          "ct0": {
            "title": "X ct0 cookie / CSRF token (required for spaces + follower_delta)",
            "type": "string",
            "description": "Your X account's ct0 cookie value (the CSRF token, also called x-csrf-token). Required alongside authToken for authenticated modes. To find it: open X.com in Chrome → DevTools (F12) → Application → Cookies → x.com → copy the value of 'ct0'."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for the actor. For tweet_hydrate mode, proxies are optional (the CDN endpoint works from most IPs). For spaces and follower_delta modes, Apify residential proxies are strongly recommended — X blocks datacenter IPs at scale for authenticated GraphQL calls. Leave empty to use auto (Apify selects the best available proxy)."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}