{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Post Search Scraper",
    "description": "Search public Facebook page, profile, and group posts by keyword. Returns only posts whose text or author matches your terms, with author, timestamp, engagement counts, media, and the matched terms. Cookieless, no login. MCP-ready.",
    "version": "1.1",
    "x-build-id": "zpNXuqizKVKzN6mmn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~facebook-post-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-facebook-post-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/khadinakbar~facebook-post-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-facebook-post-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/khadinakbar~facebook-post-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-facebook-post-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",
        "required": [
          "searchTerms",
          "startUrls"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords or phrases to search for in each post (e.g. [\"hiring\", \"product launch\"]). A post is returned when it matches per the Match mode below. By default matching is case-insensitive substring on post text. NOT a Facebook search-bar query — Facebook's own keyword search is login-only; this searches within the sources you provide.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Source URLs to search within",
            "type": "array",
            "description": "Public Facebook page, profile, or group URLs whose posts will be scanned for your search terms. Direct post URLs are also accepted (each counts as one source). Example: https://www.facebook.com/NASA. Private, deleted, age-gated, or login-only sources return no posts.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "matchMode": {
            "title": "Match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "How multiple search terms combine. 'any' returns a post if it matches at least one term (OR). 'all' returns a post only if it matches every term (AND). Defaults to 'any'.",
            "default": "any"
          },
          "matchFields": {
            "title": "Fields to search",
            "type": "array",
            "description": "Which fields each term is tested against: post text and/or author name. Defaults to post text only. Select both to also match posts by the author/page name.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "author"
              ],
              "enumTitles": [
                "Post text",
                "Author name"
              ]
            },
            "default": [
              "text"
            ]
          },
          "caseSensitive": {
            "title": "Case sensitive",
            "type": "boolean",
            "description": "When enabled, terms must match the exact letter case. Default is case-insensitive (e.g. 'Mars' matches 'mars').",
            "default": false
          },
          "useRegex": {
            "title": "Treat terms as regular expressions",
            "type": "boolean",
            "description": "When enabled, each search term is compiled as a JavaScript regular expression (e.g. 'hir\\w+'). An invalid pattern falls back to a literal substring match. Leave off for plain keyword search.",
            "default": false
          },
          "resultsLimit": {
            "title": "Total matches limit",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of matching posts to return across all sources. This is your primary cost cap; each returned match charges the post-matched event. Defaults to 50.",
            "default": 50
          },
          "maxPostsScannedPerSource": {
            "title": "Max posts scanned per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many recent posts to scan per source while looking for matches. Higher values find more matches for rare keywords but scan more posts and take longer. Defaults to 60. This bounds how deep the search reads each page/group; it is not the number of results returned.",
            "default": 60
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Optional date filter. Accepts ISO dates such as 2026-01-01 or natural date strings. Posts with no parseable date are kept rather than silently dropped."
          },
          "onlyPostsOlderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Optional upper date filter. Accepts ISO dates such as 2026-06-01 or natural date strings. Posts with no parseable date are kept rather than silently dropped."
          },
          "fallbackProvider": {
            "title": "Data provider",
            "enum": [
              "auto",
              "scrapeCreators",
              "sociaVault"
            ],
            "type": "string",
            "description": "Which managed data provider supplies the posts. 'auto' uses ScrapeCreators first and SociaVault second (recommended). Provider keys are configured by the actor owner; you do not supply them.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Posts are fetched through managed providers, so proxy is optional; defaults to Apify Proxy.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}