{
  "openapi": "3.0.1",
  "info": {
    "title": "X / Twitter Scraper Pro — Tweets, Profiles, Followers",
    "description": "Extract tweets by search query, user profiles, timelines, followers and following lists from X (Twitter). Pay per result, no monthly fees, no setup required.",
    "version": "1.1",
    "x-build-id": "c7Lq22lukMHhKgz1v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dever~twitter-ultra-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dever-twitter-ultra-scraper",
        "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/dever~twitter-ultra-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dever-twitter-ultra-scraper",
        "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/dever~twitter-ultra-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dever-twitter-ultra-scraper",
        "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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "tweet.search",
              "tweet.details",
              "user.details",
              "user.timeline",
              "user.followers",
              "user.following"
            ],
            "type": "string",
            "description": "Which X operation to run. Pick the one matching your goal — see README for examples of each.",
            "default": "tweet.search"
          },
          "credentials": {
            "title": "X session credentials",
            "type": "array",
            "description": "Pool of base64-encoded X session credentials, used to authenticate against X. Provide as a JSON array of strings, e.g. [\"cred1\", \"cred2\"]. One credential is enough to start; 5–20 are recommended for sustained workloads. See README for how to generate.",
            "items": {
              "type": "string"
            }
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Required for user.details. Optional for user.timeline / user.followers / user.following — when provided alongside userId, preview mode will compute estimatedTotal and costEstimate. Handle without @."
          },
          "tweetId": {
            "title": "Tweet ID",
            "type": "string",
            "description": "Required for tweet.details. Numeric tweet ID, copied from a tweet URL: x.com/<user>/status/<tweetId>."
          },
          "userId": {
            "title": "User ID",
            "type": "string",
            "description": "Required for user.timeline, user.followers, user.following. Numeric X user ID. If you only have a username, run user.details first to resolve it."
          },
          "searchFilter": {
            "title": "Search filter",
            "type": "object",
            "description": "Required for tweet.search. Filter object with optional fields: fromUsers, toUsers, mentions, hashtags, includePhrases, excludeWords, optionalWords, language, startDate, endDate, minLikes, minReplies, minRetweets, links, media, replies, top. See README for the full schema."
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of items to return. Per-operation caps: tweet.search 10,000; user.timeline 200; user.followers/following 500. Requests above an operation's cap are rejected before any fetching begins, with an error explaining the limit and pointing to higher-volume alternatives. Single-item ops (tweet.details, user.details) ignore this.",
            "default": 100
          },
          "preview": {
            "title": "Preview mode (free)",
            "type": "boolean",
            "description": "If true, fetch only the first page (≤20 items) and write a PREVIEW_SUMMARY record with sample items, estimated total, and cost estimate. No charge for preview runs. Use this to size big jobs before committing budget.",
            "default": false
          },
          "cursor": {
            "title": "Resume cursor",
            "type": "string",
            "description": "Pagination cursor to resume a previous run. Read it from the LAST_CURSOR record written by an earlier run. Cursors are short-lived (hours, not days). Leave blank for a fresh run."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "By default the actor routes traffic through a bundled residential proxy pool that is configured to work against X. To override, set proxyUrls with your own residential proxy URL(s). Apify's built-in proxy (useApifyProxy: true) will NOT work — X blocks Apify's IP ranges. Leave blank for the default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}