{
  "openapi": "3.0.1",
  "info": {
    "title": "X Twitter Scraper - Date Filter That Works, Replies & Quotes",
    "description": "X (Twitter) scraper with a date filter that holds: exact since/until windows, tweets outside the window dropped and counted. Full reply threads, quote tweets, followers, author profiles, topic, influencer, sentiment, trend and bot-signal rows. No-login profile mode. JSON, CSV, Excel.",
    "version": "1.0",
    "x-build-id": "DI4Z7ElKQ3s6o2Nua"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ntriqpro~x-twitter-deep-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ntriqpro-x-twitter-deep-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/ntriqpro~x-twitter-deep-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ntriqpro-x-twitter-deep-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/ntriqpro~x-twitter-deep-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ntriqpro-x-twitter-deep-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 (needs your X cookies)",
            "type": "array",
            "description": "X search queries, one per line. Any X search syntax works (from:, to:, filter:links, -filter:replies, lang:, #hashtag, \"exact phrase\"). Date operators are replaced by the exact window below. Needs your session cookies. Paid plans only: search with your own X session is a paid feature, and a free run counts the locked terms in its notice row.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles (no login needed)",
            "type": "array",
            "description": "X handles or profile URLs (NASA, @NASA, https://x.com/NASA). Returns the profile row and its timeline. Works without cookies.",
            "items": {
              "type": "string"
            }
          },
          "tweetUrls": {
            "title": "Tweet URLs (no login needed)",
            "type": "array",
            "description": "Tweet URLs or ids. Returns the tweet; with your cookies also its reply thread and quote tweets.",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Since (inclusive, UTC)",
            "type": "string",
            "description": "Start of the date window: YYYY-MM-DD, an ISO date-time, or relative like 7d / 24h. Tweets created before it are dropped and counted on the query-summary row."
          },
          "until": {
            "title": "Until (exclusive, UTC)",
            "type": "string",
            "description": "End of the date window, exclusive (same as X's own until:). YYYY-MM-DD, ISO date-time or relative. Tweets created at or after it are dropped and counted."
          },
          "evenlyAcrossDays": {
            "title": "Spread results evenly across days",
            "type": "boolean",
            "description": "Split a multi-day window into day slices and collect an equal share from each day, instead of only the newest tweets.",
            "default": false
          },
          "searchMode": {
            "title": "Search order",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "Latest walks the window newest to oldest. Top follows X's ranking.",
            "default": "Latest"
          },
          "maxTweetsPerQuery": {
            "title": "Max tweets per search term",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Top-level tweets per search term inside the window (replies and quotes are counted separately).",
            "default": 200
          },
          "maxTweetsPerProfile": {
            "title": "Max tweets per profile",
            "minimum": 1,
            "maximum": 3200,
            "type": "integer",
            "description": "Timeline tweets per profile (including the profile's retweets, marked isRetweet).",
            "default": 100
          },
          "includeReplies": {
            "title": "Reply threads",
            "type": "boolean",
            "description": "For the most-replied tweets of each query, collect the reply thread (one row per reply). Needs cookies.",
            "default": true
          },
          "includeQuotes": {
            "title": "Quote tweets",
            "type": "boolean",
            "description": "For the most-quoted tweets of each query, collect the quote tweets (one row per quote). Needs cookies; uses the search limit.",
            "default": true
          },
          "threadsPerQuery": {
            "title": "Tweets to expand per query",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many of the most-discussed tweets per query get their replies and quotes collected.",
            "default": 10
          },
          "maxRepliesPerTweet": {
            "title": "Max replies per tweet",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Reply rows per expanded tweet.",
            "default": 100
          },
          "maxQuotesPerTweet": {
            "title": "Max quotes per tweet",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Quote rows per expanded tweet.",
            "default": 40
          },
          "includeAuthorProfiles": {
            "title": "Author profiles",
            "type": "boolean",
            "description": "One profile row per unique author (followers, following, account age, verification, bio). Taken from the tweets already fetched: no extra requests.",
            "default": true
          },
          "maxFollowersPerProfile": {
            "title": "Followers per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Follower rows for each input profile (0 = off). Needs cookies.",
            "default": 0
          },
          "includeAnalysis": {
            "title": "Analysis rows",
            "type": "boolean",
            "description": "Per query: topic clusters, influencer ranking, complaint and sentiment themes, time trend with spikes, bot-suspicion signals. Free plan: the first row of each type as an uncharged preview.",
            "default": true
          },
          "analysisLayers": {
            "title": "Analysis layers",
            "type": "array",
            "description": "Leave empty for all five.",
            "items": {
              "type": "string",
              "enum": [
                "topic-clusters",
                "influencer-rank",
                "sentiment-themes",
                "time-trend",
                "bot-signals"
              ],
              "enumTitles": [
                "Topic clusters",
                "Influencer ranking",
                "Complaint and sentiment themes",
                "Time trend and spikes",
                "Bot-suspicion signals"
              ]
            }
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep tweets with at least this many likes (sent to X as min_faves: and checked again).",
            "default": 0
          },
          "minRetweets": {
            "title": "Min retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Keep tweets with at least this many retweets.",
            "default": 0
          },
          "minReplies": {
            "title": "Min replies",
            "minimum": 0,
            "type": "integer",
            "description": "Keep tweets with at least this many replies.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code (en, es, ja). Sent to X as lang: and checked again."
          },
          "cookies": {
            "title": "Your X session cookies",
            "type": "string",
            "description": "Search, reply threads, quote tweets and followers only answer signed-in sessions. Paste YOUR OWN x.com cookies (a cookie-editor JSON export, or an 'auth_token=…; ct0=…' header; auth_token and ct0 are required). The run acts as your X account: you accept the risk of X limiting or locking that account and you are responsible for complying with X's terms. We pace requests to X's own limits (search: 50 per 15 minutes per account). The value is stored encrypted and never written to the log, dataset or key-value store. Paid plans only: the free plan ignores cookies, so a free run never acts as your X account."
          },
          "maxRateLimitWaitSeconds": {
            "title": "Max wait for X rate limits (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "When X's per-account limit is reached, wait up to this long for the 15-minute window to reset. Beyond it the run skips the limited step and says so in a notice row.",
            "default": 960
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Without a proxy the run connects directly; with your cookies, a residential proxy close to your usual location looks most like your own browser.",
            "default": {
              "useApifyProxy": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}