{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Page Search: Businesses by Keyword",
    "description": "Facebook page search by keyword and city: find businesses on Facebook and get each page's emails, phones, website, address, rating, hours, followers and category. No login, no cookies.",
    "version": "0.2",
    "x-build-id": "d02YTzLmGS3R5Cmoc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~facebook-page-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-facebook-page-search",
        "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/deepmine~facebook-page-search/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-facebook-page-search",
        "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/deepmine~facebook-page-search/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-facebook-page-search",
        "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": {
          "keywords": {
            "title": "🔎 Keywords",
            "type": "array",
            "description": "What the businesses are: <code>hair salon</code>, <code>dentist</code>, <code>yoga studio</code>, <code>real estate agent</code>. Each keyword is searched once per location. Provide keywords, direct Facebook pages, or both.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Facebook pages to enrich directly",
            "type": "array",
            "description": "Facebook page URLs, usernames or numeric page IDs. These pages use the same lead filters and deduplication as search results. Direct pages do not use keyword or location matching.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "Cities, regions or countries: <code>Chicago</code>, <code>Austin TX</code>, <code>London</code>. Empty: the keywords alone.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "🔢 Maximum pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Pages to return for each keyword and location pair. Use 0 or omit this field from API input to return all available matching pages.",
            "default": 50
          },
          "onlyWithEmail": {
            "title": "✉️ Only pages with an email",
            "type": "boolean",
            "description": "Return only pages that list an email address. Pages without one are skipped and not charged.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only pages with a phone number",
            "type": "boolean",
            "description": "Skip pages that do not list a phone number.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only pages with a website",
            "type": "boolean",
            "description": "Skip pages that do not list a website. Cannot be combined with Only pages without a website.",
            "default": false
          },
          "withoutWebsiteOnly": {
            "title": "Only pages without a website",
            "type": "boolean",
            "description": "Find businesses whose Facebook page does not list a website. Pages with unreadable contact information are skipped.",
            "default": false
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep pages with at least this many followers. Pages with an unknown count are skipped."
          },
          "maxFollowers": {
            "title": "Maximum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep pages with at most this many followers. Pages with an unknown count are skipped."
          },
          "verifiedOnly": {
            "title": "Only verified pages",
            "type": "boolean",
            "description": "Keep pages with a Facebook verification badge.",
            "default": false
          },
          "adsStatus": {
            "title": "Facebook ads status",
            "enum": [
              "any",
              "running",
              "notRunning"
            ],
            "type": "string",
            "description": "When filtering by ads status, skip pages whose status is unknown.",
            "default": "any"
          },
          "minRatingPercent": {
            "title": "Minimum rating percent",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep pages at or above this rating. Star ratings are converted from a scale of five. Unrated pages are skipped."
          },
          "excludePageIds": {
            "title": "Facebook pages to exclude",
            "type": "array",
            "description": "Page IDs, usernames or page URLs to skip. A matching link is skipped before reading; other aliases are matched when the page ID or username is known.",
            "items": {
              "type": "string"
            }
          },
          "onlyNewPages": {
            "title": "Only new pages across runs",
            "type": "boolean",
            "description": "Track saved pages in a named store and skip them on later runs using the same store. The first run establishes the baseline.",
            "default": false
          },
          "monitoringStore": {
            "title": "Monitoring store name",
            "type": "string",
            "description": "With Only new pages enabled, give each independent monitor a different store name. Run each monitor one at a time.",
            "default": "facebook-page-search-monitor"
          },
          "countryCode": {
            "title": "Google country",
            "type": "string",
            "description": "Two-letter country of the Google search that finds the pages (gl), e.g. us, gb, de.",
            "default": "us"
          },
          "languageCode": {
            "title": "Google language",
            "type": "string",
            "description": "Two-letter language of the Google search (hl), e.g. en, de, fr.",
            "default": "en"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy datacenter IPs by default: they find each page and read its header. Google is always searched on Apify datacenter IPs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Use residential IPs where Facebook needs them",
            "type": "boolean",
            "description": "On: pages are read on datacenter IPs first, and residential IPs are used only where Facebook refuses every datacenter IP. Off: datacenter only (Facebook may refuse a few more pages).",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}