{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Advanced Search Scraper — Full Operators",
    "description": "Scrape X (Twitter) advanced search: keywords, exact phrases, from/to users, dates, min likes/retweets, language and more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.",
    "version": "1.0",
    "x-build-id": "sPZBaTrvR8faGKXg2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/korado_labs~x-advanced-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-korado_labs-x-advanced-search-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/korado_labs~x-advanced-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-korado_labs-x-advanced-search-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/korado_labs~x-advanced-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-korado_labs-x-advanced-search-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": {
          "query": {
            "title": "🔍 Search query",
            "type": "string",
            "description": "A search query. Accepts plain words and native X operators (from:, min_faves:, filter:images, since:, until:, #tag, \"exact phrase\", -exclude). Leave empty and use the filters below to build one automatically."
          },
          "search_type": {
            "title": "⚙️ Search type",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "Latest = newest first; Top = most relevant/engaged.",
            "default": "Latest"
          },
          "numberOfTweets": {
            "title": "Number of tweets",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum tweets to return.",
            "default": 100
          },
          "scrapeAll": {
            "title": "Scrape all matching tweets",
            "type": "boolean",
            "description": "Page through everything the query returns (ignores the number cap).",
            "default": false
          },
          "contentKeywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Words that must appear.",
            "items": {
              "type": "string"
            }
          },
          "contentExactPhrases": {
            "title": "Exact phrases",
            "type": "array",
            "description": "Exact phrases (quoted).",
            "items": {
              "type": "string"
            }
          },
          "contentExcludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Words that must NOT appear.",
            "items": {
              "type": "string"
            }
          },
          "contentHashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags (with or without #).",
            "items": {
              "type": "string"
            }
          },
          "contentExcludeHashtags": {
            "title": "Exclude hashtags",
            "type": "array",
            "description": "Hashtags to exclude.",
            "items": {
              "type": "string"
            }
          },
          "contentCashtags": {
            "title": "Cashtags",
            "type": "array",
            "description": "Cashtags like TSLA (with or without $).",
            "items": {
              "type": "string"
            }
          },
          "contentLanguage": {
            "title": "Language",
            "type": "string",
            "description": "ISO language code, e.g. en, es, ja."
          },
          "usersFromUsers": {
            "title": "From users",
            "type": "array",
            "description": "Only tweets from these accounts.",
            "items": {
              "type": "string"
            }
          },
          "usersToUsers": {
            "title": "To users",
            "type": "array",
            "description": "Only replies to these accounts.",
            "items": {
              "type": "string"
            }
          },
          "usersMentionUsers": {
            "title": "Mentioning users",
            "type": "array",
            "description": "Tweets mentioning these accounts.",
            "items": {
              "type": "string"
            }
          },
          "usersExcludeFromUsers": {
            "title": "Exclude from users",
            "type": "array",
            "description": "Exclude tweets from these accounts.",
            "items": {
              "type": "string"
            }
          },
          "usersListMembers": {
            "title": "From list members",
            "type": "array",
            "description": "Tweets from members of these list ids.",
            "items": {
              "type": "string"
            }
          },
          "usersBlueVerifiedOnly": {
            "title": "Blue verified only",
            "type": "boolean",
            "description": "Only Blue-verified authors."
          },
          "usersVerifiedOnly": {
            "title": "Verified only",
            "type": "boolean",
            "description": "Only verified authors."
          },
          "engagementLevel": {
            "title": "Engagement preset",
            "enum": [
              "none",
              "low",
              "medium",
              "high",
              "viral"
            ],
            "type": "string",
            "description": "Quick minimum-likes floor: low=10, medium=100, high=1000, viral=10000.",
            "default": "none"
          },
          "engagementMinLikes": {
            "title": "Min likes",
            "type": "integer",
            "description": "Minimum likes."
          },
          "engagementMaxLikes": {
            "title": "Max likes",
            "type": "integer",
            "description": "Maximum likes."
          },
          "engagementMinRetweets": {
            "title": "Min retweets",
            "type": "integer",
            "description": "Minimum retweets."
          },
          "engagementMaxRetweets": {
            "title": "Max retweets",
            "type": "integer",
            "description": "Maximum retweets."
          },
          "engagementMinReplies": {
            "title": "Min replies",
            "type": "integer",
            "description": "Minimum replies."
          },
          "engagementMaxReplies": {
            "title": "Max replies",
            "type": "integer",
            "description": "Maximum replies."
          },
          "engagementHasEngagement": {
            "title": "Must have engagement",
            "type": "boolean",
            "description": "At least one like, retweet or reply."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "e.g. images, videos, media.",
            "items": {
              "type": "string"
            }
          },
          "mediaHasLinks": {
            "title": "Has links",
            "type": "boolean",
            "description": "Tweets containing links."
          },
          "mediaHasMentions": {
            "title": "Has mentions",
            "type": "boolean",
            "description": "Tweets that mention someone."
          },
          "mediaHasHashtags": {
            "title": "Has hashtags",
            "type": "boolean",
            "description": "Tweets that contain hashtags."
          },
          "mediaNewsOnly": {
            "title": "News only",
            "type": "boolean",
            "description": "Only tweets linking news."
          },
          "mediaSafeContentOnly": {
            "title": "Safe content only",
            "type": "boolean",
            "description": "Exclude sensitive content."
          },
          "tweetTypes": {
            "title": "Include tweet types",
            "type": "array",
            "description": "e.g. replies, retweets, quotes.",
            "items": {
              "type": "string"
            }
          },
          "tweetTypesExclude": {
            "title": "Exclude tweet types",
            "type": "array",
            "description": "e.g. replies, retweets.",
            "items": {
              "type": "string"
            }
          },
          "tweetConversationId": {
            "title": "Conversation ID",
            "type": "string",
            "description": "Tweets within one conversation thread."
          },
          "tweetQuotedTweetId": {
            "title": "Quoted tweet ID",
            "type": "string",
            "description": "Tweets quoting a specific tweet."
          },
          "since": {
            "title": "Since date",
            "type": "string",
            "description": "YYYY-MM-DD lower bound."
          },
          "until": {
            "title": "Until date",
            "type": "string",
            "description": "YYYY-MM-DD upper bound."
          },
          "apiKey": {
            "title": "Provider API key (optional)",
            "type": "string",
            "description": "Optional: your own TwitterAPI/GetXAPI key. If omitted, the actor uses its built-in provider account."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}