{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Pages & Business Leads Scraper",
    "description": "Find public Facebook Pages by keyword and location, or scrape Page URLs you already have. One lead-ready row per Page: category, description, followers, likes, address, website, public email and phone, social links and price range. Optional website enrichment. No Facebook login or cookies needed.",
    "version": "1.0",
    "x-build-id": "ZMO9pVnOuquO4l8Xn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~facebook-pages-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-facebook-pages-leads-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/coregent~facebook-pages-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-facebook-pages-leads-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/coregent~facebook-pages-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-facebook-pages-leads-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": {
          "startUrls": {
            "title": "Facebook Page URLs or handles",
            "type": "array",
            "description": "Public Facebook Page URLs, @handles, or numeric Page IDs — one per line. Accepts every common form: https://www.facebook.com/burgerking, facebook.com/burgerking/about, m.facebook.com/burgerking, @burgerking, or a bare handle. Personal profiles, groups, posts and events are not Pages and are reported as invalid rather than scraped. Leave empty if you only want to discover Pages by keyword.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Business, category or niche keywords to discover Pages with — for example 'plumber' or 'vegan bakery'. Each keyword is combined with each location below, and results are shared fairly between them so one broad keyword cannot use up the whole result limit. Leave empty if you only want the Pages you listed above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Optional city, region or country context for the search queries — for example 'Sydney NSW'. Each query is combined with each location. Ignored when no search query is given: locations on their own are not a source of Pages.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results (whole run)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of unique Pages this run returns IN TOTAL — your direct Page URLs and every search combined, not per keyword and not search-only. The run stops as soon as this many unique Pages have been emitted. For a per-keyword cap, use \"Max results per search query\" under Advanced.",
            "default": 100
          },
          "includeWebsiteEnrichment": {
            "title": "Enrich business websites",
            "type": "boolean",
            "description": "For each Page that publishes a website, fetch that site's home page and a contact/about page to pull out the final resolved URL, page title and meta description, any extra emails and phone numbers published there, and social links. Charged as a separate 'website-enrichment' event, once per unique domain — two Pages sharing a domain are charged once. Adds runtime. Off by default.",
            "default": false
          },
          "includeUnavailableRows": {
            "title": "Include unavailable Pages as empty rows",
            "type": "boolean",
            "description": "Off by default. When a Page cannot be read — blocked, deleted, or not a business — it is left OUT of your results so your lead list stays clean. What was missed is still reported: the run log and status message give the count and reason, RUN_SUMMARY breaks it down, and RETRY_INPUT gives you the blocked-but-alive ones as an input you can re-run. Switch this on to get those Pages back as empty rows carrying a URL and an unavailableReason. Empty rows are never charged either way.",
            "default": false
          },
          "includeTransparency": {
            "title": "Add Page transparency details",
            "type": "boolean",
            "description": "Fetch each Page's transparency tab to add its creation date, current ad-running status, Ad Library ID and admin-country list. This costs ONE EXTRA REQUEST per Page and is charged as a separate 'page-transparency' event, once per Page actually returned — Pages removed by your filters or that could not be read are never charged. Switched on automatically when the 'currently running ads' filter is used, because that filter cannot be applied without it.",
            "default": false
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only Pages with at least this many followers. Pages whose follower count Facebook does not publish are KEPT, not dropped — an unknown count is not a low count. NOTE: Facebook publishes follower counts only in abbreviated form (\"3.2K\"), so this compares against a rounded number; `metrics.followersApproximate` tells you when that happened. Leave at 0 for no follower filter.",
            "default": 0
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Keep only Pages whose Facebook category matches one of these, case-insensitively — for example 'Plumber' or 'Bagel shop'. Partial matches count, so 'restaurant' keeps 'Italian restaurant'. Leave empty for no category filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "verifiedOnly": {
            "title": "Verified Pages only",
            "type": "boolean",
            "description": "Keep only Pages carrying Facebook's verified badge.",
            "default": false
          },
          "runningAdsOnly": {
            "title": "Only Pages currently running ads",
            "type": "boolean",
            "description": "Keep only Pages that Facebook's Page Transparency section reports as currently running ads. NOTE: this forces 'Add Page transparency details' on, so it costs an extra request per Page and charges the 'page-transparency' event for each Page returned. Pages whose ad status cannot be read are dropped by this filter, because keeping them would silently break the promise the filter makes.",
            "default": false
          },
          "minRecommendPercent": {
            "title": "Minimum recommend percentage",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only Pages recommended by at least this percentage of reviewers. NOTE: Facebook retired 5-star Page ratings in favour of a recommend percentage, so this filters on 'X% recommend', not on stars. Pages with no reviews are KEPT — no reviews is not a bad score. Leave at 0 for no filter.",
            "default": 0
          },
          "minReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only Pages with at least this many reviews. Pages that publish no review count are kept.",
            "default": 0
          },
          "maxResultsPerQuery": {
            "title": "Max results per search query",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on how many Pages any single search query may contribute, so one broad query cannot use up the whole global limit. 0 means no per-query cap — the global 'Max results' still applies.",
            "default": 0
          },
          "skipPageIds": {
            "title": "Skip these Page IDs",
            "type": "array",
            "description": "Numeric Facebook Page IDs to skip — for incremental runs where you already have these Pages. Skipped Pages are never fetched and never charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipUrls": {
            "title": "Skip these Page URLs",
            "type": "array",
            "description": "Page URLs or handles to skip, for incremental runs. Matched after canonicalization, so any URL form works. Skipped Pages are never fetched and never charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Datacenter proxy is used by default and is what this Actor is tuned for. Apify RESIDENTIAL proxy is not supported and is removed from this setting if selected — its bandwidth is billed to the Actor developer rather than to your run, and Facebook Page pages are large. If you need residential routing, supply your own provider through 'Custom proxy URLs'; that traffic goes through your account and is honoured in full.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}