{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Tweet Scraper — browserless",
    "description": "Scrapes public tweets from X without a browser engine, using guest-token GraphQL over plain HTTP. Free runs return up to 10 results.",
    "version": "0.1",
    "x-build-id": "wj4iT8pgxQKYZrlWc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arthurvianna~x-tweet-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arthurvianna-x-tweet-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/arthurvianna~x-tweet-scraper/runs": {
      "post": {
        "operationId": "runs-sync-arthurvianna-x-tweet-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/arthurvianna~x-tweet-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-arthurvianna-x-tweet-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": {
          "fromUsers": {
            "title": "From these accounts",
            "type": "array",
            "description": "Handles without '@'. When supplied, the Actor makes no third-party call at all: these accounts are crawled directly on X. This is the fastest and most deterministic path — clear it to discover accounts from `searchTerms`/`hashtags` instead.",
            "items": {
              "type": "string"
            }
          },
          "tweetIds": {
            "title": "Tweet IDs",
            "type": "array",
            "description": "Specific tweet ids to hydrate, one request each. This is a target in its own right: a run may supply only tweetIds and no accounts. An id that names a deleted or unreachable tweet is counted and skipped, never fatal.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to match against tweet text (case-insensitive). Multiple terms are OR'd. X's search timeline is closed to guest tokens, so this is the stretch surface: with no `fromUsers` supplied these keywords also seed account discovery via one search-engine lookup. Recall is seed-bounded — see the README.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Without '#'. A post-filter over the timelines a target produced, matched case-insensitively against the tweet's hashtag entities — not a target on its own.",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Since (inclusive)",
            "type": "string",
            "description": "ISO date or datetime, e.g. 2026-08-01. Inclusive. Applied to the tweet's Snowflake ID, so it is exact."
          },
          "until": {
            "title": "Until (inclusive)",
            "type": "string",
            "description": "ISO date or datetime. Inclusive — a bare date covers the whole day up to 23:59:59.999 UTC."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "ISO-639-1 code, matched against X's own language detection (e.g. en, pt, es)."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Inclusive floor."
          },
          "minRetweets": {
            "title": "Minimum retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Inclusive floor."
          },
          "minReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Inclusive floor."
          },
          "onlyVerified": {
            "title": "Only verified authors",
            "type": "boolean",
            "description": "X conflates paid Blue with legacy verification, so this matches either. Leave unset for no constraint — it never excludes verified authors."
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "images",
              "video",
              "links",
              "text_only"
            ],
            "type": "string",
            "description": "images = has at least one photo; video = has video or GIF (X stores GIFs as MP4); links = has at least one URL; text_only = no media and no links."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Excluded by default.",
            "default": false
          },
          "includeRetweets": {
            "title": "Include retweets",
            "type": "boolean",
            "description": "Excluded by default. When included, a retweet carries the original's full text and metrics — the retweet wrapper's counters are structurally zero.",
            "default": false
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "latest",
              "top"
            ],
            "type": "string",
            "description": "latest = newest first, exact (tweet IDs are monotonic). top = ranked by likes + retweets within the collected set; X's own relevance ranking is not reproducible from the logged-out surface.",
            "default": "latest"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "How many tweets to return. Free runs are capped at 10 results regardless of this value; the cap is enforced server-side. Paid runs receive the full amount.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are recommended: X rate-limits per guest token and per IP, and the Actor pins one token to one IP for the life of a session.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Concurrent accounts",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Advanced. A single timeline's cursor chain is sequential, so parallelism happens across accounts.",
            "default": 4
          },
          "maxAccounts": {
            "title": "Maximum accounts to crawl",
            "minimum": 1,
            "type": "integer",
            "description": "Advanced. Upper bound on how many accounts a single run will crawl, including accounts found by seed expansion.",
            "default": 50
          },
          "maxPagesPerAccount": {
            "title": "Maximum pages per account",
            "minimum": 1,
            "type": "integer",
            "description": "Advanced. One page is ~20 tweets on a paginated timeline.",
            "default": 25
          },
          "expansionDepth": {
            "title": "Seed expansion depth",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Advanced. 0 disables snowball expansion. Mentions and retweeted authors are harvested from pages already fetched, so expansion costs no extra requests — but precision decays with depth.",
            "default": 1
          },
          "maxSessions": {
            "title": "Guest token pool size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Advanced. Each token is worth ~50 requests per 15 minutes. Tokens are free and instant to mint.",
            "default": 5
          },
          "maxRequests": {
            "title": "Request budget",
            "minimum": 1,
            "type": "integer",
            "description": "Advanced. Hard ceiling on requests to X for the whole run — the cost control. Low-selectivity keyword filters can otherwise fetch thousands of tweets for a handful of matches.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}