{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Post Search — Page & Group Keyword Monitor",
    "description": "Monitor the public Facebook pages, profiles and groups you choose for keywords and get only posts whose text or author matches your terms. Each post has author, timestamp, engagement counts, media and matched terms, with no login or cookies.",
    "version": "1.2",
    "x-build-id": "ze2jXiFnnRJ3bolWZ"
  },
  "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 look for in each post (e.g. [\"hiring\", \"product launch\"]). A post is returned when it matches per the Match mode below. Matching is case-insensitive on post text by default. This searches the pages, profiles and groups you list; it is not a Facebook-wide search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Source URLs to search within",
            "maxItems": 10,
            "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": 60,
            "type": "integer",
            "description": "How many recent posts to read per source while looking for matches. Higher values find more matches for rare keywords but read more posts and take longer. Defaults to 30 (up to 60). Reading stops early once your total matches limit is met.",
            "default": 30
          },
          "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."
          },
          "monitorMode": {
            "title": "Monitor mode (only new posts)",
            "type": "boolean",
            "description": "When on, the Actor remembers the matching posts it already returned for this exact set of sources and terms and only returns posts it has not returned before. Schedule it hourly or daily for alerts.",
            "default": false
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Only return posts with at least this many reactions. 0 means no minimum.",
            "default": 0
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Only return these kinds of posts. Leave empty for all kinds.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "photo",
                "video",
                "link"
              ],
              "enumTitles": [
                "Text only",
                "Photo",
                "Video",
                "Shared link"
              ]
            }
          },
          "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}