{
  "openapi": "3.0.1",
  "info": {
    "title": "New York Business Entity & LLC Records Scraper",
    "description": "Search the New York Department of State by name, DOS ID or assumed name and extract full business entity records for corporations, LLCs and partnerships. Get registered agent, service of process, CEO, addresses, DBAs, shares, and complete name and filing history. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "SjwdVzngd4OSEgGrZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~ny-dos-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-ny-dos-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/scrapers_lat~ny-dos-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-ny-dos-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/scrapers_lat~ny-dos-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-ny-dos-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",
        "required": [
          "searchValue"
        ],
        "properties": {
          "maxCompanies": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum number of company (entity) records to collect. The source database returns at most 300 matches per search."
          },
          "withDetails": {
            "title": "Fetch full details",
            "type": "boolean",
            "description": "Fetch the full entity record for each match: service-of-process agent, registered agent, CEO, principal and physical-location addresses, formation and status dates, section of law and stock/share info. Covers active and inactive entities. Turn off to return search-level fields only.",
            "default": true
          },
          "includeHistory": {
            "title": "Include name & filing history",
            "type": "boolean",
            "description": "Also collect the full legal-name history and filing history (articles, amendments, biennial statements, changes) for each entity. Adds two fast requests per entity. Requires 'Fetch full details'.",
            "default": true
          },
          "entityTypeCategory": {
            "title": "Entity type filter",
            "type": "array",
            "description": "Optional. Keep only entities in these categories. Leave empty to include every type.",
            "items": {
              "type": "string",
              "enum": [
                "corporation",
                "limited liability company",
                "limited partnership",
                "partnership",
                "other"
              ],
              "enumTitles": [
                "Corporation",
                "Limited liability company (LLC)",
                "Limited partnership (LP)",
                "Partnership",
                "Other"
              ]
            },
            "default": []
          },
          "county": {
            "title": "County filter",
            "type": "string",
            "description": "Optional. Keep only entities whose county contains this text (case-insensitive), for example 'Kings' or 'New York'. Leave empty for all counties."
          },
          "searchValue": {
            "title": "Search value",
            "type": "string",
            "description": "The entity name (or part of it) to search for, or a DOS ID number when 'Search by' is set to DOS ID."
          },
          "searchValues": {
            "title": "Additional search values",
            "type": "array",
            "description": "Optional. Extra entity names or DOS IDs to look up in the SAME run, in addition to 'Search value'. Results from all terms are merged and de-duplicated by DOS ID. Uses the same 'Search by' and match mode.",
            "items": {
              "type": "string"
            }
          },
          "filedFrom": {
            "title": "Filed on or after",
            "type": "string",
            "description": "Optional. Keep only entities whose initial filing date is on or after this date (YYYY-MM-DD). Useful for finding newly registered businesses."
          },
          "filedTo": {
            "title": "Filed on or before",
            "type": "string",
            "description": "Optional. Keep only entities whose initial filing date is on or before this date (YYYY-MM-DD)."
          },
          "searchBy": {
            "title": "Search by",
            "enum": [
              "name",
              "id",
              "assumedName"
            ],
            "type": "string",
            "description": "Whether 'Search value' is an entity name, a DOS ID number, or an assumed name (DBA).",
            "default": "name"
          },
          "match": {
            "title": "Name match mode",
            "enum": [
              "beginsWith",
              "contains",
              "partial"
            ],
            "type": "string",
            "description": "How the search value is matched against entity names. 'Begins with' matches names starting with the value, 'Contains' matches names containing the value anywhere, 'Partial' matches partial words. Ignored when searching by DOS ID.",
            "default": "contains"
          },
          "entityStatus": {
            "title": "Entity status",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Restrict results to active entities, inactive entities, or include all statuses.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "newest",
              "oldest",
              "name"
            ],
            "type": "string",
            "description": "Optional. Order the matched entities before applying the Max companies limit. 'Newest first' and 'Oldest first' sort by initial filing date; 'Name (A to Z)' sorts alphabetically. Leave empty to keep the source's default order."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}