{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Tweet Search Scraper — Keyword, Hashtag & Account",
    "description": "Search X (Twitter) for tweets by keyword, phrase, hashtag, from:account or date window — or pull an account's latest tweets. Rows carry text, author, created date, likes, replies, retweets, media, links and quoted tweet. No login, no cookies, no bought feed.",
    "version": "0.1",
    "x-build-id": "thM9jvLahFB5o7ujb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~x-tweet-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-x-tweet-search-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/scrapersdelight~x-tweet-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-x-tweet-search-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/scrapersdelight~x-tweet-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-x-tweet-search-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": "One search per line. Plain words (bitcoin etf), exact phrases in quotes (\"climate change\"), hashtags (#bitcoin), X operators from:handle, since:YYYY-MM-DD, until:YYYY-MM-DD, lang:es and min_faves:N, and Google's -word exclusion. Example: from:OpenAI gpt since:2026-08-01. SEARCH MODE READS GOOGLE'S INDEX OF X.COM, so it returns the tweets Google has indexed — typically the popular and recent ones — not the live firehose. Use the Account handles field for an account's complete latest 20-100 tweets.",
            "default": [
              "bitcoin"
            ],
            "items": {
              "type": "string"
            }
          },
          "twitterHandles": {
            "title": "Account handles (latest tweets)",
            "type": "array",
            "description": "X accounts whose latest tweets you want — a handle (NASA, @OpenAI) or a profile URL (https://x.com/nasa). Reads X's public embedded-timeline page: the newest 20 tweets for most accounts, up to 100 for high-volume ones, WITH retweet, reply and quote counts and the author's follower count, bio and website. Filtered by the date window, minimum likes and media filters below. Measured 16/16 accounts readable through the default datacenter proxy on 2026-08-22.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "From date (YYYY-MM-DD)",
            "type": "string",
            "description": "Only tweets posted on or after this day. Search mode: becomes Google after:YYYY-MM-DD (verified live 2026-08-22). Account mode: filters on the tweet's created date. Leave blank for no lower bound.",
            "default": ""
          },
          "until": {
            "title": "To date (YYYY-MM-DD)",
            "type": "string",
            "description": "Only tweets posted on or before this day. Search mode: Google before:YYYY-MM-DD. Leave blank for no upper bound.",
            "default": ""
          },
          "recency": {
            "title": "Recency (search mode)",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Ask Google for tweets indexed in the past day / week / month / year. Ignored when a date window is set. Account mode is always newest-first.",
            "default": "any"
          },
          "language": {
            "title": "Tweet language (search mode)",
            "type": "string",
            "description": "Two-letter language code (es, de, ja, pt …). Restricts Google to pages in that language — lr=lang_xx — which in practice returns tweets written in it. Verified: lang es returned Spanish-language accounts only. Leave blank for any language.",
            "default": ""
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop tweets with fewer likes. Applied after the tweet is fetched, before billing — filtered rows cost nothing.",
            "default": 0
          },
          "onlyWithMedia": {
            "title": "Only tweets with a photo or video",
            "type": "boolean",
            "description": "Keep only tweets that carry at least one image, GIF or video. The media array on each row holds the direct pbs.twimg.com / video.twimg.com URLs.",
            "default": false
          },
          "includeRetweets": {
            "title": "Include retweets (account mode)",
            "type": "boolean",
            "description": "Account timelines contain the account's retweets. OFF (default) drops them so you get the account's own posts. ON keeps them as rows with isRetweet = true, the original author in retweetedFromHandle and the original tweet's engagement counts.",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies (account mode)",
            "type": "boolean",
            "description": "ON (default) keeps the account's replies to other tweets (isReply = true, inReplyToHandle set). OFF drops them.",
            "default": true
          },
          "enrichAuthors": {
            "title": "Enrich authors with followers, bio and website",
            "type": "boolean",
            "description": "OFF by default so the first click stays cheap. ON adds one extra request per unique author (cached within the run) and bills the author-enriched event once per author found.",
            "default": false
          },
          "maxAuthorsToEnrich": {
            "title": "Max authors to enrich",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on author-enriched events per run. Authors beyond the cap keep their basic fields and are not charged.",
            "default": 50
          },
          "maxTweets": {
            "title": "Max tweets (hard cost cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many unique tweets across the whole run. At $0.0015 per tweet, 100 = $0.15, 1,000 = $1.50.",
            "default": 100
          },
          "maxTweetsPerTerm": {
            "title": "Max tweets per search term / account",
            "minimum": 1,
            "type": "integer",
            "description": "Per-term ceiling so one broad term cannot eat the whole run budget. Account timelines publish at most ~100 tweets per account regardless.",
            "default": 100
          },
          "maxPagesPerTerm": {
            "title": "Max Google result pages per term",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Each Google page yields roughly 2-10 tweet links (measured 5.75 on average over 24 pages). 10 pages ≈ 50-70 tweets per term. Google stops serving new results after a few pages for narrow queries; the Actor stops on its own when a page brings nothing new.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy for X requests",
            "type": "object",
            "description": "Default = Apify datacenter proxy, which measured BETTER than residential on X's syndication hosts (16/16 timelines vs 14/16 with two 429s on RESIDENTIAL+US, 2026-08-22). Hydration was 5/5 on direct, datacenter and residential alike. If a timeline 429s on datacenter the Actor retries it once through RESIDENTIAL automatically.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}