{
  "openapi": "3.0.1",
  "info": {
    "title": "California SoS Business Scraper - Agent & Status",
    "description": "Scrape the California Secretary of State business registry (bizfileOnline): entity name, number, status, standing, type, formation date and registered agent. Search by name or entity number. No API key needed.",
    "version": "1.6",
    "x-build-id": "e8lPUG4Vkow25BXgm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/regdata~california-sos-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-regdata-california-sos-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/regdata~california-sos-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-regdata-california-sos-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/regdata~california-sos-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-regdata-california-sos-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": {
          "mode": {
            "title": "What to do",
            "enum": [
              "search",
              "newFilings"
            ],
            "type": "string",
            "description": "<b>Search</b> looks up the names or entity numbers you list below. <b>New filings</b> delivers every newly approved California entity since the last run - schedule it daily and each run picks up where the previous one stopped.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search queries",
            "minItems": 1,
            "type": "array",
            "description": "Company names or entity/file numbers to look up in the California Secretary of State business registry. Each query returns all matching entities.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of entities to keep per query (default 50 to avoid surprise charges on broad searches). Set 0 for no limit (all matches, typically up to ~500 per search).",
            "default": 50
          },
          "startEntityNumber": {
            "title": "Start from entity number",
            "type": "string",
            "description": "New filings only, first run only: the California entity number to start from, e.g. <code>B20260403469</code>. Later runs continue automatically from the saved position."
          },
          "maxNumbersPerRun": {
            "title": "Entity numbers to check per run",
            "minimum": 1,
            "type": "integer",
            "description": "Upper bound on how many entity numbers one run checks. California issues roughly 1,500-2,000 per business day; a daily schedule at the default keeps up, and whatever is not reached is picked up next run.",
            "default": 2500
          },
          "includeNameReservations": {
            "title": "Include name reservations",
            "type": "boolean",
            "description": "Name reservations share the number sequence but are not formed businesses. Off by default: they are skipped and not billed.",
            "default": false
          },
          "restartFromStartNumber": {
            "title": "Restart from the start number",
            "type": "boolean",
            "description": "Discard the saved position and start again from \"Start from entity number\". Use it to re-run a range; every record in it is delivered (and billed) again.",
            "default": false
          },
          "stateStoreName": {
            "title": "Progress store name",
            "type": "string",
            "description": "Name of the key-value store in your Apify account that keeps the scan position between runs. Use a different name to run several independent feeds.",
            "default": "california-new-filings"
          },
          "stopAfterConsecutiveMisses": {
            "title": "Stop after consecutive unanswered numbers",
            "minimum": 10,
            "type": "integer",
            "description": "How many consecutive entity numbers with no approved filing yet mark the end of what the registry has processed so far. Leave at the default unless a run stops too early.",
            "default": 300
          },
          "reserveForNewNumbers": {
            "title": "Look-ups reserved for new entity numbers",
            "minimum": 0,
            "type": "integer",
            "description": "Every run re-checks numbers that had no record yet before it moves on to new ones. This reserves part of the run's budget for new numbers so the scan always moves forward, even when the re-check queue is long. Leave at the default unless a run reports a growing backlog.",
            "default": 1800
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The registry refuses datacenter addresses on its search API, so runs go out through a US residential proxy by default. Leave this alone unless you want to supply your own proxy - turning it off makes the registry reject the run.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}