{
  "openapi": "3.0.1",
  "info": {
    "title": "X Keyword Search with Mention & Reply Operators",
    "description": "Search X (Twitter) by keyword with filters for date, language, engagement, media, verification, mentioned handle, author, reply target, and conversation thread, plus Top/Latest sort.",
    "version": "2.0",
    "x-build-id": "I7cduHm9oKbw9FGRa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~x-keyword-search-with-mention-and-reply-operators/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-x-keyword-search-with-mention-and-reply-operators",
        "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/vexaloom-labs~x-keyword-search-with-mention-and-reply-operators/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-x-keyword-search-with-mention-and-reply-operators",
        "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/vexaloom-labs~x-keyword-search-with-mention-and-reply-operators/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-x-keyword-search-with-mention-and-reply-operators",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What do you want to collect?",
            "enum": [
              "search",
              "byAuthor",
              "byUrls",
              "conversation"
            ],
            "type": "string",
            "description": "Search by keyword, collect an author's posts, fetch specific post URLs, or open a conversation thread.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords or phrases",
            "type": "array",
            "description": "Words, phrases or hashtags to search for. Each keyword is collected separately and every row shows the keyword that found it (searchTerm).",
            "items": {
              "type": "string"
            }
          },
          "authorHandles": {
            "title": "Author handles or profile URLs",
            "type": "array",
            "description": "Used by the 'Posts by author' mode. Accepts @handle, handle, or https://x.com/handle profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Used by the 'Specific post URLs' mode. Accepts x.com or twitter.com post links and bare post IDs.",
            "items": {
              "type": "string"
            }
          },
          "conversationId": {
            "title": "Conversation ID or post URL",
            "type": "string",
            "description": "Used by the 'Conversation thread' mode. Paste the root post ID or a post URL in that thread."
          },
          "maxItems": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many posts per keyword or author. The URL and conversation modes use it as a total cap.",
            "default": 20
          },
          "sort": {
            "title": "Result order",
            "enum": [
              "Top",
              "Latest",
              "Top + Latest"
            ],
            "type": "string",
            "description": "Latest is newest first. Top is ordered by likes and reposts. Top + Latest returns the top half by engagement, then the newest remaining posts.",
            "default": "Top"
          },
          "language": {
            "title": "Language",
            "enum": [
              "Any language",
              "en",
              "es",
              "zh",
              "hi",
              "ar",
              "bn",
              "pt",
              "ru",
              "ja",
              "de",
              "fr",
              "ko",
              "tr",
              "vi",
              "te",
              "mr",
              "ta",
              "ur",
              "it",
              "th",
              "gu",
              "fa",
              "pl",
              "uk",
              "ml",
              "kn",
              "id",
              "ms",
              "sw",
              "ha",
              "am",
              "my",
              "pa",
              "nl",
              "ro",
              "el",
              "he",
              "sv",
              "hu",
              "cs"
            ],
            "type": "string",
            "description": "Only keep posts in this language. The default searches every language.",
            "default": "Any language"
          },
          "dateFrom": {
            "title": "Start date",
            "type": "string",
            "description": "Only keep posts published on or after this date (UTC)."
          },
          "dateTo": {
            "title": "End date",
            "type": "string",
            "description": "Only keep posts published on or before this date (UTC)."
          },
          "excludeRetweets": {
            "title": "Exclude reposts",
            "type": "boolean",
            "description": "Drop reposts and keep original posts only.",
            "default": false
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Drop replies and keep top-level posts only.",
            "default": false
          },
          "onlyVerifiedUsers": {
            "title": "Verified accounts only",
            "type": "boolean",
            "description": "Keep posts from verified or blue-check accounts only.",
            "default": false
          },
          "onlyImages": {
            "title": "Posts with images only",
            "type": "boolean",
            "description": "Keep posts that contain at least one photo.",
            "default": false
          },
          "onlyVideos": {
            "title": "Posts with videos only",
            "type": "boolean",
            "description": "Keep posts that contain at least one video or GIF.",
            "default": false
          },
          "onlyQuotes": {
            "title": "Quote posts only",
            "type": "boolean",
            "description": "Keep posts that quote another post.",
            "default": false
          },
          "minimumLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop posts below this like count. Posts whose count is unavailable are dropped and reported in the run summary."
          },
          "minimumRetweets": {
            "title": "Minimum reposts",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop posts below this repost count. Counts are filled from the public fallback source when available."
          },
          "minimumReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Drop posts below this reply count. Posts with no available reply count are dropped and reported."
          },
          "mentioning": {
            "title": "Mentioning handle",
            "type": "string",
            "description": "Only keep posts that mention this handle (with or without @). Applied after collection."
          },
          "author": {
            "title": "Posted by handle",
            "type": "string",
            "description": "Only keep posts written by this handle (with or without @)."
          },
          "inReplyTo": {
            "title": "Replying to handle",
            "type": "string",
            "description": "Only keep posts that are replies to this handle (with or without @)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. No proxy is needed. If supplied, it is used for the best-effort guest search supplement as well as page requests."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}