{
  "openapi": "3.0.1",
  "info": {
    "title": "Snupit South Africa Business Directory Scraper: Service Leads",
    "description": "Collect Snupit South Africa service providers for lead generation. Export names, services, locations, ratings, badges, reviews, and visible contacts to datasets for CRM, Sheets, Make, and Zapier. Use profile URLs or bounded pages, then monitor new and changed providers with pay-per-event billing.",
    "version": "0.1",
    "x-build-id": "mxEqLC9ApxTfgj8u6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~snupit-business-directory-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-snupit-business-directory-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~snupit-business-directory-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-snupit-business-directory-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~snupit-business-directory-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-snupit-business-directory-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": "Public Snupit URLs",
            "maxItems": 20,
            "type": "array",
            "description": "Optional public Snupit profile, service, location, or sitemap URLs. When supplied, these URLs take precedence over generated search URLs. The prefilled profile is a public example that makes the default run return a real provider.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "An HTTPS URL on www.snupit.co.za pointing to a public profile, service page, location page, or sitemap."
                }
              },
              "required": [
                "url"
              ]
            },
            "default": [
              {
                "url": "https://www.snupit.co.za/johannesburg/bramley/vsc-construction-and-projects/425180"
              }
            ]
          },
          "searchTerms": {
            "title": "Service Search Terms",
            "maxItems": 10,
            "type": "array",
            "description": "Service names or Snupit category terms used to build public city/service URLs when Public Snupit URLs is empty, for example builders, plumbers, cleaning-services, or company-registrations.",
            "items": {
              "type": "string"
            },
            "default": [
              "builders"
            ]
          },
          "locations": {
            "title": "South African Locations",
            "maxItems": 20,
            "type": "array",
            "description": "South African city or town names combined with every service term. Use the spelling Snupit uses in its public URL, such as Johannesburg, Cape Town, Durban, or Pretoria.",
            "items": {
              "type": "string"
            },
            "default": [
              "Johannesburg"
            ]
          },
          "verifiedOnly": {
            "title": "Verified Providers Only",
            "type": "boolean",
            "description": "Keep only profiles that visibly show Snupit's Pro Verified badge. This filter applies to provider records with profile data.",
            "default": false
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Keep profiles with a visible rating at or above this value. Use 0 to keep providers with any rating or no rating yet.",
            "default": 0
          },
          "sortBy": {
            "title": "Result Ordering",
            "enum": [
              "source",
              "rating",
              "reviewCount",
              "name"
            ],
            "type": "string",
            "description": "Order the records after collection. Source order keeps Snupit's order, while rating, review count, and name sort the records locally.",
            "default": "source"
          },
          "scrapeDetails": {
            "title": "Follow Discovered Profile Links",
            "type": "boolean",
            "description": "When a service, location, or sitemap page publishes provider profile links, open those profiles for the full public record. Direct profile URLs are always read.",
            "default": false
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Include the visible review list as a JSON string in each profile record. Reviewer phone fragments are excluded.",
            "default": false
          },
          "includePhotos": {
            "title": "Include Photo URLs",
            "type": "boolean",
            "description": "Include the visible logo and gallery image URLs from the public profile page.",
            "default": false
          },
          "runMode": {
            "title": "Run Mode",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "Snapshot emits every unique matching provider. Changes emits only providers first seen or changed since the previous successful run in the same monitor scope.",
            "default": "snapshot"
          },
          "monitorScope": {
            "title": "Monitor Scope",
            "type": "string",
            "description": "A readable name for the saved change-monitoring state. Reuse the same value across scheduled runs that should be compared.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum Providers",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum unique provider records to publish across all supplied or generated targets.",
            "default": 10
          },
          "maxPages": {
            "title": "Maximum Pages Per Target",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum linked service, location, sitemap, or pagination pages inspected for each starting target.",
            "default": 3
          },
          "maxSearches": {
            "title": "Maximum Service Searches",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum service and location combinations generated when Public Snupit URLs is empty.",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Request Delay",
            "minimum": 500,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum delay between direct Snupit requests. Increase it for gentler scheduled collection.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}