{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter X Profile Scraper",
    "description": "Twitter/X Profile & Tweet Scraper without search functionality. Extract complete profile information, tweets, replies, and media from public accounts with advanced filtering by date range, engagement metrics, and content type. UserName Thats All You Need!",
    "version": "0.0",
    "x-build-id": "LzjkttY3dcDffCY0A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api402~twitter-x-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api402-twitter-x-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/api402~twitter-x-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api402-twitter-x-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/api402~twitter-x-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api402-twitter-x-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": [
          "proxyConfiguration"
        ],
        "properties": {
          "twitterHandles": {
            "title": "🐦 Twitter Usernames / Handles",
            "type": "array",
            "description": "Enter Twitter handles to scrape. With or without the @ symbol (e.g. <code>elonmusk</code> or <code>@apify</code>).",
            "items": {
              "type": "string"
            }
          },
          "twitterUrls": {
            "title": "🔗 Twitter Profile URLs",
            "type": "array",
            "description": "Direct links to Twitter/X profiles (e.g. <code>https://x.com/elonmusk</code>). Use this instead of handles if you have full URLs.",
            "items": {
              "type": "string"
            }
          },
          "includeReplies": {
            "title": "Include Replies",
            "type": "boolean",
            "description": "Enable to include reply tweets in results. Disabled by default to keep results focused on original tweets.",
            "default": false
          },
          "mediaOnly": {
            "title": "Media Only",
            "type": "boolean",
            "description": "Enable to scrape only tweets containing images or videos.",
            "default": false
          },
          "maxItems": {
            "title": "📦 Max Tweets to Scrape",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of tweets to collect. Set to <code>0</code> for unlimited. Keep this low on your first run to test quickly and avoid unexpected costs.",
            "default": 20
          },
          "email": {
            "title": "📧 Email for Guaranteed Delivery",
            "type": "string",
            "description": "Enter your email for guaranteed dataset delivery in 10–30 mins (mostly &lt; 10 mins) with zero compute fees and a 10% discount if live scraping fails."
          },
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Keywords to search for within tweets. Supports AND/OR operators (e.g. <code>AI research</code>, <code>web scraping</code>).",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "📅 Start Date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$|^$",
            "type": "string",
            "description": "Filter tweets from this date onwards. Format: <code>YYYY-MM-DD</code> (e.g. <code>2024-01-01</code>). Leave empty for no start date limit."
          },
          "endDate": {
            "title": "📅 End Date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$|^$",
            "type": "string",
            "description": "Filter tweets up to this date. Format: <code>YYYY-MM-DD</code> (e.g. <code>2024-12-31</code>). Leave empty for no end date limit."
          },
          "location": {
            "title": "📍 Location Filter",
            "type": "string",
            "description": "Filter tweets by location (e.g. <code>New York</code>, <code>London</code>). Leave empty to skip location filtering."
          },
          "minLikes": {
            "title": "Minimum Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only include tweets with at least this many likes. Set to <code>0</code> to disable.",
            "default": 0
          },
          "minReplies": {
            "title": "Minimum Replies",
            "minimum": 0,
            "type": "integer",
            "description": "Only include tweets with at least this many replies. Set to <code>0</code> to disable.",
            "default": 0
          },
          "minRetweets": {
            "title": "Minimum Retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Only include tweets with at least this many retweets. Set to <code>0</code> to disable.",
            "default": 0
          },
          "contentInclude": {
            "title": "Include Only: Media (Images or Videos)",
            "type": "boolean",
            "description": "Enable to include only tweets that contain any media (images or videos).",
            "default": false
          },
          "onlyVerified": {
            "title": "Include Only: Verified Users",
            "type": "boolean",
            "description": "Enable to include only tweets from verified (blue-check) accounts.",
            "default": false
          },
          "onlyLinks": {
            "title": "Include Only: Tweets with Links",
            "type": "boolean",
            "description": "Enable to include only tweets that contain external links.",
            "default": false
          },
          "onlyQuotes": {
            "title": "Include Only: Quote Tweets",
            "type": "boolean",
            "description": "Enable to include only quote tweets.",
            "default": false
          },
          "excludeReplies": {
            "title": "Exclude Replies",
            "type": "boolean",
            "description": "Enable to exclude reply tweets from results.",
            "default": false
          },
          "excludeRetweets": {
            "title": "Exclude Retweets",
            "type": "boolean",
            "description": "Enable to exclude native retweets from results.",
            "default": false
          },
          "excludeMedia": {
            "title": "Exclude Media Tweets",
            "type": "boolean",
            "description": "Enable to exclude tweets containing any media (images or videos).",
            "default": false
          },
          "excludeLinks": {
            "title": "Exclude Tweets with Links",
            "type": "boolean",
            "description": "Enable to exclude tweets containing external links.",
            "default": false
          },
          "nsfwContent": {
            "title": "Enable NSFW / Sensitive Content",
            "type": "boolean",
            "description": "Enable to scrape sensitive, NSFW, and age-restricted profile content.",
            "default": true
          },
          "useResidentialProxy": {
            "title": "Use Residential Proxy",
            "type": "boolean",
            "description": "Enable Apify residential proxies for resilient and unblocked scraping.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Select Apify Residential Proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts for failed requests. Increase if you experience frequent failures.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}