{
  "openapi": "3.0.1",
  "info": {
    "title": "X/Twitter Scraper — Fast & Cheap",
    "description": "Scrape tweets, profiles, followers & following from X/Twitter. 5 modes × 40+ fields × 15 filters × multi-account rotation. $0.20/1K results — 50% cheaper than competitors.",
    "version": "3.0",
    "x-build-id": "qdWrU6fyS8wmxwJ7v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/celebrated-quadraphonic~x-twitter-scraper-v3/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-celebrated-quadraphonic-x-twitter-scraper-v3",
        "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/celebrated-quadraphonic~x-twitter-scraper-v3/runs": {
      "post": {
        "operationId": "runs-sync-celebrated-quadraphonic-x-twitter-scraper-v3",
        "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/celebrated-quadraphonic~x-twitter-scraper-v3/run-sync": {
      "post": {
        "operationId": "run-sync-celebrated-quadraphonic-x-twitter-scraper-v3",
        "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": [
          "authTokens"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "profile",
              "followers",
              "following",
              "user_info"
            ],
            "type": "string",
            "description": "Search tweets, user timeline, followers, following, or profile info.",
            "default": "search"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Keywords or Twitter advanced operators. Multiple queries: one per line. Example:\\npython machine learning\\ndeep learning\\nneural networks",
            "default": ""
          },
          "usernames": {
            "title": "Usernames (one per line)",
            "type": "string",
            "description": "Without @. For profile/followers/following/user_info modes.",
            "default": ""
          },
          "authTokens": {
            "title": "Auth Tokens (one per line)",
            "type": "string",
            "description": "X/Twitter auth_token cookies. F12 → Application → Cookies → x.com → auth_token. Multiple = auto rotation."
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum results. Default 100 ≈ $0.02/run.",
            "default": 100
          },
          "maxEmptyPages": {
            "title": "Max Empty Pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Stop after this many consecutive empty pages. Lower = faster stop when results run out.",
            "default": 3
          },
          "since": {
            "title": "Since (YYYY-MM-DD)",
            "type": "string",
            "description": "Only tweets after this date.",
            "default": ""
          },
          "until": {
            "title": "Until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only tweets before this date.",
            "default": ""
          },
          "displayType": {
            "title": "Sort Order",
            "enum": [
              "Top",
              "Latest",
              "Photos",
              "Videos"
            ],
            "type": "string",
            "description": "Top = most relevant, Latest = newest, Photos/Videos = media only.",
            "default": "Top"
          },
          "tweetType": {
            "title": "Tweet Type",
            "enum": [
              "all",
              "originals_only",
              "replies_only",
              "retweets_only",
              "exclude_replies",
              "exclude_retweets"
            ],
            "type": "string",
            "description": "Filter by type: originals (no RT/reply), replies only, retweets only, etc.",
            "default": "all"
          },
          "lang": {
            "title": "Language (single)",
            "type": "string",
            "description": "ISO 639-1: en, es, fr, de, ja, zh, ko, pt, ru, ar, hi, etc.",
            "default": ""
          },
          "langs": {
            "title": "Multi-Language (one per line)",
            "type": "string",
            "description": "Run separate queries for each language and merge results. Overrides single lang. Example: en\\nja\\nzh\\nko",
            "default": ""
          },
          "minLikes": {
            "title": "Min Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Min Likes",
            "default": 0
          },
          "minRetweets": {
            "title": "Min Retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Min Retweets",
            "default": 0
          },
          "minReplies": {
            "title": "Min Replies",
            "minimum": 0,
            "type": "integer",
            "description": "Min Replies",
            "default": 0
          },
          "hasImages": {
            "title": "Has Images",
            "type": "boolean",
            "description": "Only tweets with images.",
            "default": false
          },
          "hasVideos": {
            "title": "Has Videos",
            "type": "boolean",
            "description": "Only tweets with videos.",
            "default": false
          },
          "hasLinks": {
            "title": "Has Links",
            "type": "boolean",
            "description": "Only tweets with URLs.",
            "default": false
          },
          "hasMentions": {
            "title": "Has @Mentions",
            "type": "boolean",
            "description": "Only tweets that mention other users.",
            "default": false
          },
          "hasHashtags": {
            "title": "Has #Hashtags",
            "type": "boolean",
            "description": "Only tweets with hashtags.",
            "default": false
          },
          "verifiedOnly": {
            "title": "Verified Only",
            "type": "boolean",
            "description": "Only verified users (checkmark).",
            "default": false
          },
          "blueVerifiedOnly": {
            "title": "X Premium Only",
            "type": "boolean",
            "description": "Only X Premium (Blue) subscribers.",
            "default": false
          },
          "allWords": {
            "title": "Must Include All Words",
            "type": "string",
            "description": "Comma or newline separated. Tweets must contain ALL of these words.",
            "default": ""
          },
          "anyWords": {
            "title": "Include Any Word",
            "type": "string",
            "description": "Comma or newline separated. Tweets must contain at least ONE.",
            "default": ""
          },
          "exactPhrases": {
            "title": "Exact Phrases",
            "type": "string",
            "description": "One phrase per line. Tweets must contain this exact phrase.",
            "default": ""
          },
          "excludeWords": {
            "title": "Exclude Words",
            "type": "string",
            "description": "Comma or newline separated. Exclude tweets containing these.",
            "default": ""
          },
          "hashtagsAny": {
            "title": "Include Hashtags",
            "type": "string",
            "description": "Comma or newline separated. Must contain at least one.",
            "default": ""
          },
          "hashtagsExclude": {
            "title": "Exclude Hashtags",
            "type": "string",
            "description": "Comma or newline separated.",
            "default": ""
          },
          "fromUsers": {
            "title": "From Users",
            "type": "string",
            "description": "Comma or newline separated usernames. Only tweets from these users.",
            "default": ""
          },
          "toUsers": {
            "title": "To Users",
            "type": "string",
            "description": "Only tweets directed to these users.",
            "default": ""
          },
          "mentioningUsers": {
            "title": "Mentioning Users",
            "type": "string",
            "description": "Only tweets that mention these users.",
            "default": ""
          },
          "place": {
            "title": "Place",
            "type": "string",
            "description": "Filter by place name (e.g., 'New York', 'Tokyo', 'London').",
            "default": ""
          },
          "geocode": {
            "title": "Geocode",
            "type": "string",
            "description": "Latitude,longitude,radius (e.g., '40.7128,-74.0060,10mi' or '35.6762,139.6503,50km').",
            "default": ""
          },
          "near": {
            "title": "Near Location",
            "type": "string",
            "description": "Near a place name (e.g., 'San Francisco'). Use with 'Within'.",
            "default": ""
          },
          "within": {
            "title": "Within Distance",
            "type": "string",
            "description": "Distance from 'Near' location (e.g., '15mi' or '25km').",
            "default": ""
          },
          "includeSearchTerms": {
            "title": "Tag Results with Query",
            "type": "boolean",
            "description": "Add search_term column when using multiple queries.",
            "default": false
          },
          "proxyUrl": {
            "title": "Proxy (optional)",
            "type": "string",
            "description": "http://user:pass@host:port",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}