{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Search Scraper",
    "description": "Search public Facebook posts by keyword, phrase, hashtag or search URL. Get text, authors, dates, engagement, media and available Page details. Use filters, add public comments, and track posts across repeat runs.",
    "version": "0.0",
    "x-build-id": "zLa9Sm1V0X6GNPf0g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~facebook-posts-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-facebook-posts-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/maximedupre~facebook-posts-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-facebook-posts-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/maximedupre~facebook-posts-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-facebook-posts-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": [
          "searchMethod"
        ],
        "properties": {
          "maxPosts": {
            "title": "Maximum posts",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many saved posts across the whole run, or earlier if no more matches are available. Leave empty or use 0 for all available matches."
          },
          "searchMethod": {
            "title": "Find posts by",
            "enum": [
              "keywords",
              "searchUrl"
            ],
            "type": "string",
            "description": "Search with a list of keywords, phrases or hashtags, or use a Facebook post-search URL."
          },
          "keywords": {
            "title": "Keywords, phrases or hashtags",
            "minItems": 1,
            "type": "array",
            "description": "For Keywords, add one search per entry, such as gardening, community garden or #gardening. Keep a whole phrase in one entry. Add at least one entry. All entries use the same filters.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "searchUrl": {
            "title": "Facebook post-search URL",
            "pattern": "^https://(www\\.|m\\.)?facebook\\.com/search/posts/?\\?[^#]+$",
            "type": "string",
            "description": "For Search URL, paste a full Facebook post-search URL with a query, such as https://www.facebook.com/search/posts/?q=gardening. Filters in the URL are kept as supplied. Post content and Where posts appear add filters to the returned posts. URL filters can return no matches."
          },
          "sortOrder": {
            "title": "Search results",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Choose top results or recent posts. Recent posts may not be in time order. If empty, keep the Search URL choice, or use Top results for Keywords. If the URL selects recent posts, leave this empty or choose Recent posts; Top results stops the run."
          },
          "contentType": {
            "title": "Post content",
            "enum": [
              "all",
              "video",
              "photo",
              "link",
              "text"
            ],
            "type": "string",
            "description": "Keep only the chosen kind of post, based on its content and attachments. This filter checks posts returned by either search method. Leave empty or choose All content types to add no content filter. Filters in a Search URL stay in use."
          },
          "publicationContext": {
            "title": "Where posts appear",
            "enum": [
              "all",
              "groups",
              "pagesAndProfiles",
              "businessPages"
            ],
            "type": "string",
            "description": "Keep posts from public groups, Pages and profiles, or business Pages, based on where the post appears and Facebook's publisher information. This filter checks posts returned by either search method. Leave empty or choose All public posts to add no such filter. Filters in a Search URL stay in use."
          },
          "location": {
            "title": "Place",
            "type": "string",
            "description": "Enter a numeric Facebook place ID or a city or region name, such as Paris, France. This uses Facebook's place links, not a distance from the place. A name that matches more than one place stops the run. Results include the matched Facebook place. If empty, keep any place filter in the Search URL."
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many reactions. Posts with an unknown reaction count do not pass a positive minimum. Leave empty or use 0 for no reaction filter."
          },
          "matchQuery": {
            "title": "Require query in post text",
            "type": "boolean",
            "description": "Keep a post only when its text contains the whole search query, ignoring letter case. For Keywords, use the entry that found the post. For Search URL, use the query in the URL.",
            "default": false
          },
          "textTerms": {
            "title": "Extra words or phrases",
            "type": "array",
            "description": "Each entry must appear in the post text, author name or shared link title, ignoring letter case. Keep each whole phrase in one entry. Leave empty for no extra text filter.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "startDate": {
            "title": "Published from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|[1-9]\\d* (hours?|days?|weeks?|months?))$",
            "type": "string",
            "description": "Keep posts on or after this date in UTC. Enter YYYY-MM-DD or a time back from the run start, such as 24 hours, 7 days, 2 weeks or 1 month. A calendar date starts at 00:00 UTC. If empty, keep the URL's lower date bound for Search URL, or use no lower bound for Keywords."
          },
          "endDate": {
            "title": "Published through",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|[1-9]\\d* (hours?|days?|weeks?|months?))$",
            "type": "string",
            "description": "Keep posts on or before this date in UTC. Enter YYYY-MM-DD or a time back from the run start, such as 1 hour, 3 days, 1 week or 1 month. A calendar date includes that whole UTC day. If empty, keep the URL's upper date bound for Search URL, or use no upper bound for Keywords. This bound must not be before Published from."
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Add public comments Facebook highlights to each saved post, with available authors, dates, reaction counts and reply counts. Each saved comment has a separate charge. When off, no comments are collected, whatever the comment limit.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "When Include comments is on, collect up to this many comments per saved post, where available. Leave empty to use 10. Use 0 for all available comments. This limit does not change Maximum posts.",
            "default": 10
          },
          "monitorName": {
            "title": "Monitor name",
            "minLength": 1,
            "type": "string",
            "description": "Name the saved history for one search. Use the same name for repeat runs of that search. If empty, the Actor uses a name based on the search and its filters. Each monitor returns only posts it has not returned before. These posts can have older dates. Use a different name for a different search."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}