{
  "openapi": "3.0.1",
  "info": {
    "title": "San Francisco Registered Businesses Scraper",
    "description": "Scrape registered business locations in San Francisco. Extract business name, owner, full address, neighborhood, supervisor district, business activity, registration dates and coordinates. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "e5VlIMDDKbvmGyfsC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~sf-business-registrations-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-sf-business-registrations-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/scrapers_lat~sf-business-registrations-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-sf-business-registrations-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/scrapers_lat~sf-business-registrations-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-sf-business-registrations-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": {
          "query": {
            "title": "Business Name or Keyword",
            "type": "string",
            "description": "Match on the business name (DBA) or the owner name, for example COFFEE, UBER or a person's name. Leave empty to browse all registered businesses."
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of business records to collect. Optional. Results are returned newest registered first."
          },
          "neighborhood": {
            "title": "Neighborhood",
            "enum": [
              "",
              "Financial District/South Beach",
              "Mission",
              "South of Market",
              "Sunset/Parkside",
              "Bayview Hunters Point",
              "Marina",
              "Outer Richmond",
              "Chinatown",
              "Castro/Upper Market",
              "Tenderloin",
              "Nob Hill",
              "West of Twin Peaks",
              "Pacific Heights",
              "Hayes Valley",
              "Mission Bay",
              "Potrero Hill",
              "Inner Sunset",
              "Inner Richmond",
              "North Beach",
              "Noe Valley",
              "Bernal Heights",
              "Russian Hill",
              "Haight Ashbury",
              "Excelsior",
              "Western Addition",
              "Presidio Heights",
              "Outer Mission",
              "Oceanview/Merced/Ingleside",
              "Lone Mountain/USF",
              "Portola",
              "Lakeshore",
              "Glen Park",
              "Visitacion Valley",
              "Japantown",
              "Twin Peaks",
              "Treasure Island",
              "Seacliff"
            ],
            "type": "string",
            "description": "Restrict to one San Francisco neighborhood. Leave as Any to include the whole city.",
            "default": ""
          },
          "businessType": {
            "title": "Business Activity",
            "type": "string",
            "description": "Match the registered business activity or line of business, for example RESTAURANT, MASSAGE, TATTOO, CATERER or BAR. Text match, case-insensitive."
          },
          "supervisorDistrict": {
            "title": "Supervisor District",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11"
            ],
            "type": "string",
            "description": "Restrict to one Board of Supervisors district (1 to 11).",
            "default": ""
          },
          "activeOnly": {
            "title": "Active Businesses Only",
            "type": "boolean",
            "description": "When on, only businesses with no location end date (still registered at the address) are returned. When off, closed and past registrations are included too.",
            "default": false
          },
          "zip": {
            "title": "Business ZIP Code",
            "type": "string",
            "description": "Match businesses by 5-digit ZIP code, for example 94103."
          },
          "startFrom": {
            "title": "Registered From",
            "type": "string",
            "description": "Only businesses whose registration (DBA start) date is on or after this date. Format YYYY-MM-DD, for example 2024-01-01."
          },
          "startTo": {
            "title": "Registered To",
            "type": "string",
            "description": "Only businesses whose registration (DBA start) date is on or before this date. Format YYYY-MM-DD, for example 2026-06-30."
          },
          "naicsCode": {
            "title": "NAICS Code",
            "type": "string",
            "description": "Optional. Filter by North American Industry Classification System code prefix, for example 722 for food service. Note this field is only present on a subset of records."
          },
          "appToken": {
            "title": "Socrata App Token",
            "type": "string",
            "description": "Optional. The San Francisco Open Data source is keyless, but a free app token raises the rate limit for very large pulls. Leave empty unless you have one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}