{
  "openapi": "3.0.1",
  "info": {
    "title": "Bark.com Directory Scraper – Listings & Profile URLs",
    "description": "Extract Bark.com business directory listings by category & location: company name, profile URL, rating, area & logo, deduped to one row per provider. Build B2B prospect lists or feed the profile URLs into a Bark Profile Scraper. Returns profiles & URLs, not contact info.",
    "version": "0.1",
    "x-build-id": "HdwUCmG9j7QeWGLkX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~bark-listing-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-bark-listing-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/scrapesage~bark-listing-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-bark-listing-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/scrapesage~bark-listing-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-bark-listing-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",
        "required": [
          "country"
        ],
        "properties": {
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "ie",
              "nz",
              "sg",
              "za",
              "de",
              "fr"
            ],
            "type": "string",
            "description": "Bark region to scrape. Determines which locale path (e.g. /en/us/) the actor harvests from the sitemap.",
            "default": "us"
          },
          "categories": {
            "title": "Service categories",
            "type": "array",
            "description": "Bark category slugs, e.g. \"cleaners\", \"plumbers\", \"web-design\" (as they appear in a Bark URL: bark.com/en/us/<slug>/). Don't worry about exact formatting — the actor auto-fixes capitalization, spaces (\"Web Design\" → \"web-design\"), and singular/plural (\"plumber\" → \"plumbers\"). Leave empty to scrape ALL categories (large — use the limits below).",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "State / region (optional)",
            "type": "string",
            "description": "Optional regional filter using Bark's own slug for that country: US states (\"california\"), Canadian provinces (\"ontario\"), UK counties or big cities (\"greater-london\", \"berkshire\"), Australian states (\"new-south-wales\"). Note: \"england\" is NOT valid — the UK is split into counties, not nations. Easiest and most reliable: leave State AND City empty to sweep the entire country (all regions and cities)."
          },
          "city": {
            "title": "City (optional — requires a State/region if set)",
            "type": "string",
            "description": "Restrict to a single city slug as it appears in Bark URLs, e.g. \"new-york-city\", \"los-angeles\". A city cannot be located without its state, so if you fill this in you MUST also fill in State/region (.../plumbers/california/los-angeles/). Leave empty to cover all cities."
          },
          "includeNationalAndState": {
            "title": "Include national & state listing pages",
            "type": "boolean",
            "description": "When true, also pull providers from the national category page and state pages (max coverage). When false, only city pages are scraped (deepest local long-tail). Either way results are deduplicated per provider. Default: true.",
            "default": true
          },
          "maxItems": {
            "title": "Max unique providers",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on the number of UNIQUE providers scraped (and charged) in a single run. The primary cost guard. Duplicates are never charged. Default: 1000.",
            "default": 1000
          },
          "maxListingPages": {
            "title": "Max listing pages to scan",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Safety cap on how many directory listing pages the actor fetches during a run. Pairs with Max unique providers to bound a run's size and cost. Default: 2000.",
            "default": 2000
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel requests. Higher is faster; lower is gentler on the target site. Default: 5.",
            "default": 5
          },
          "minRequestDelayMs": {
            "title": "Minimum delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum wait time before each request (jittered up to +3 seconds). Default: 2000.",
            "default": 2000
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed request with a fresh session/IP before giving up. Default: 5.",
            "default": 5
          },
          "useBrowserFallback": {
            "title": "Enable headless browser fallback",
            "type": "boolean",
            "description": "When true, the crawler may auto-promote a request to a headless Chromium browser if it can't be parsed via HTTP. Bark listing pages are server-rendered, so this rarely fires — leave on for resilience, disable for strictly HTTP-only runs.",
            "default": true
          },
          "debugRenderPath": {
            "title": "Debug: tag records with rendering path",
            "type": "boolean",
            "description": "Diagnostic only. When true, every record gets a `_renderedBy` field ('http' / 'browser' / 'unknown') so you can verify the cheap HTTP path is being used. Off by default to keep output clean.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Default is automatic (datacenter) proxy — tested reliable on Bark at the default concurrency, and cheaper/faster. If a large or high-concurrency run starts returning blocked or empty pages, switch to the Residential group.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}