{
  "openapi": "3.0.1",
  "info": {
    "title": "Business Entity Search - Secretary of State & LLC Lookup",
    "description": "Business entity search across official Secretary of State registries for Colorado, New York, Pennsylvania, Texas, Oregon and Connecticut: name search, LLC lookup by ID, status, formation date, addresses, registered agent and officers. New business filings for daily lead lists.",
    "version": "1.0",
    "x-build-id": "ANLwd7rYKyhm7f1ov"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sonic_scraper~business-entity-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sonic_scraper-business-entity-search",
        "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/sonic_scraper~business-entity-search/runs": {
      "post": {
        "operationId": "runs-sync-sonic_scraper-business-entity-search",
        "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/sonic_scraper~business-entity-search/run-sync": {
      "post": {
        "operationId": "run-sync-sonic_scraper-business-entity-search",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to do",
            "enum": [
              "search",
              "newFilings",
              "lookup"
            ],
            "type": "string",
            "description": "<b>Search</b> finds entities by name. <b>New business filings</b> lists entities formed in a date range, newest first (great for leads). <b>Lookup</b> fetches specific entity IDs.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Business names to search",
            "type": "array",
            "description": "Company names or parts of names, e.g. <code>acme roofing</code>. Used in search mode. Each term is searched in every selected state.",
            "items": {
              "type": "string"
            }
          },
          "matchType": {
            "title": "Name match",
            "enum": [
              "contains",
              "startsWith",
              "exact"
            ],
            "type": "string",
            "description": "How the name must match. 'Contains all words' finds 'Starbucks Coffee Company' for 'starbucks coffee'.",
            "default": "contains"
          },
          "entityIds": {
            "title": "Entity IDs to look up",
            "type": "array",
            "description": "Used in lookup mode. Format <code>STATE:ID</code>: <code>CO:20268371355</code> (Colorado entity ID), <code>NY:8126668</code> (DOS ID), <code>PA:0016040963</code> (filing number), <code>TX:32107728928</code> (taxpayer number or SOS file number), <code>OR:264329690</code> (registry number), <code>CT:3161375</code> (business ID).",
            "items": {
              "type": "string"
            }
          },
          "formedWithinDays": {
            "title": "Formed in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "New business filings mode: entities formed in the last N days. Ignored when 'Formed on or after' is set.",
            "default": 7
          },
          "formedAfter": {
            "title": "Formed on or after",
            "type": "string",
            "description": "New business filings mode: start date (YYYY-MM-DD)."
          },
          "formedBefore": {
            "title": "Formed on or before",
            "type": "string",
            "description": "New business filings mode: end date (YYYY-MM-DD). Default: today."
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Which state registries to search. All six by default.",
            "items": {
              "type": "string",
              "enum": [
                "CO",
                "NY",
                "PA",
                "TX",
                "OR",
                "CT"
              ],
              "enumTitles": [
                "Colorado",
                "New York",
                "Pennsylvania",
                "Texas",
                "Oregon",
                "Connecticut"
              ]
            },
            "default": [
              "CO",
              "NY",
              "PA",
              "TX",
              "OR",
              "CT"
            ]
          },
          "categories": {
            "title": "Entity types",
            "type": "array",
            "description": "Keep only these types. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "LLC",
                "Corporation",
                "Nonprofit",
                "Partnership",
                "Other"
              ]
            }
          },
          "activeOnly": {
            "title": "Active entities only",
            "type": "boolean",
            "description": "Drop dissolved, withdrawn, revoked and forfeited entities (Colorado, Connecticut and Texas include them; the New York, Pennsylvania and Oregon registries list current entities only).",
            "default": false
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep entities whose principal or mailing address is in one of these cities, e.g. <code>Denver</code>.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes or prefixes",
            "type": "array",
            "description": "Keep entities whose address ZIP starts with one of these, e.g. <code>802</code> or <code>10001</code>.",
            "items": {
              "type": "string"
            }
          },
          "includePeople": {
            "title": "Include officers and parties",
            "type": "boolean",
            "description": "Add the people listed on the record where the state publishes them: Pennsylvania officers and organizers, Oregon authorized representatives, New York chairman/CEO.",
            "default": true
          },
          "maxResultsPerState": {
            "title": "Max results per state",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of entities from each state (per search term in search mode).",
            "default": 100
          },
          "maxResults": {
            "title": "Max results in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Upper limit for the whole run. Your run's maximum charge is also respected.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only entities not returned before",
            "type": "boolean",
            "description": "Monitoring: skip entities earlier runs with the same state key already returned (and never bill them again). Combine with new business filings mode and a daily schedule.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the memory used by 'Only entities not returned before'. Use a different key per schedule.",
            "default": "default"
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free app token from any Socrata open-data portal for higher rate limits on very large runs. Not needed for normal use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}