{
  "openapi": "3.0.1",
  "info": {
    "title": "Tweet Scraper — X/Twitter Search, Profiles, Replies | $0.35/1K",
    "description": "Scrape X (Twitter) search results, profiles, replies, and quotes with one actor. Full advanced-search operators and date filters, no X account or login needed, pay per result — $0.35 per 1,000 posts, no minimums, no per-query fees.",
    "version": "0.5",
    "x-build-id": "7VqXALMQi57CRo8Dx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agentxpro~x-twitter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agentxpro-x-twitter-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/agentxpro~x-twitter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-agentxpro-x-twitter-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/agentxpro~x-twitter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-agentxpro-x-twitter-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": {
          "count": {
            "title": "Results per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Page size, 1-100. Search results come in pages; the actor walks up to Max pages pages and merges them, duplicates removed.",
            "default": 20
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Search modes: YYYY-MM-DD. Only posts on or after this date (UTC). Can be combined with Date to."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Search modes: YYYY-MM-DD. Only posts up to this date (UTC). Can be combined with Date from."
          },
          "excludeQuotes": {
            "title": "Exclude quotes",
            "type": "boolean",
            "description": "Search, profile and profile search modes: drop quote posts (posts that quote another post). Dropped posts are not delivered and not charged.",
            "default": false
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Search, profile and profile search modes: drop replies (posts replying to another post). Dropped posts are not delivered and not charged.",
            "default": false
          },
          "excludeRetweets": {
            "title": "Exclude reposts (retweets)",
            "type": "boolean",
            "description": "Profile and profile search modes: drop reposts (retweets) — only the account’s own posts are delivered. In profile search this combines with the Include reposts switch.",
            "default": false
          },
          "fastMode": {
            "title": "Fast mode (previews)",
            "type": "boolean",
            "description": "Search modes: lightweight preview rows (real text, author and time, WITHOUT engagement stats or media detail) at maximum speed. Best for cheap discovery before a full pull. Never treat the missing stats as zeroes.",
            "default": false
          },
          "feed": {
            "title": "Feed",
            "enum": [
              "latest",
              "top",
              "media",
              "both"
            ],
            "type": "string",
            "description": "Search modes feed. Latest = newest first. Top = a wider pool ranked by likes + replies. Media = posts with media. Both = Latest and Top in one run, deduplicated — a post found by both feeds is delivered and charged once.",
            "default": "latest"
          },
          "fields": {
            "title": "Fields to keep",
            "type": "array",
            "description": "Keep only these top-level fields on every row (for example: text, likes, author, media). The id, mode and is_repost fields are always kept. Leave empty to keep all fields.",
            "items": {
              "type": "string"
            }
          },
          "flatten": {
            "title": "Add flat columns",
            "type": "boolean",
            "description": "Add flat spreadsheet-friendly columns to every row: authorUsername, authorName, authorId, authorFollowers, authorFollowing, authorVerified, mediaUrls, imageUrls, videoUrls, tweetUrl and totalEngagement (likes + replies + reposts + quotes + bookmarks). The original nested fields stay in place.",
            "default": false
          },
          "fromUsers": {
            "title": "From users",
            "type": "array",
            "description": "Search mode: only posts by these authors (handles without @; several allowed and combined). Author match is exact, mere mentions do not count.",
            "items": {
              "type": "string"
            }
          },
          "handle": {
            "title": "Profile handle",
            "type": "string",
            "description": "Profile timeline and profile search modes: X handle without @ (numeric account IDs also accepted). Required for profile search. Profile search pulls the account's posts including replies, page by page; add a keyword to keep only matching posts. The account's reposts are included too unless Include reposts is switched off."
          },
          "handles": {
            "title": "Profile handles (bulk)",
            "type": "array",
            "description": "Profile, profile search and user modes: several handles at once (without @). Each account is processed in order. When set, this replaces the single Profile handle field.",
            "items": {
              "type": "string"
            }
          },
          "includeArticleText": {
            "title": "Render article text",
            "type": "boolean",
            "description": "When a delivered post carries an X Article, add two rendered fields to its row: articleText (plain text) and articleMarkdown (Markdown), built from the article body. Posts without an article are unchanged.",
            "default": false
          },
          "includeReposts": {
            "title": "Include reposts (profile search)",
            "type": "boolean",
            "description": "Profile search mode only: include the account's reposts (posts by other authors that this account reposted, delivered as the original posts and marked is_repost: true in the results). Repost rows are billed at the lower repost rate. Turn off to receive only the account's own posts and replies.",
            "default": true
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Search modes: ISO 639-1 code (en, es, ja...). Only posts in this language. This is a filter, not a translation."
          },
          "listId": {
            "title": "List ID or URL",
            "type": "string",
            "description": "List mode: the numeric X List ID, or a full list URL (x.com/i/lists/… or x.com/…/lists/…). Rows are the list timeline posts, charged as search results."
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many pages to walk (search, profile search, profile and quotes modes), 1-50. More pages = older results. In profile search mode this is the harvest depth: each page pulls the account's next posts (including replies), so 25 pages is roughly 500 posts. A single deep search walk typically returns 100-300 posts for an active keyword; roughly 500 unique posts per keyword is the practical ceiling accumulated over days.",
            "default": 1
          },
          "mediaOnly": {
            "title": "Media only",
            "type": "boolean",
            "description": "Search modes: only posts with photos or videos.",
            "default": false
          },
          "minBookmarks": {
            "title": "Minimum bookmarks",
            "type": "integer",
            "description": "Search, profile and profile search modes: only posts with at least this many bookmarks (0 = no minimum).",
            "default": 0
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Search modes: only posts with at least this many likes (0 = no minimum).",
            "default": 0
          },
          "minQuotes": {
            "title": "Minimum quotes",
            "type": "integer",
            "description": "Search, profile and profile search modes: only posts with at least this many quote posts (0 = no minimum).",
            "default": 0
          },
          "minReplies": {
            "title": "Minimum replies",
            "type": "integer",
            "description": "Search, profile and profile search modes: only posts with at least this many replies (0 = no minimum).",
            "default": 0
          },
          "minRetweets": {
            "title": "Minimum reposts",
            "type": "integer",
            "description": "Search, profile and profile search modes: only posts with at least this many reposts/retweets (0 = no minimum).",
            "default": 0
          },
          "minViews": {
            "title": "Minimum views",
            "type": "integer",
            "description": "Search, profile and profile search modes: only posts with at least this many views (0 = no minimum). Posts whose view count is not public are dropped when a minimum is set.",
            "default": 0
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "status",
              "profile",
              "profileSearch",
              "quotes",
              "conversation",
              "list",
              "user"
            ],
            "type": "string",
            "description": "What to fetch. Search, single post, profile timeline, profile search, quotes, conversation (replies), list timeline, or user (profile metadata only). The Start URLs input overrides this field.",
            "default": "search"
          },
          "omitFields": {
            "title": "Fields to remove",
            "type": "array",
            "description": "Remove these top-level fields from every row (for example: raw_text, card, embed_card). Leave empty to keep all fields.",
            "items": {
              "type": "string"
            }
          },
          "onlyVerified": {
            "title": "Verified authors only",
            "type": "boolean",
            "description": "Search, profile and profile search modes: only posts whose author has a verified account.",
            "default": false
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search mode: keywords or hashtags, or the full X advanced-search language typed exactly as on X (from:, filter:, since:, until:, within_time:, min_faves:, lang:, list:{id} as the whole query, quote searches, and more). The structured fields below (From users, dates, language, Media only, Minimum likes) are merged into the search for you. Profile search mode: a plain keyword or phrase - the actor pulls the account's posts (including replies) page by page and keeps only the posts whose text contains it; leave it empty to return the account's posts unfiltered."
          },
          "startUrls": {
            "title": "Start URLs (auto-detect)",
            "type": "array",
            "description": "Universal input: paste post URLs, profile URLs, list URLs, search URLs, bare post IDs or bare handles — each entry is detected and fetched with the matching mode, in order. When set, this replaces the Mode field. Count, Max pages, filters and shaping options apply to every entry.",
            "items": {
              "type": "string"
            }
          },
          "statusId": {
            "title": "Post ID",
            "type": "string",
            "description": "Single post, quotes and conversation modes: the numeric post ID (the digits in x.com/.../status/{id})."
          },
          "statusIds": {
            "title": "Post IDs (bulk)",
            "type": "array",
            "description": "Single post mode: several post IDs at once. One row per found post, in the order given; missing posts are skipped. When set, this replaces the single Post ID field.",
            "items": {
              "type": "string"
            }
          },
          "agentContext": {
            "title": "AI agent context (agentContext)",
            "type": "boolean",
            "description": "Add an agentContext object to every delivered row: the post text (or profile headline + bio) as clean text ready to paste into an LLM prompt, a source block (type, URL, title), a ready-to-paste citation with author and date, an estimated token count and the retrieval time. Modelled on the response style AI-agent APIs use. Off by default; never changes charges.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}