{
  "openapi": "3.0.1",
  "info": {
    "title": "X / Twitter Scraper — Clean Data API",
    "description": "Extract public X posts into duplicate-free clean JSON. No buyer API keys. Never fabricates results. Pay only for delivered unique posts.",
    "version": "1.1",
    "x-build-id": "YMe7MeaTgQQdXGjHc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ladra~x-twitter-scraper-clean-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ladra-x-twitter-scraper-clean-data",
        "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/ladra~x-twitter-scraper-clean-data/runs": {
      "post": {
        "operationId": "runs-sync-ladra-x-twitter-scraper-clean-data",
        "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/ladra~x-twitter-scraper-clean-data/run-sync": {
      "post": {
        "operationId": "run-sync-ladra-x-twitter-scraper-clean-data",
        "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": {
          "postUrls": {
            "title": "X post URLs",
            "type": "array",
            "description": "Public x.com or twitter.com status URLs. Works with no API keys (public embed path).",
            "items": {
              "type": "string"
            }
          },
          "handles": {
            "title": "Profile handles",
            "type": "array",
            "description": "Recent profile posts (e.g. \"OpenAI\"). Available when the Actor publisher configured a data transport (buyers never paste tokens).",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search queries",
            "type": "array",
            "description": "Search queries. Supports X advanced-search operators (e.g. \"apify (from:elonmusk) lang:en -is:retweet\"). Combine with the filter fields below. Available when the publisher configured a data transport.",
            "items": {
              "type": "string"
            }
          },
          "listUrls": {
            "title": "List URLs",
            "type": "array",
            "description": "Public X list URLs (e.g. https://x.com/i/lists/1234567890). Requires the publisher data transport.",
            "items": {
              "type": "string"
            }
          },
          "conversationIds": {
            "title": "Conversation IDs",
            "type": "array",
            "description": "Root tweet IDs to pull a thread/conversation (recent-search window). Requires the publisher data transport.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum validated posts",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard upper limit for unique returned posts. The actor never intentionally exceeds this number.",
            "default": 20
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Include replies on profile timelines when the data transport is enabled by the publisher.",
            "default": false
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "Ranking mode for search queries on the publisher data transport. Latest = chronological; Top = relevance/popularity. Official X API recent search is always chronological.",
            "default": "Latest"
          },
          "fromUsers": {
            "title": "Filter: from these users",
            "type": "array",
            "description": "Only posts authored by these handles (applied to every search query).",
            "items": {
              "type": "string"
            }
          },
          "mentionUsers": {
            "title": "Filter: mentioning these users",
            "type": "array",
            "description": "Only posts mentioning these handles.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Filter: language",
            "type": "string",
            "description": "ISO 639-1 language code (e.g. \"en\", \"es\", \"ja\")."
          },
          "onlyVerified": {
            "title": "Filter: verified authors only",
            "type": "boolean",
            "description": "Only posts from verified accounts.",
            "default": false
          },
          "mediaOnly": {
            "title": "Filter: has media",
            "type": "boolean",
            "description": "Only posts containing photos or videos.",
            "default": false
          },
          "linksOnly": {
            "title": "Filter: has links",
            "type": "boolean",
            "description": "Only posts containing links.",
            "default": false
          },
          "excludeReplies": {
            "title": "Filter: exclude replies",
            "type": "boolean",
            "description": "Drop replies from search and timelines.",
            "default": false
          },
          "excludeRetweets": {
            "title": "Filter: exclude retweets",
            "type": "boolean",
            "description": "Drop retweets from search and timelines.",
            "default": false
          },
          "minLikes": {
            "title": "Filter: minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many likes (third-party transport only)."
          },
          "minRetweets": {
            "title": "Filter: minimum retweets",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many retweets (third-party transport only)."
          },
          "sinceDate": {
            "title": "Filter: since date",
            "type": "string",
            "description": "Only posts on/after this date (YYYY-MM-DD)."
          },
          "untilDate": {
            "title": "Filter: until date",
            "type": "string",
            "description": "Only posts on/before this date (YYYY-MM-DD)."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Requested parallel post fetches. Resource profile and run memory may cap this (except profile=manual).",
            "default": 4
          },
          "resourceProfile": {
            "title": "Resource profile",
            "enum": [
              "safe",
              "speed",
              "manual"
            ],
            "type": "string",
            "description": "How aggressively to use allocated Apify RAM. Safe caps concurrency, speed allows more, manual honors maxConcurrency.",
            "default": "safe"
          },
          "memoryMbytes": {
            "title": "Preferred run memory (MB)",
            "minimum": 128,
            "maximum": 4096,
            "type": "integer",
            "description": "Optional preferred Apify run memory (power of 2 after rounding). Console run override still wins."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}