{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter / X Scraper - Tweets, Profiles, Search, Hashtags",
    "description": "Scrape Twitter / X profiles, tweets, hashtags, and search results at scale. Extract follower counts, engagement metrics, user bios, and full tweet history. Supports multi-strategy data collection via Apify API.",
    "version": "0.1",
    "x-build-id": "AifRLnFmGvUnmj3VE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/convertfleetdotonline~twitter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-convertfleetdotonline-twitter-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/convertfleetdotonline~twitter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-convertfleetdotonline-twitter-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/convertfleetdotonline~twitter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-convertfleetdotonline-twitter-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",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Twitter/X search queries. Supports full advanced-search syntax, e.g. `from:NASA`, `\"climate change\" lang:en`, `#AI filter:media min_faves:100`. Each query can return thousands of tweets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "twitterHandles": {
            "title": "Twitter handles",
            "type": "array",
            "description": "Profile handles to scrape timelines for (without @). Example: elonmusk, NASA.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct X / Twitter URLs — tweet, profile, or search URLs. Paste and go.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items on output",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of tweets to return in total. Leave at default for a quick run; raise for large exports.",
            "default": 100
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "Order of search results. `Latest` = most recent first; `Top` = highest-engagement first.",
            "default": "Latest"
          },
          "tweetLanguage": {
            "title": "Tweet language",
            "type": "string",
            "description": "Restrict tweets to a language, as an ISO 639-1 code (e.g. `en`, `es`, `fr`). Leave empty for all languages.",
            "default": ""
          },
          "onlyVerifiedUsers": {
            "title": "Only verified users",
            "type": "boolean",
            "description": "Return only tweets from verified accounts.",
            "default": false
          },
          "onlyImage": {
            "title": "Only tweets with images",
            "type": "boolean",
            "description": "Return only tweets that contain an image.",
            "default": false
          },
          "onlyVideo": {
            "title": "Only tweets with video",
            "type": "boolean",
            "description": "Return only tweets that contain a video.",
            "default": false
          },
          "onlyQuote": {
            "title": "Only quote tweets",
            "type": "boolean",
            "description": "Return only quote tweets.",
            "default": false
          },
          "minimumRetweets": {
            "title": "Minimum retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Only return tweets with at least this many retweets.",
            "default": 0
          },
          "minimumFavorites": {
            "title": "Minimum favorites (likes)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return tweets with at least this many likes.",
            "default": 0
          },
          "minimumReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Only return tweets with at least this many replies.",
            "default": 0
          },
          "start": {
            "title": "Start date",
            "type": "string",
            "description": "Only return tweets sent after this date (YYYY-MM-DD). Applies to search terms.",
            "default": ""
          },
          "end": {
            "title": "End date",
            "type": "string",
            "description": "Only return tweets sent before this date (YYYY-MM-DD). Applies to search terms.",
            "default": ""
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Include reply tweets in profile timelines.",
            "default": false
          },
          "includeRetweets": {
            "title": "Include retweets",
            "type": "boolean",
            "description": "Include retweets / reposts in profile timelines.",
            "default": true
          },
          "authToken": {
            "title": "X auth_token cookie (optional)",
            "type": "string",
            "description": "Your X (Twitter) `auth_token` cookie value. Provide together with the `ct0` token to unlock authenticated, high-completeness scraping. Used only to sign read requests during the run; never stored. See README → 'Using your X session'."
          },
          "csrfToken": {
            "title": "X ct0 cookie (optional)",
            "type": "string",
            "description": "Your X (Twitter) `ct0` (CSRF) cookie value. Required alongside `authToken` for the authenticated path."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy for all requests. Residential proxies are strongly recommended for X / Twitter — datacenter IPs are heavily rate-limited.",
            "default": {
              "useApifyProxy": true
            }
          },
          "queries": {
            "title": "Search queries (legacy alias of searchTerms)",
            "type": "array",
            "description": "Deprecated alias for `searchTerms`. Kept for backward compatibility.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames (legacy alias of twitterHandles)",
            "type": "array",
            "description": "Deprecated alias for `twitterHandles`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "URLs (legacy alias of startUrls)",
            "type": "array",
            "description": "Deprecated alias for `startUrls`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxTweets": {
            "title": "Max tweets per target (legacy)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Deprecated per-target cap. Use `maxItems` instead. Still honored if `maxItems` is not set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}