{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Scraper Ultra",
    "description": "The fastest X.com scraper at $0.30/1k tweets — with built-in AI Sentiment Analysis (0.0 to 1.0 scale). 600+ tweets/min, zero browser overhead, advanced filters included.",
    "version": "0.0",
    "x-build-id": "sC2qDaewA2vsQCXQb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/knowten~twitter-scraper-ultra/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-knowten-twitter-scraper-ultra",
        "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/knowten~twitter-scraper-ultra/runs": {
      "post": {
        "operationId": "runs-sync-knowten-twitter-scraper-ultra",
        "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/knowten~twitter-scraper-ultra/run-sync": {
      "post": {
        "operationId": "run-sync-knowten-twitter-scraper-ultra",
        "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": [
          "maxItems"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search Terms / Queries",
            "type": "array",
            "description": "Enter keywords, hashtags, or full advanced search queries. Supports Twitter/X advanced search syntax.",
            "items": {
              "type": "string"
            }
          },
          "extractPerTerm": {
            "title": "Extract Per Term",
            "type": "boolean",
            "description": "If enabled, iterates over each search term individually rather than combining them.",
            "default": false
          },
          "maxTweetsPerTerm": {
            "title": "Max Tweets Per Term",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of tweets to extract for each search term when Extract Per Term is enabled.",
            "default": 100
          },
          "twitterHandles": {
            "title": "Twitter Profiles",
            "type": "array",
            "description": "Extract directly from specific handles. No @ required. When multiple handles are provided, maxItems is split evenly across them.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Tweets (Total)",
            "minimum": 1,
            "type": "integer",
            "description": "Total number of tweets to extract. For multiple twitterHandles, this total is split evenly across the handles.",
            "default": 100
          },
          "sort": {
            "title": "Sort Strategy",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "Choose between real-time data or most popular results.",
            "default": "Latest"
          },
          "tweetLanguage": {
            "title": "Target Language",
            "enum": [
              "all",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "jp",
              "zh",
              "ru"
            ],
            "type": "string",
            "description": "Restrict results to a specific language.",
            "default": "all"
          },
          "onlyVerifiedUsers": {
            "title": "Verified Only",
            "type": "boolean",
            "description": "If enabled, only tweets from verified accounts will be returned.",
            "default": false
          },
          "onlyImage": {
            "title": "Image Only",
            "type": "boolean",
            "description": "Filter results to only include tweets with images.",
            "default": false
          },
          "onlyVideo": {
            "title": "Video Only",
            "type": "boolean",
            "description": "Filter results to only include tweets with videos.",
            "default": false
          },
          "minimumFavorites": {
            "title": "Min. Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of likes for a tweet to be included."
          },
          "minimumRetweets": {
            "title": "Min. Retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of retweets for a tweet to be included."
          },
          "startDate": {
            "title": "Since (Start Date)",
            "type": "string",
            "description": "Extract tweets posted after this date."
          },
          "endDate": {
            "title": "Until (End Date)",
            "type": "string",
            "description": "Extract tweets posted before this date."
          },
          "onlyTwitterBlue": {
            "title": "Only Twitter Blue",
            "type": "boolean",
            "description": "Filter results to only include tweets from Twitter Blue subscribers.",
            "default": false
          },
          "onlyQuote": {
            "title": "Only Quote Tweets",
            "type": "boolean",
            "description": "Filter results to only include quote tweets.",
            "default": false
          },
          "tweetAuthor": {
            "title": "Tweet Author",
            "type": "string",
            "description": "Only get tweets from this specific user. You can also pass comma-separated handles."
          },
          "tweetAuthors": {
            "title": "Tweet Authors (Multi-search)",
            "type": "array",
            "description": "Limit search results to multiple author handles. Queries are combined as (from:a OR from:b OR from:c).",
            "items": {
              "type": "string"
            }
          },
          "inReplyTo": {
            "title": "In Reply To",
            "type": "string",
            "description": "Only get tweets that are sent in reply to this user."
          },
          "mentioning": {
            "title": "Mentioning",
            "type": "string",
            "description": "Only get tweets mentioning this user."
          },
          "minimumReplies": {
            "title": "Min. Replies",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of replies for a tweet to be included."
          },
          "geotaggedNear": {
            "title": "Geotagged Near",
            "type": "string",
            "description": "Get tweets near this location (for example, New York, NY)."
          },
          "withinRadius": {
            "title": "Within Radius",
            "type": "string",
            "description": "Radius for Geotagged Near (for example, 15mi or 20km)."
          },
          "geocode": {
            "title": "Geocode",
            "type": "string",
            "description": "Strict location via lat,long,radius (for example, 37.781157,-122.398720,1mi)."
          },
          "placeObjectId": {
            "title": "Place Object ID",
            "type": "string",
            "description": "Twitter place ID (for example, df51dec6f4ee2b2c for Washington DC)."
          },
          "enablePremiumAi": {
            "title": "Enable Premium AI Sentiment Analysis",
            "type": "boolean",
            "description": "Adds a decimal sentiment score from 0.00 to 1.00 for each tweet, where 0.50 is objective or neutral.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}