{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Search Scraper - Posts, People, Pages, Groups",
    "description": "Search Facebook without login: recent posts by keyword, people by name in a city, pages, places, posts of public groups, who a profile follows, pages of a city with their latest posts, groups by keyword and group members. From $1 per 1,000 results.",
    "version": "1.0",
    "x-build-id": "7iBjChfRLhdvDfqrm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pomlabs~facebook-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pomlabs-facebook-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/pomlabs~facebook-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pomlabs-facebook-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/pomlabs~facebook-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pomlabs-facebook-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",
        "properties": {
          "mode": {
            "title": "What to search",
            "enum": [
              "posts",
              "top",
              "people",
              "pages",
              "places",
              "events",
              "videos",
              "group_posts",
              "post_urls",
              "following",
              "city_pages",
              "groups",
              "members"
            ],
            "type": "string",
            "description": "What to search. Empty: posts, or group_posts when you give group links or groupIds, post_urls for post links. Also accepted: searchType (top, latest, posts, people, profiles, pages, places, events, videos, reels)."
          },
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "One per line: keywords (posts, people, pages, places, groups), a city name (city_pages), a group link or id (group_posts, members) or a profile link, username or id (following). Up to 20. Also accepted as query, searchQuery, searchQueries, searchTerms, categories, startUrls, groupIds or postUrls.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many results for each query. Facebook ends a keyword search near 100 posts. Also resultsCount, resultsLimit, maxItems, maxItemsPerQuery.",
            "default": 20
          },
          "recentPosts": {
            "title": "Most recent posts first",
            "type": "boolean",
            "description": "For posts: newest first (Facebook's 'Recent posts' filter). Off: Facebook's top posts.",
            "default": true
          },
          "startDate": {
            "title": "Posted after",
            "type": "string",
            "description": "For posts, group_posts and city_pages: only posts after this date. 2026-11-01, 2026-11-01T10:00:00Z, or relative: 7 days, 2 weeks, 1 month."
          },
          "endDate": {
            "title": "Posted before",
            "type": "string",
            "description": "For posts, group_posts and city_pages: only posts before this date (same formats)."
          },
          "city": {
            "title": "City (people)",
            "type": "string",
            "description": "For people: only profiles that live in this city. Any of the 5,570 Brazilian cities by name (Campinas, or Campinas, SP when the name repeats in other states), or the Facebook city id of any city in the world (the number in facebook.com/pages/<City>/<id>, e.g. 105534776146145 for Nova Iguaçu)."
          },
          "postsPerPage": {
            "title": "Posts per page (city_pages)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "For city_pages: latest posts of each place or page found (1 to 20).",
            "default": 3
          },
          "location": {
            "title": "Location (posts)",
            "type": "string",
            "description": "Posts search: only posts pinned to this place (a Brazilian city name or a Facebook place id). People: same as city."
          },
          "onlyReels": {
            "title": "Only reels (videos)",
            "type": "boolean",
            "description": "Videos mode: keep only reels.",
            "default": false
          },
          "includeComments": {
            "title": "All comments",
            "type": "boolean",
            "description": "Every first-level comment of each post (charged per comment).",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Default 100."
          },
          "commentsSortOrder": {
            "title": "Comments order",
            "enum": [
              "ranked",
              "oldest",
              "relevant",
              "newest"
            ],
            "type": "string",
            "description": "ranked = Facebook's order; oldest = oldest first; relevant = Facebook's shortlist; newest = newest first.",
            "default": "ranked"
          },
          "includeReplies": {
            "title": "Replies to comments",
            "type": "boolean",
            "description": "The replies under each comment and the replies to those (needs All comments).",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Default 20."
          },
          "minCommentReactions": {
            "title": "Min reactions per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Only comments with at least this many reactions."
          },
          "onlyCommentsNewerThan": {
            "title": "Comments newer than",
            "type": "string",
            "description": "2026-11-01 or 7 days."
          },
          "commentKeywords": {
            "title": "Comment keywords",
            "type": "array",
            "description": "Only comments with one of these words (whole words, case and accents ignored).",
            "items": {
              "type": "string"
            }
          },
          "includeGroupDetails": {
            "title": "Group details",
            "type": "boolean",
            "description": "The group's About page once per group: exact members, posts per day and month, creation date, privacy, description, rules, admins, history (charged per group).",
            "default": false
          },
          "extractContacts": {
            "title": "Contacts found in posts",
            "type": "boolean",
            "description": "E-mails and phones in the text and in the WhatsApp button (charged per post with a contact).",
            "default": false
          },
          "onlyWithContact": {
            "title": "Only posts with a contact",
            "type": "boolean",
            "description": "Keep only posts where an e-mail or phone was found.",
            "default": false
          },
          "aiLabels": {
            "title": "AI labels",
            "type": "array",
            "description": "Short sentences that finish 'The author ...' (e.g. offers something for sale). Each post gets the labels that apply, with a score (charged per label judged).",
            "items": {
              "type": "string"
            }
          },
          "onlyAiLabelMatches": {
            "title": "Only posts matching an AI label",
            "type": "boolean",
            "description": "Keep only posts where one of your AI labels applies.",
            "default": false
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep posts whose text has one of these words (whole words, case and accents ignored).",
            "items": {
              "type": "string"
            }
          },
          "keywordsMode": {
            "title": "Keywords match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any = at least one; all = every keyword.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop posts with these words.",
            "items": {
              "type": "string"
            }
          },
          "excludeAuthors": {
            "title": "Exclude authors",
            "type": "array",
            "description": "Profile ids or links whose posts are dropped.",
            "items": {
              "type": "string"
            }
          },
          "onlyAuthors": {
            "title": "Only these authors",
            "type": "array",
            "description": "Profile ids or links: keep only their posts.",
            "items": {
              "type": "string"
            }
          },
          "authorNameContains": {
            "title": "Author name contains",
            "type": "array",
            "description": "Keep posts whose author name has one of these texts.",
            "items": {
              "type": "string"
            }
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Only posts of these kinds. Empty: all.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "photo",
                "album",
                "video",
                "link",
                "shared",
                "event",
                "other"
              ]
            }
          },
          "minReactions": {
            "title": "Min reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many reactions."
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many comments."
          },
          "minShares": {
            "title": "Min shares",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many shares."
          },
          "minEngagementScore": {
            "title": "Min engagement score",
            "minimum": 0,
            "type": "integer",
            "description": "reactions + 2 x comments + 3 x shares."
          },
          "onlyWithMedia": {
            "title": "Only posts with a photo or video",
            "type": "boolean",
            "description": "Keep only posts with a photo or a video.",
            "default": false
          },
          "skipPostsWithoutText": {
            "title": "Skip posts without text",
            "type": "boolean",
            "description": "Drop posts that have no text.",
            "default": false
          },
          "onlyQuestions": {
            "title": "Only questions",
            "type": "boolean",
            "description": "Posts Facebook marks as a question.",
            "default": false
          },
          "excludeAiGenerated": {
            "title": "Skip AI-generated posts",
            "type": "boolean",
            "description": "Posts with Facebook's own AI label.",
            "default": false
          },
          "excludeAnonymous": {
            "title": "Skip anonymous posts",
            "type": "boolean",
            "description": "Drop posts by anonymous group members.",
            "default": false
          },
          "skipDuplicatePosts": {
            "title": "Skip duplicate posts",
            "type": "boolean",
            "description": "The same text posted again.",
            "default": false
          },
          "duplicateScope": {
            "title": "Duplicates: same text by",
            "enum": [
              "sameAuthor",
              "anyAuthor"
            ],
            "type": "string",
            "description": "sameAuthor: the same text by the same author; anyAuthor: the same text by anyone.",
            "default": "sameAuthor"
          },
          "onlyListings": {
            "title": "Only buy-and-sell listings",
            "type": "boolean",
            "description": "Posts that are an item for sale, with price, sold flag, seller and location text.",
            "default": false
          },
          "listingStatus": {
            "title": "Listing status",
            "enum": [
              "any",
              "available",
              "sold"
            ],
            "type": "string",
            "description": "Listings: any, only available or only sold.",
            "default": "any"
          },
          "minPrice": {
            "title": "Min price",
            "type": "number",
            "description": "Items for sale priced at least this (listing currency)."
          },
          "maxPrice": {
            "title": "Max price",
            "type": "number",
            "description": "Items for sale priced at most this (0 keeps free items)."
          },
          "onlyNew": {
            "title": "Only new posts (monitor)",
            "type": "boolean",
            "description": "Only posts never delivered to you under this memory key; schedule the run.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "type": "string",
            "description": "Separate monitors."
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget what this memory key already delivered and start again.",
            "default": false
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 0,
            "type": "integer",
            "description": "Only makes reading slower than our own pace."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}