{
  "openapi": "3.0.1",
  "info": {
    "title": "US Business Entity Search & New LLC Leads: Secretary of State",
    "description": "US business entity search and new LLC leads from official Secretary of State open data: search companies by name or get newly formed LLCs and corporations daily in New York, Texas, Colorado, Connecticut, Oregon and Pennsylvania. Formation date, status, entity type, business address. Pay per entity.",
    "version": "1.0",
    "x-build-id": "eeNznAlF5DHcSAl8g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fguiraud~us-business-entity-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fguiraud-us-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/fguiraud~us-business-entity-search/runs": {
      "post": {
        "operationId": "runs-sync-fguiraud-us-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/fguiraud~us-business-entity-search/run-sync": {
      "post": {
        "operationId": "run-sync-fguiraud-us-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",
        "properties": {
          "names": {
            "title": "Business names",
            "type": "array",
            "description": "Words or names to look for in the entity name, one per line (e.g. coffee, Acme, roofing). Empty: the newest entities of the chosen states (last 7 days unless dates are set).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "States to search. These six publish their business registry as official open data.",
            "items": {
              "type": "string",
              "enum": [
                "NY",
                "CO",
                "CT",
                "TX",
                "OR",
                "PA"
              ],
              "enumTitles": [
                "New York",
                "Colorado",
                "Connecticut",
                "Texas",
                "Oregon",
                "Pennsylvania (updated monthly)"
              ]
            },
            "default": [
              "NY",
              "CO",
              "CT",
              "TX",
              "OR",
              "PA"
            ]
          },
          "nameMatch": {
            "title": "Name match",
            "enum": [
              "contains",
              "starts"
            ],
            "type": "string",
            "description": "How the business names are matched.",
            "default": "contains"
          },
          "formedWithinDays": {
            "title": "Formed in the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only entities formed (or registered in the state) in the last N days. For new business leads use 1-7 with a daily schedule and 'Only new entities'."
          },
          "formedAfter": {
            "title": "Formed on or after",
            "type": "string",
            "description": "Only entities formed on or after this date (YYYY-MM-DD)."
          },
          "formedBefore": {
            "title": "Formed on or before",
            "type": "string",
            "description": "Only entities formed on or before this date (YYYY-MM-DD)."
          },
          "entityKinds": {
            "title": "Entity types",
            "type": "array",
            "description": "Any of these. Empty: all.",
            "items": {
              "type": "string",
              "enum": [
                "llc",
                "corporation",
                "nonprofit",
                "partnership",
                "other"
              ],
              "enumTitles": [
                "LLC",
                "Corporation",
                "Nonprofit",
                "Partnership (LP, LLP, GP)",
                "Other"
              ]
            }
          },
          "activeOnly": {
            "title": "Only active entities",
            "type": "boolean",
            "description": "Leave out dissolved, revoked, withdrawn or merged entities (Colorado, Connecticut, Texas; the New York, Oregon and Pennsylvania tables only list active ones).",
            "default": true
          },
          "excludeForeign": {
            "title": "Exclude foreign entities",
            "type": "boolean",
            "description": "Leave out companies formed in another state and registered to do business here.",
            "default": false
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep entities whose business address is in one of these cities (exact name, any case).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Keep entities whose ZIP code starts with one of these (e.g. 100 for Manhattan, 80202).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max entities",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many entities (the cost cap of the run). The states are read in turn, so the results mix all of them.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new entities (monitoring)",
            "type": "boolean",
            "description": "Skip entities delivered by earlier runs of this same search, so a daily schedule only returns and charges newly formed companies.",
            "default": false
          },
          "failOnError": {
            "title": "Fail the run on errors",
            "type": "boolean",
            "description": "Mark the run as failed when a state cannot be read or fields come back empty. Useful for scheduled monitoring (Apify emails you on failed runs).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}