{
  "openapi": "3.0.1",
  "info": {
    "title": "Advanced X (Twitter) Profile Scraper",
    "description": "Scrape all tweets from any X (Twitter) profile — not just recent ones. Uses advanced search with date ranges to capture full history, with rich per-tweet data: text, media, engagement metrics and author details. Fast, stable & API-based.",
    "version": "1.0",
    "x-build-id": "YzCITDMO6P5wJwAM6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/delicious_zebu~advanced-x-twitter-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-delicious_zebu-advanced-x-twitter-profile-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/delicious_zebu~advanced-x-twitter-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-delicious_zebu-advanced-x-twitter-profile-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/delicious_zebu~advanced-x-twitter-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-delicious_zebu-advanced-x-twitter-profile-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",
        "required": [
          "accountUrls",
          "startDate",
          "endDate",
          "splitMode",
          "language"
        ],
        "properties": {
          "accountUrls": {
            "title": "Account URLs",
            "maxItems": 5000,
            "type": "array",
            "description": "List of X (Twitter) profile URLs to scrape tweets from. Example: https://x.com/NASA. Free plan: results are capped at 50 per run shared across all URLs (add more accounts on a paid plan).",
            "default": [
              "https://x.com/elonmusk",
              "https://x.com/NASA"
            ],
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Start date, inclusive. Only tweets posted on or after this date are scraped. Format: YYYY-MM-DD.",
            "default": "2025-09-01"
          },
          "endDate": {
            "title": "End Date (YYYY-MM-DD)",
            "type": "string",
            "description": "End date, inclusive. Only tweets posted on or before this date are scraped. Format: YYYY-MM-DD.",
            "default": "2025-09-05"
          },
          "splitMode": {
            "title": "Split Mode",
            "enum": [
              "day",
              "week",
              "month"
            ],
            "type": "string",
            "description": "How to split the date range into search segments. X search hides older tweets in wide ranges, so smaller segments capture more. 'By day' is the most thorough (but uses more results); 'By week' or 'By month' are faster for long ranges.",
            "default": "day"
          },
          "language": {
            "title": "Language",
            "enum": [
              "any",
              "ar",
              "ar-x-fm",
              "bn",
              "eu",
              "bg",
              "ca",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "fi",
              "fr",
              "de",
              "el",
              "gu",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "kn",
              "ko",
              "mr",
              "no",
              "fa",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "zh-cn",
              "sk",
              "es",
              "sv",
              "ta",
              "th",
              "zh-tw",
              "tr",
              "uk",
              "ur",
              "vi"
            ],
            "type": "string",
            "description": "Only return tweets in this language. Choose 'Any language' to disable filtering. Matches X's advanced-search language list.",
            "default": "any"
          },
          "maxCollections": {
            "title": "Max tweets per profile",
            "type": "integer",
            "description": "Maximum number of tweets to collect per profile. Set to 0 for unlimited (paid plan). Free plan runs are capped at 50 results total per run regardless of this value.",
            "default": 0
          },
          "keyword": {
            "title": "Keyword filter (optional)",
            "type": "string",
            "description": "Only return the profile's tweets that contain this keyword or phrase. Leave empty to get all tweets."
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Turn on to skip replies and return only the profile's original tweets.",
            "default": false
          },
          "mediaFilter": {
            "title": "Media filter",
            "enum": [
              "any",
              "images",
              "videos"
            ],
            "type": "string",
            "description": "Only return tweets that contain the selected media type.",
            "default": "any"
          },
          "minLikes": {
            "title": "Minimum likes",
            "type": "integer",
            "description": "Only return tweets with at least this many likes. 0 means no minimum.",
            "default": 0
          },
          "minRetweets": {
            "title": "Minimum reposts",
            "type": "integer",
            "description": "Only return tweets with at least this many retweets. 0 means no minimum.",
            "default": 0
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "Top",
              "Latest"
            ],
            "type": "string",
            "description": "How X ranks the results: 'Top' (most relevant) or 'Latest' (most recent first).",
            "default": "Top"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}