{
  "openapi": "3.0.1",
  "info": {
    "title": "StreetDirectory Scraper — Singapore Business Leads",
    "description": "Scrape Singapore business leads from StreetDirectory: name, phone, website, full address, postal code, category and email. Browse by category or industry group, paginate A–Z, and monitor newly listed businesses. Optional website email enrichment. No start fee.",
    "version": "1.0",
    "x-build-id": "HfDn3LZL5Hp0IdkiF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~streetdirectory-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-streetdirectory-business-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~streetdirectory-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-streetdirectory-business-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~streetdirectory-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-streetdirectory-business-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": {
          "categories": {
            "title": "Business categories",
            "type": "array",
            "description": "Business categories to scrape. Enter a category name (<code>Accountant</code>, <code>Hair Salons</code>, <code>Renovation</code>), or paste a full category URL (<code>https://www.streetdirectory.com/businessfinder/company/3/Accountant/</code>). Names are matched against StreetDirectory's category index. Browse categories at <code>streetdirectory.com/businessfinder/</code>.",
            "items": {
              "type": "string"
            }
          },
          "browseGroups": {
            "title": "Browse whole industry groups",
            "type": "array",
            "description": "Scrape every category within one or more top-level industry groups. Great for building large lead lists across a whole sector.",
            "items": {
              "type": "string",
              "enum": [
                "restaurant",
                "business",
                "industrial",
                "medical",
                "automotive",
                "top_20_category"
              ],
              "enumTitles": [
                "Food & Restaurants",
                "Business & Professional Services",
                "Industrial & Trade",
                "Medical & Health",
                "Automotive",
                "Top 20 popular categories"
              ]
            },
            "default": []
          },
          "startUrls": {
            "title": "Category or business URLs",
            "type": "array",
            "description": "Paste StreetDirectory URLs directly: category pages (<code>/businessfinder/company/...</code>) to scrape every business listed, group pages (<code>/businessfinder/medical/</code>), or individual business profile pages (e.g. <code>https://www.streetdirectory.com/lo-hock-ling/</code>).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "paginateAllLetters": {
            "title": "Scrape all pages of each category (A–Z)",
            "type": "boolean",
            "description": "Follow StreetDirectory's A–Z pagination to collect every business in a category, not just the first page. Turn off for a fast sample of the top listings per category.",
            "default": true
          },
          "scrapeProfiles": {
            "title": "Enrich from business profile pages (recommended)",
            "type": "boolean",
            "description": "Open each business's StreetDirectory profile page to add its <b>email address</b>, full street address + postal code, opening hours and any extra phone numbers. This is what turns a listing into a contactable lead. Turn off for a faster, listing-only run.",
            "default": true
          },
          "enrichEmails": {
            "title": "Also enrich emails from the business website",
            "type": "boolean",
            "description": "When a business lists a website, crawl it (home + contact/about, up to 3 pages) for additional contact emails, a phone number, a contact-form URL and social links (LinkedIn, Facebook, Instagram).",
            "default": false
          },
          "maxItems": {
            "title": "Max businesses",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of businesses to scrape across all targets. Use 0 for no limit.",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitor mode (only new & changed)",
            "type": "boolean",
            "description": "Only output businesses that are <b>new</b> since the previous run for the same input. State persists across runs in a named key-value store, so this pairs perfectly with Apify Schedules to track newly listed businesses in a category or sector over time without re-pulling — or re-billing — unchanged listings.",
            "default": false
          },
          "monitorTrackChanges": {
            "title": "Also re-check known businesses for changes",
            "type": "boolean",
            "description": "When monitor mode is on, also re-fetch businesses seen in previous runs and re-emit any whose phone or website changed. Costs more (known businesses are re-fetched). Leave off to treat only brand-new businesses as changes.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of pages fetched in parallel.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies to use. The default Apify Proxy works well for StreetDirectory; switch to Residential only if you hit blocks on very large runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}