{
  "openapi": "3.0.1",
  "info": {
    "title": "BluePages Saudi Directory Scraper: Phones, Emails & WhatsApp",
    "description": "Collect Saudi company profiles from BluePages: name, activity, city and region with ISO code, address, published phones, emails, websites, WhatsApp, map and social links. Schedule daily runs to get only new or changed profiles. Contacts are as published, unverified. $1.50 per 1,000 profiles.",
    "version": "0.1",
    "x-build-id": "AvPWYj6CONzZIWL8T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~bluepages-saudi-directory/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-bluepages-saudi-directory",
        "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/automatic~bluepages-saudi-directory/runs": {
      "post": {
        "operationId": "runs-sync-automatic-bluepages-saudi-directory",
        "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/automatic~bluepages-saudi-directory/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-bluepages-saudi-directory",
        "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": "Collect by",
            "enum": [
              "sitemap",
              "profiles"
            ],
            "type": "string",
            "description": "Directory scan collects published BluePages profiles for a city and activity filter. Profile URLs collects only the company profiles you list.",
            "default": "sitemap"
          },
          "profileUrls": {
            "title": "Company profile URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Required when collecting listed profiles. Exact https bluepages.com.sa company profile URLs only; no category, search, account or API URLs. Known cities: Riyadh, Jeddah, Abha, Makkah and Madinah, in Arabic or the site's English address form.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keyword": {
            "title": "Name contains",
            "maxLength": 200,
            "type": "string",
            "description": "Case- and diacritic-insensitive substring of the published business name. This narrows the profiles being collected; it is not the directory's full name search, and English text does not translate Arabic names.",
            "default": ""
          },
          "city": {
            "title": "City",
            "maxLength": 200,
            "type": "string",
            "description": "City name used by the directory, for example الرياض, Riyadh, Jeddah or Abha. Recognises Riyadh, Jeddah, Abha, Makkah and Madinah. Leave empty for all of them.",
            "default": ""
          },
          "activity": {
            "title": "Activity contains",
            "maxLength": 200,
            "type": "string",
            "description": "Substring of the published activity text, for example كابلات or مقاولون. Matching is on the source's own wording, so Arabic and English activity names are not translated.",
            "default": ""
          },
          "maxItems": {
            "title": "Maximum profiles in the dataset",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard limit on output profiles; 10 in the quick start, 25 by default, 100 at most. The run's charge limit can reduce it.",
            "default": 25
          },
          "maxProfiles": {
            "title": "Maximum profiles to examine",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard budget on profiles examined per run, including names that do not match the keyword. Reaching it is reported as partial coverage.",
            "default": 100
          },
          "maxSeconds": {
            "title": "Run time budget (seconds)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Includes pauses, redirects and page reads. If you raise it above 300, also raise the run timeout in the Apify Console.",
            "default": 180
          },
          "onlyNewSinceLastRun": {
            "title": "Only new or changed profiles",
            "type": "boolean",
            "description": "Return only profiles not delivered before, or whose published details changed. Unchanged profiles do not use the output limit, so a scheduled daily run continues through the directory instead of returning the same first profiles. The first run with a filter set returns everything it examines.",
            "default": false
          },
          "stateKey": {
            "title": "Saved state name (optional)",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the saved list of already-delivered profiles for this filter set. Leave empty to derive it from the scan settings. Set the same name to continue a feed after changing maxItems or maxProfiles.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}