{
  "openapi": "3.0.1",
  "info": {
    "title": "X/Twitter Intelligence Scraper Pro",
    "description": "Scrape public X/Twitter posts and profiles from search terms, handles, tweet URLs, and lists. Export clean tweet, author, media, engagement, and monitoring data for research, marketing, and social listening.",
    "version": "1.0",
    "x-build-id": "Fd6xWeIbeN1xvE5E4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~x-twitter-intelligence-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-x-twitter-intelligence-scraper-pro",
        "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/qaseemiqbal~x-twitter-intelligence-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-x-twitter-intelligence-scraper-pro",
        "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/qaseemiqbal~x-twitter-intelligence-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-x-twitter-intelligence-scraper-pro",
        "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": {
          "scrapeMode": {
            "title": "Scrape mode",
            "enum": [
              "auto",
              "search",
              "profiles",
              "urls",
              "lists",
              "tweetDetails",
              "conversation",
              "monitoring",
              "userDiscovery"
            ],
            "type": "string",
            "description": "How the Actor routes the input.",
            "default": "auto"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Raw X/Twitter search queries.",
            "items": {
              "type": "string"
            }
          },
          "twitterHandles": {
            "title": "Twitter/X handles",
            "type": "array",
            "description": "Profile handles to scrape.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Tweet, profile, list, or search URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "X/Twitter tweet, profile, list, or search URL.",
                  "type": "string"
                }
              }
            }
          },
          "tweetIds": {
            "title": "Tweet IDs",
            "type": "array",
            "description": "Tweet/status IDs to enrich.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User IDs",
            "type": "array",
            "description": "Public numeric user IDs for future user-based routing.",
            "items": {
              "type": "string"
            }
          },
          "queryWizard": {
            "title": "Query Wizard",
            "type": "object",
            "description": "Structured fields converted into X/Twitter search syntax."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "latest",
              "top",
              "latest_and_top",
              "auto_fallback"
            ],
            "type": "string",
            "description": "Result ordering strategy for search requests.",
            "default": "latest"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of records to plan and push for the run.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Maximum items per query",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of records to collect for each query, URL, handle, or list.",
            "default": 100
          },
          "maxItemsPerProfile": {
            "title": "Maximum items per profile",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of records to collect for each profile timeline.",
            "default": 100
          },
          "filters": {
            "title": "Post-processing filters",
            "type": "object",
            "description": "Filters applied after extraction, such as language, engagement, media, and verification filters."
          },
          "profileMode": {
            "title": "Profile mode",
            "enum": [
              "tweets",
              "tweets_and_replies",
              "media",
              "likes_if_public",
              "profile_only"
            ],
            "type": "string",
            "description": "Which public profile timeline view to scrape for handles and profile URLs.",
            "default": "tweets"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Include reply posts where the selected mode supports replies.",
            "default": false
          },
          "includeRetweets": {
            "title": "Include retweets",
            "type": "boolean",
            "description": "Include retweets where they are visible and supported by the selected mode.",
            "default": false
          },
          "includePinnedTweet": {
            "title": "Include pinned tweet",
            "type": "boolean",
            "description": "Include a profile's pinned tweet when it is present and visible.",
            "default": true
          },
          "conversationOptions": {
            "title": "Conversation options",
            "type": "object",
            "description": "Controls for replies, parent context, quoted tweets, reply limits, and reply depth."
          },
          "conversationOutputMode": {
            "title": "Conversation output mode",
            "enum": [
              "flat",
              "nested"
            ],
            "type": "string",
            "description": "Whether conversation records are emitted as flat rows or nested conversation data.",
            "default": "flat"
          },
          "dateSplitStrategy": {
            "title": "Date split strategy",
            "enum": [
              "none",
              "daily",
              "weekly",
              "monthly",
              "auto"
            ],
            "type": "string",
            "description": "How date ranges are split into smaller search windows.",
            "default": "none"
          },
          "maxDaysPerWindow": {
            "title": "Maximum days per window",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Maximum number of days in each generated date window.",
            "default": 7
          },
          "authorDetailLevel": {
            "title": "Author detail level",
            "enum": [
              "minimal",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "Amount of author profile metadata to include in tweet records.",
            "default": "standard"
          },
          "includeMedia": {
            "title": "Include media metadata",
            "type": "boolean",
            "description": "Include media metadata such as media URLs, previews, dimensions, and alt text when available.",
            "default": true
          },
          "downloadMedia": {
            "title": "Download media",
            "type": "boolean",
            "description": "Download media files into key-value storage. This increases runtime and storage cost.",
            "default": false
          },
          "mediaDownloadMode": {
            "title": "Media download mode",
            "enum": [
              "metadata_only",
              "download_images",
              "download_videos",
              "download_all"
            ],
            "type": "string",
            "description": "Which media types to download when media downloading is enabled.",
            "default": "metadata_only"
          },
          "flattenOutput": {
            "title": "Flatten output",
            "type": "boolean",
            "description": "Flatten selected nested output fields for easier CSV and spreadsheet exports.",
            "default": false
          },
          "outputFields": {
            "title": "Output fields",
            "type": "array",
            "description": "Optional list of fields to keep in the final output records.",
            "items": {
              "type": "string"
            }
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Include raw extracted page data in output records. This increases dataset size.",
            "default": false
          },
          "cleanText": {
            "title": "Clean text",
            "type": "boolean",
            "description": "Normalize whitespace in tweet text and store it as cleanText.",
            "default": true
          },
          "includeRagFields": {
            "title": "Include RAG fields",
            "type": "boolean",
            "description": "Add AI/RAG-friendly content and metadata fields to tweet records.",
            "default": false
          },
          "deduplicateBy": {
            "title": "Deduplicate by",
            "enum": [
              "none",
              "tweetId",
              "url",
              "contentHash"
            ],
            "type": "string",
            "description": "Field or strategy used to detect duplicate tweet records.",
            "default": "tweetId"
          },
          "deduplicateScope": {
            "title": "Deduplicate scope",
            "enum": [
              "run",
              "query",
              "persistent"
            ],
            "type": "string",
            "description": "Whether deduplication applies within the run, per query, or across monitoring runs.",
            "default": "run"
          },
          "monitoring": {
            "title": "Monitoring options",
            "type": "object",
            "description": "Stateful monitoring settings for repeated scheduled runs."
          },
          "crawlStrategy": {
            "title": "Crawl strategy",
            "enum": [
              "http_only",
              "http_first",
              "browser_only"
            ],
            "type": "string",
            "description": "Use HTTP-only for the lowest cost. Browser modes cost more but may recover data from pages that need JavaScript.",
            "default": "http_only"
          },
          "browserFallbackOnEmpty": {
            "title": "Use browser fallback on empty HTTP pages",
            "type": "boolean",
            "description": "Only applies to HTTP first mode. Enabling this increases compute cost.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of requests to process at the same time.",
            "default": 1
          },
          "minConcurrency": {
            "title": "Minimum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Minimum crawler concurrency for browser-based runs.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of retry attempts for failed requests.",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time to spend on a single request before treating it as failed.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration for requests and browser fallback.",
            "default": {
              "useApifyProxy": true
            }
          },
          "customMapFunction": {
            "title": "Custom map function",
            "type": "string",
            "description": "Advanced JavaScript function body receiving record and helpers."
          },
          "allowCustomFilter": {
            "title": "Allow custom function to filter",
            "type": "boolean",
            "description": "Allow customMapFunction to remove records by returning null.",
            "default": false
          },
          "externalWebhookUrl": {
            "title": "External webhook URL",
            "type": "string",
            "description": "Optional endpoint that receives pushed output records as JSON."
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable extra logging and diagnostic output.",
            "default": false
          },
          "saveHtmlSnapshots": {
            "title": "Save HTML snapshots",
            "type": "boolean",
            "description": "Save HTML snapshots for debugging. This increases storage usage.",
            "default": false
          },
          "saveFailedPages": {
            "title": "Save failed pages",
            "type": "boolean",
            "description": "Save failed pages for troubleshooting. This increases storage usage.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}