{
  "openapi": "3.0.1",
  "info": {
    "title": "New York New Business Filings: New LLCs & Corporations",
    "description": "Daily New York new business leads from official NY Department of State open data: new LLCs, corporations, nonprofits and foreign entities. Filing date, county, service-of-process address, filer, entity type, name search, lead score, monitor mode.",
    "version": "0.1",
    "x-build-id": "ga3xFzySs8Lopx8Sd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lonestar-leads~new-york-new-business-filings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lonestar-leads-new-york-new-business-filings",
        "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/lonestar-leads~new-york-new-business-filings/runs": {
      "post": {
        "operationId": "runs-sync-lonestar-leads-new-york-new-business-filings",
        "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/lonestar-leads~new-york-new-business-filings/run-sync": {
      "post": {
        "operationId": "run-sync-lonestar-leads-new-york-new-business-filings",
        "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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Return filings whose NY DOS filing date falls within the last N days. Ignored if Start date is set. Note: the state feed usually lags 1–2 days.",
            "default": 7
          },
          "startDate": {
            "title": "Start date (optional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive start date, YYYY-MM-DD. Overrides Days back."
          },
          "endDate": {
            "title": "End date (optional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive end date, YYYY-MM-DD. Defaults to today."
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "County of the principal office, e.g. Kings, New York, Queens, Bronx, Richmond, Nassau, Suffolk, Westchester, Erie, Monroe. Brooklyn/Manhattan/Staten Island also accepted. Leave empty for all of New York State.",
            "items": {
              "type": "string"
            }
          },
          "entityTypes": {
            "title": "Entity types",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "llc",
                "corporation",
                "nonprofit",
                "partnership",
                "professional",
                "foreign",
                "domestic"
              ],
              "enumTitles": [
                "LLCs (incl. PLLC)",
                "Business corporations (incl. PC)",
                "Not-for-profit corporations",
                "Partnerships (LP / LLP)",
                "Professional service entities",
                "All foreign entities",
                "All domestic NY entities"
              ]
            }
          },
          "nameContains": {
            "title": "Business name keyword (optional)",
            "type": "string",
            "description": "Case-insensitive substring match on the entity name, e.g. REALTY, CONSTRUCTION, DENTAL, TRUCKING."
          },
          "zipCodes": {
            "title": "ZIP codes (optional)",
            "type": "array",
            "description": "5-digit ZIPs matched against the service-of-process or filer address.",
            "items": {
              "type": "string"
            }
          },
          "includeAllFilingTypes": {
            "title": "Include all filing types",
            "type": "boolean",
            "description": "Off (recommended) = only formations: Articles of Organization, Certificates of Incorporation, Applications of Authority, LP/LLP registrations. On = also amendments, biennial statements, dissolutions, assumed names, etc.",
            "default": false
          },
          "excludeFormationServices": {
            "title": "Exclude filings by formation services / commercial agents",
            "type": "boolean",
            "description": "Drop rows filed by LegalZoom, ZenBusiness, Northwest, CSC, CT Corp and similar, or whose process address is a commercial agent.",
            "default": false
          },
          "onlyNew": {
            "title": "Monitor mode: only records not seen in previous runs",
            "type": "boolean",
            "description": "Remembers filings between runs and outputs only new ones. Ideal for daily schedules.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Separate memory per saved search when Monitor mode is on.",
            "default": "default"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "date",
              "leadScore",
              "name"
            ],
            "type": "string",
            "description": "Order of results.",
            "default": "date"
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop rows scoring below this (0–100).",
            "default": 0
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on rows delivered (and charged). New York forms roughly 1,000+ new entities per business day.",
            "default": 1000
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Free data.ny.gov app token for higher rate limits. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}