{
  "openapi": "3.0.1",
  "info": {
    "title": "X Twitter Scraper: Tweets, Replies, Followers (No Mock Data)",
    "description": "Twitter scraper for X: tweets by search, profile, link or replies, plus followers and following. Exact limits, real date filters, no mock data, and you pay only for real, unique rows.",
    "version": "0.1",
    "x-build-id": "m7sTkFhotL0n3Xqb8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/himanshu-data~x-twitter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-himanshu-data-x-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/himanshu-data~x-twitter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-himanshu-data-x-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/himanshu-data~x-twitter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-himanshu-data-x-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": "X search queries, one per line. Advanced operators work: from:nasa, since:2024-01-01, min_faves:100, lang:en, -filter:replies and more.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "Latest gives the newest tweets first. Top gives what X ranks as most relevant.",
            "default": "Latest"
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "Get the tweets of these accounts. Handles or profile links: nasa, @nasa or https://x.com/nasa. One per line.",
            "items": {
              "type": "string"
            }
          },
          "includeReplies": {
            "title": "Include the profile's own replies",
            "type": "boolean",
            "description": "On: profile tweets also include replies the account posted.",
            "default": false
          },
          "tweetUrls": {
            "title": "Tweet links or IDs",
            "type": "array",
            "description": "Fetch these tweets directly, e.g. https://x.com/nasa/status/1234567890123456789 or just the ID. One per line.",
            "items": {
              "type": "string"
            }
          },
          "repliesOf": {
            "title": "Replies of tweets",
            "type": "array",
            "description": "Collect the replies to these tweets. Tweet links or IDs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "followersOf": {
            "title": "Followers of",
            "type": "array",
            "description": "Collect the followers of these accounts (one row per user). Handles or profile links, one per line.",
            "items": {
              "type": "string"
            }
          },
          "followingOf": {
            "title": "Following of",
            "type": "array",
            "description": "Collect the accounts these accounts follow (one row per user). Handles or profile links, one per line.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max rows per input item",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum rows for each search term, profile, tweet's replies or handle's followers. Enforced exactly: the last page is trimmed.",
            "default": 100
          },
          "maxTotalItems": {
            "title": "Max rows for the whole run",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Optional hard cap across all input items. Leave empty for no total cap."
          },
          "startDate": {
            "title": "From date",
            "type": "string",
            "description": "Only tweets posted on or after this day (UTC). Tweets outside the range are skipped and not charged."
          },
          "endDate": {
            "title": "To date",
            "type": "string",
            "description": "Only tweets posted on or before this day (UTC, the whole day is included)."
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tweets with fewer likes."
          },
          "minRetweets": {
            "title": "Min retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tweets with fewer retweets."
          },
          "minReplies": {
            "title": "Min replies",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tweets with fewer replies."
          },
          "minViews": {
            "title": "Min views",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tweets with fewer views. Tweets with an unknown view count are skipped when this is set."
          },
          "language": {
            "title": "Language",
            "pattern": "^([A-Za-z]{2})?$",
            "type": "string",
            "description": "Two-letter language code, e.g. en, es, ja. Only tweets in this language."
          },
          "excludeRetweets": {
            "title": "Exclude retweets",
            "type": "boolean",
            "description": "Skip retweets.",
            "default": false
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Skip tweets that are replies.",
            "default": false
          },
          "onlyWithMedia": {
            "title": "Only tweets with media",
            "type": "boolean",
            "description": "Only tweets with a photo, video or GIF.",
            "default": false
          },
          "onlyVerifiedAuthors": {
            "title": "Only verified authors",
            "type": "boolean",
            "description": "Only tweets by verified accounts (legacy or blue check).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}