{
  "openapi": "3.0.1",
  "info": {
    "title": "X / Twitter Scraper - 42 Fields Per Post",
    "description": "Reads recent posts from X (Twitter) accounts by username or profile URL, around 100-200 per account, with an optional keyword filter. 42 fields per post: full text, author, timestamp, language, replies, reposts, likes, quotes and bookmarks, media, reply and quote context, and engagement scores.",
    "version": "1.0",
    "x-build-id": "l7sqQcvxOjEyIieKm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~x-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-x-com-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/parseforge~x-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-x-com-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/parseforge~x-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-x-com-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": {
          "maxItems": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many posts to collect per run."
          },
          "startUrls": {
            "title": "X profile or post URLs",
            "type": "array",
            "description": "Direct URLs to scrape. Supports post URLs (https://x.com/username/status/1234567890) and profile URLs (https://x.com/username). x.com and twitter.com are both accepted, with or without https://. If you also fill Usernames below, these URLs take precedence and any extra usernames are listed in the run log.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQuery": {
            "title": "Search term for posts",
            "type": "string",
            "description": "Keyword filter applied to the posts collected from the URLs and usernames above. Quote \"an exact phrase\" to require it, and prefix -word to exclude it. Searching all of X is not possible logged out: without a session this only filters the accounts you list. If you add your own X session below, the same term also runs as a search across all of X (latest posts)."
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "List of X.com usernames to scrape posts from. A leading @ is accepted and removed, and a full profile URL is accepted too. Combine with the search term to filter a user's posts by keyword.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy datacenter IPs are used by default and are enough for public profiles and posts. Pick Residential if X keeps rate-limiting your runs or serves empty timelines. When X answers with a rate limit, the run switches to a new IP and retries a few times.",
            "default": {
              "useApifyProxy": true
            }
          },
          "sessionAuthToken": {
            "title": "X session: auth_token cookie (optional)",
            "type": "string",
            "description": "Only needed for keyword search across all of X. Use a secondary X account, not your main one: X can lock accounts that are used for automated searching. How to get it: 1) log in to x.com in Chrome with that account; 2) open DevTools (F12), go to Application, then Cookies, then https://x.com; 3) copy the value of auth_token here and the value of ct0 in the next field. The value is stored encrypted, is never written to the log or the dataset, and is only sent to x.com."
          },
          "sessionCt0": {
            "title": "X session: ct0 cookie (optional)",
            "type": "string",
            "description": "The ct0 cookie from the same browser session as auth_token (DevTools, Application, Cookies, https://x.com). Both are required."
          },
          "sessionCookies": {
            "title": "X session: full cookie string (optional, instead of the two fields above)",
            "type": "string",
            "description": "Alternatively, paste the whole Cookie header of a logged-in x.com request (for example from a cookie export extension). auth_token and ct0 are read from it."
          },
          "enrichOutput": {
            "title": "✨ Enrich each tweet with cross-platform trend data",
            "type": "boolean",
            "description": "Toggle on to add Google/YouTube/News momentum + growth rates to every tweet, keyed by the topic (search query, mentioned username, or hashtag). Default off (free of charge). Requires a connector below.",
            "default": false
          },
          "enrichConnector": {
            "title": "✨ Enrichment Connector",
            "type": "string",
            "description": "Pick Apollo.io (primary) to enrich each tweet's author with their company profile (size, funding, industry, LinkedIn). Or pick Trends MCP (secondary) for cross-platform topic momentum."
          },
          "enrichTool": {
            "title": "✨ Enrichment tool override (advanced)",
            "type": "string",
            "description": "Override the auto-picked tool name. Leave empty for auto-detect."
          },
          "mcpProxyUrlOverride": {
            "title": "🛠 MCP proxy URL override (dev/diagnostic)",
            "type": "string",
            "description": "Diagnostic only. Bypasses Apify's MCP proxy. Leave empty for normal use."
          },
          "mcpTokenOverride": {
            "title": "🛠 MCP bearer token override (dev/diagnostic)",
            "type": "string",
            "description": "Diagnostic only. Used with URL override. Leave empty for normal use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}