{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Boolean Search Scraper | Posts & Trends",
    "description": "Search public X posts with AND, OR, NOT, exact phrases, hashtags, dates, media, language, engagement, and verified-author filters. Deduplicated results stream to JSON, CSV, Excel, or API.",
    "version": "0.0",
    "x-build-id": "cb3YIJRDDP58qfKcX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraping_solutions~x-twitter-boolean-search-scraper-posts-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraping_solutions-x-twitter-boolean-search-scraper-posts-trends",
        "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/scraping_solutions~x-twitter-boolean-search-scraper-posts-trends/runs": {
      "post": {
        "operationId": "runs-sync-scraping_solutions-x-twitter-boolean-search-scraper-posts-trends",
        "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/scraping_solutions~x-twitter-boolean-search-scraper-posts-trends/run-sync": {
      "post": {
        "operationId": "run-sync-scraping_solutions-x-twitter-boolean-search-scraper-posts-trends",
        "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": [
          "searchQuery",
          "resultsLimit"
        ],
        "properties": {
          "searchQuery": {
            "title": "Keywords, hashtags, or Boolean query",
            "type": "string",
            "description": "Examples: OpenAI; #AI; (OpenAI OR Anthropic) AND agents AND NOT hiring. Quoted phrases stay exact, and terms use complete word boundaries, so IA does not match tia, viaje, or diario. [Validate the query before running](https://flujodato.com/en/boolean-search-validator?platform=x).",
            "default": "(OpenAI OR Anthropic) AND agents AND NOT hiring"
          },
          "resultsLimit": {
            "title": "Maximum matching results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of unique posts saved after all filters. This is a limit, not a guaranteed count, because search feeds can end or repeat posts.",
            "default": 100
          },
          "searchSection": {
            "title": "Result ranking",
            "enum": [
              "latest",
              "top"
            ],
            "type": "string",
            "description": "Latest prioritizes recent posts. Top prioritizes posts ranked as relevant or popular.",
            "default": "latest"
          },
          "searchCoverage": {
            "title": "Search coverage",
            "enum": [
              "efficient",
              "comprehensive"
            ],
            "type": "string",
            "description": "Without an end-date filter, Efficient can scan up to 3x the requested result count and Comprehensive up to 6x. When Only content posted before is set, the page allowance becomes the exploration guardrail: up to 0.5 successful paid pages per requested result in Efficient and 1 page per result in Comprehensive, shared across the full plan. More successful pages can increase cost.",
            "default": "efficient"
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "all",
              "text",
              "media",
              "images",
              "videos"
            ],
            "type": "string",
            "description": "Return all posts or keep only plain text, any media, images, or videos.",
            "default": "all"
          },
          "language": {
            "title": "Post language",
            "enum": [
              "all",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "ar",
              "hi",
              "ja",
              "ko",
              "tr",
              "id"
            ],
            "type": "string",
            "description": "Keep posts in one reported language or search all languages.",
            "default": "all"
          },
          "oldestPostDate": {
            "title": "Only posts published after",
            "type": "string",
            "description": "Optional inclusive start date in YYYY-MM-DD format. This lower boundary is sent to the upstream X search on the initial request.",
            "default": ""
          },
          "newestPostDate": {
            "title": "Only posts published before",
            "type": "string",
            "description": "Optional inclusive end date in YYYY-MM-DD format. This upper boundary is validated locally, so historical searches may require additional paid pages. Use the same date in both fields for one calendar day.",
            "default": ""
          },
          "minimumViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Save only posts with at least this many reported views. Use 0 to disable.",
            "default": 0
          },
          "minimumLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Save only posts with at least this many likes. Use 0 to disable.",
            "default": 0
          },
          "minimumReposts": {
            "title": "Minimum reposts",
            "minimum": 0,
            "type": "integer",
            "description": "Save only posts with at least this many reposts. Use 0 to disable.",
            "default": 0
          },
          "minimumReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "type": "integer",
            "description": "Save only posts with at least this many replies. Use 0 to disable.",
            "default": 0
          },
          "minimumQuotes": {
            "title": "Minimum quotes",
            "minimum": 0,
            "type": "integer",
            "description": "Save only posts with at least this many quote posts. Use 0 to disable.",
            "default": 0
          },
          "minimumBookmarks": {
            "title": "Minimum bookmarks",
            "minimum": 0,
            "type": "integer",
            "description": "Save only posts with at least this many reported bookmarks. Use 0 to disable.",
            "default": 0
          },
          "verifiedAuthorsOnly": {
            "title": "Verified authors only",
            "type": "boolean",
            "description": "Keep only posts whose author is reported as verified.",
            "default": false
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Remove posts that are replies to another post.",
            "default": false
          },
          "excludeReposts": {
            "title": "Exclude reposts",
            "type": "boolean",
            "description": "Remove reposts and keep original or quoted posts.",
            "default": false
          },
          "strictBooleanSyntax": {
            "title": "Require explicit Boolean operators",
            "type": "boolean",
            "description": "Reject adjacent expressions without AND. Leave disabled to insert AND automatically and report a warning.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}