{
  "openapi": "3.0.1",
  "info": {
    "title": "BUSINESS.bg scraper: Bulgarian company leads, фирмени контакти",
    "description": "Scrape public BUSINESS.bg listings across Bulgaria into business records and бизнес каталог data with phones, emails when listed, websites, addresses, ratings, source URLs, and change tracking. Export JSON or CSV to Google Sheets, Airtable, HubSpot, Salesforce, n8n, or Zapier. $0.00088 per record.",
    "version": "0.1",
    "x-build-id": "eNfFhtnkxAzWPWuG9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~business-bg-company-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-business-bg-company-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/getascraper~business-bg-company-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-business-bg-company-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/getascraper~business-bg-company-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-business-bg-company-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": "BUSINESS.bg category or search URLs",
            "maxItems": 10,
            "type": "array",
            "description": "Public BUSINESS.bg URLs only. Supported paths are category pages, public profile pages, and the site's public search URL.",
            "default": [
              {
                "url": "https://www.business.bg/en/o-360/restaurants-bars.html"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "maxItems": 20,
            "type": "array",
            "description": "Bulgarian or English business terms. Each term uses BUSINESS.bg's public search and can be combined with category URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "languageMode": {
            "title": "Language coverage",
            "enum": [
              "both",
              "english",
              "bulgarian"
            ],
            "type": "string",
            "description": "Keep Bulgarian rows, English rows, or both when a public profile is available in both languages.",
            "default": "both"
          },
          "industryContains": {
            "title": "Industry contains",
            "type": "string",
            "description": "Keep rows whose public BUSINESS.bg category contains this text.",
            "default": ""
          },
          "cityContains": {
            "title": "City contains",
            "type": "string",
            "description": "Keep rows whose public city contains this text.",
            "default": ""
          },
          "requirePublicPhone": {
            "title": "Require public phone",
            "type": "boolean",
            "description": "Keep only listings with a phone number published by BUSINESS.bg.",
            "default": false
          },
          "requirePublicEmail": {
            "title": "Require public email",
            "type": "boolean",
            "description": "Keep only listings with a directory email published by BUSINESS.bg.",
            "default": false
          },
          "requireWebsite": {
            "title": "Require public website",
            "type": "boolean",
            "description": "Keep only listings that link to a public company website.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Optional public BUSINESS.bg rating floor from 0 to 5. This enables bounded profile enrichment when needed.",
            "default": 0
          },
          "requireDescription": {
            "title": "Require company description",
            "type": "boolean",
            "description": "Keep only rows with a public company description.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct HTTP is the default. Select an Apify Proxy only when your workflow needs it.",
            "default": {
              "useApifyProxy": false
            }
          },
          "includeDetails": {
            "title": "Include profile details",
            "type": "boolean",
            "description": "Fetch public profile pages for fuller address, rating, category, image, and map-link fields.",
            "default": false
          },
          "includeImages": {
            "title": "Include public images",
            "type": "boolean",
            "description": "Keep image URLs exposed by BUSINESS.bg. No image URL is constructed when the source omits it.",
            "default": false
          },
          "includePublicWebsiteContacts": {
            "title": "Read public website contacts",
            "type": "boolean",
            "description": "Opt in to bounded requests to linked public company websites to collect visible email and phone channels. Never infer contacts.",
            "default": false
          },
          "maxEnrichedProfiles": {
            "title": "Max enriched profiles",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of public BUSINESS.bg profiles and linked websites to enrich.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum business rows emitted after normalization, deduplication, enrichment, and filters.",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum pages per source",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Bound pagination for each category or search source. Partial runs never infer removed businesses.",
            "default": 2
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "snapshot",
              "snapshotAndChanges",
              "changesOnly"
            ],
            "type": "string",
            "description": "Snapshot emits current rows, snapshot and changes also emits removals after complete runs, and changes only suppresses unchanged rows.",
            "default": "snapshotAndChanges"
          },
          "stateName": {
            "title": "State name",
            "pattern": "^[A-Za-z0-9_-]+$",
            "minLength": 1,
            "maxLength": 60,
            "type": "string",
            "description": "Use a stable name to compare this source scope across scheduled runs.",
            "default": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}