{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Keyword Monitor for Business",
    "description": "Monitor public Facebook posts for your keywords on a schedule. Only new posts, no duplicates across keywords, no Facebook account needed. Unofficial.",
    "version": "0.1",
    "x-build-id": "PZaLYVrdtfCPKrUas"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stratasignalsystems~facebook-keyword-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stratasignalsystems-facebook-keyword-monitor",
        "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/stratasignalsystems~facebook-keyword-monitor/runs": {
      "post": {
        "operationId": "runs-sync-stratasignalsystems-facebook-keyword-monitor",
        "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/stratasignalsystems~facebook-keyword-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-stratasignalsystems-facebook-keyword-monitor",
        "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": {
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "One search phrase. Use Keywords for several."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search phrases, one per line. A single run handles many keywords in parallel, which is much cheaper than one run per keyword.",
            "items": {
              "type": "string"
            }
          },
          "only_new": {
            "title": "Only posts I haven't received",
            "type": "boolean",
            "description": "Remembers delivered posts for each keyword between your runs, so scheduled runs return, and charge for, only what is new.",
            "default": false
          },
          "monitor_name": {
            "title": "Monitor name",
            "type": "string",
            "description": "With only new posts on, separate monitors keep separate memory. Leave empty if you run just one."
          },
          "results_limit": {
            "title": "Posts per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum distinct posts kept per keyword. A page holds about 10.",
            "default": 25
          },
          "since": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Only keep posts newer than this: 30m, 6h, 1d or 1w. Leave empty for no age cutoff (results are then relevance-ranked and can be months old).",
            "default": "1d"
          },
          "filter_by_recent_posts": {
            "title": "Use Facebook's recent-posts filter",
            "type": "boolean",
            "description": "Ask Facebook for recent posts. Combined with the age cutoff this gives the freshest results.",
            "default": true
          },
          "rewrite_blocked_phrases": {
            "title": "Reword blocked phrases",
            "type": "boolean",
            "description": "Facebook returns nothing for some exact phrases, such as 'plane crash' or 'bomb threat'. When on, those are searched as reworded variants ('aircraft crash', 'threat bomb') that still return matching posts.",
            "default": true
          },
          "max_pages": {
            "title": "Max pages per keyword",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Upper bound on requests per keyword (per rewrite variant).",
            "default": 4
          },
          "concurrency": {
            "title": "Concurrent keywords",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Keywords searched at the same time.",
            "default": 8
          },
          "sessions": {
            "title": "Anonymous sessions",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Separate anonymous browsing sessions. Raise only if you see errors at high concurrency.",
            "default": 1
          },
          "min_wait_time_in_sec": {
            "title": "Min wait between pages (s)",
            "minimum": 0,
            "type": "integer",
            "description": "Random pause between pages of one keyword, lower bound.",
            "default": 0
          },
          "max_wait_time_in_sec": {
            "title": "Max wait between pages (s)",
            "minimum": 0,
            "type": "integer",
            "description": "Random pause between pages of one keyword, upper bound.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Fallback proxy",
            "type": "object",
            "description": "Used only when Facebook rate limits a run's direct connection, for the keywords still left. Runs that are not limited send nothing through it. Datacenter proxies only; residential is not used.",
            "default": {
              "useApifyProxy": true
            }
          },
          "active_until": {
            "title": "Active until (UTC)",
            "type": "string",
            "description": "Optional ISO timestamp (UTC), such as 2026-12-31T00:00:00Z. Runs started after it exit immediately without searching, so a schedule can't keep spending after an end date."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}