{
  "openapi": "3.0.1",
  "info": {
    "title": "US State Business Entities API (NY, CO, OR, CT)",
    "description": "Secretary of State business search API for NY, CO, OR and CT: business entity search, LLC lookup, new filings and KYB checks in one schema. No API key.",
    "version": "0.1",
    "x-build-id": "af6BlbKOXZ72h7LW7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yourevenings~us-state-business-entities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yourevenings-us-state-business-entities",
        "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/yourevenings~us-state-business-entities/runs": {
      "post": {
        "operationId": "runs-sync-yourevenings-us-state-business-entities",
        "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/yourevenings~us-state-business-entities/run-sync": {
      "post": {
        "operationId": "run-sync-yourevenings-us-state-business-entities",
        "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": "Mode",
            "enum": [
              "lookup",
              "search",
              "newFilings"
            ],
            "type": "string",
            "description": "<b>Look up</b> returns the entities you list by state and ID. <b>Search</b> finds entities by name in each state's dataset. <b>New filings</b> lists entities formed or registered in a date range, newest first.",
            "default": "lookup"
          },
          "entities": {
            "title": "Entities",
            "type": "array",
            "description": "For <b>Look up</b>: up to 500 entries as STATE:ID. NY = DOS ID, CO = 11-digit entity ID, OR = registry number, CT = business ID (account number). Unknown or invalid IDs get a free status row.",
            "items": {
              "type": "string"
            }
          },
          "defaultState": {
            "title": "Default state",
            "enum": [
              "NY",
              "CO",
              "OR",
              "CT"
            ],
            "type": "string",
            "description": "For <b>Look up</b>: state to use for entries with no STATE: prefix."
          },
          "name": {
            "title": "Business name",
            "type": "string",
            "description": "For <b>Search</b>: the name or part of it (at least 2 letters or digits). Matching ignores case. Punctuation other than & . , ' - / is ignored."
          },
          "nameMatch": {
            "title": "Name match",
            "enum": [
              "contains",
              "startsWith"
            ],
            "type": "string",
            "description": "For <b>Search</b>: <b>Starts with</b> is faster on large states.",
            "default": "contains"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "For <b>Search</b> and <b>New filings</b>: which states to query. Empty = all four.",
            "items": {
              "type": "string",
              "enum": [
                "NY",
                "CO",
                "OR",
                "CT"
              ],
              "enumTitles": [
                "New York",
                "Colorado",
                "Oregon",
                "Connecticut"
              ]
            }
          },
          "activeOnly": {
            "title": "Active entities only",
            "type": "boolean",
            "description": "Leave out dissolved, revoked, withdrawn, merged or otherwise closed entities (CO and CT; the NY and OR datasets list active entities only). Entities that are not in good standing but still exist are kept. Closed rows are dropped before charging and counted in a free <code>skipped_inactive</code> row.",
            "default": false
          },
          "filedWithinDays": {
            "title": "Filed in the last N days",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "For <b>New filings</b>: date range ending today. Ignored when 'Filed since' is set.",
            "default": 7
          },
          "filedSince": {
            "title": "Filed since",
            "type": "string",
            "description": "For <b>New filings</b>: start date, YYYY-MM-DD."
          },
          "filedUntil": {
            "title": "Filed until",
            "type": "string",
            "description": "For <b>New filings</b>: end date, YYYY-MM-DD. Default today."
          },
          "includeRegisteredAgent": {
            "title": "Include registered agent (organisations only)",
            "type": "boolean",
            "description": "Off by default. When on, adds the registered agent's name and address for NY and CO, but only when the agent is an organisation (for example a registered-agent company). Agents who are named people are never returned.",
            "default": false
          },
          "maxResults": {
            "title": "Max records (whole run)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many entity records across all states. 0 means no limit. You are charged per entity record returned.",
            "default": 50
          },
          "maxResultsPerState": {
            "title": "Max records per state",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each state after this many entity records. 0 means no limit.",
            "default": 25
          },
          "monitorMode": {
            "title": "Monitor mode (only new or changed records)",
            "type": "boolean",
            "description": "Remember a fingerprint of each entity (name, type, status, closed date, jurisdiction, addresses, NAICS) and, on later runs, return only entities that are new or changed, with the changed fields and their old values. In Look up, an entity that drops out of a state's dataset gets a free <code>no_longer_listed</code> row.",
            "default": false
          },
          "emitBaselineOnFirstRun": {
            "title": "Return records on the first monitor run",
            "type": "boolean",
            "description": "Off: the first monitor run only records what exists (no rows, no charges).",
            "default": true
          },
          "stateStoreName": {
            "title": "Monitor state store name",
            "type": "string",
            "description": "Named key-value store for monitor state. Use a different name per watch list.",
            "default": "us-state-business-entities-monitor"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}