{
  "openapi": "3.0.1",
  "info": {
    "title": "New Business Leads (State and City Open Data APIs)",
    "description": "Newly registered businesses from 4 state registries, Texas sales tax permits and 5 city license offices, via official open data APIs. Name, type, industry, address and, where published, phone or email. Filter by industry, ZIP or city; get only new businesses on scheduled runs.",
    "version": "0.0",
    "x-build-id": "dMwCHZ45lRu4SH0Re"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benenjoyscoding~new-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benenjoyscoding-new-business-leads",
        "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/benenjoyscoding~new-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-benenjoyscoding-new-business-leads",
        "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/benenjoyscoding~new-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-benenjoyscoding-new-business-leads",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which state registries and city license offices to read. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "new-york",
                "colorado",
                "connecticut",
                "oregon",
                "texas",
                "chicago",
                "los-angeles",
                "seattle",
                "norfolk",
                "new-orleans"
              ],
              "enumTitles": [
                "New York State (new LLCs and corporations)",
                "Colorado (new entities)",
                "Connecticut (new registrations)",
                "Oregon (new registrations)",
                "Texas (new sales tax permits)",
                "Chicago, IL (new business licenses)",
                "Los Angeles, CA (new business locations)",
                "Seattle, WA (new business licenses)",
                "Norfolk, VA (new businesses)",
                "New Orleans, LA (new business licenses)"
              ]
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Businesses registered in the last this many days, counting today. Ignored when you set a registered-from date.",
            "default": 7
          },
          "registeredFrom": {
            "title": "Registered from (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional. Start of a fixed date range, inclusive."
          },
          "registeredTo": {
            "title": "Registered to (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional. End of a fixed date range, inclusive. Defaults to today."
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "Keep only these kinds of records. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "new-entity",
                "new-license",
                "sales-tax-permit"
              ],
              "enumTitles": [
                "New company registered with the state",
                "New city business license",
                "New sales tax permit"
              ]
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep businesses whose name or industry contains any of these words, for example bakery, dental or roofing.",
            "items": {
              "type": "string"
            }
          },
          "naicsPrefixes": {
            "title": "NAICS code prefixes",
            "type": "array",
            "description": "Keep businesses whose NAICS industry code starts with any of these, for example 722 for restaurants or 2382 for building trades. Only sources that publish NAICS can match: Connecticut, Texas, Los Angeles and Seattle.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Keep businesses in these 5-digit ZIP codes. Records without a ZIP are skipped when this is set.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep businesses whose address is in one of these cities. Useful with the statewide sources.",
            "items": {
              "type": "string"
            }
          },
          "excludeNonprofits": {
            "title": "Skip nonprofits",
            "type": "boolean",
            "description": "Leave out nonprofit corporations where the source marks them.",
            "default": false
          },
          "requirePhone": {
            "title": "Only businesses with a phone",
            "type": "boolean",
            "description": "Seattle and New Orleans publish phones. Other sources will return nothing when this is on.",
            "default": false
          },
          "requireEmail": {
            "title": "Only businesses with an email",
            "type": "boolean",
            "description": "Connecticut publishes emails. Other sources will return nothing when this is on.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new businesses (for scheduled runs)",
            "type": "boolean",
            "description": "Remember which businesses earlier runs delivered and skip them. Turn this on for a daily or weekly schedule so you only pay for fresh leads.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory name for only-new mode",
            "type": "string",
            "description": "Use a different name per saved task if you run several schedules with different filters.",
            "default": "new-business-leads-state"
          },
          "maxResults": {
            "title": "Max businesses per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many businesses in total. You pay per business.",
            "default": 5000
          },
          "maxResultsPerSource": {
            "title": "Max businesses per source",
            "minimum": 1,
            "type": "integer",
            "description": "Stop reading a source after this many businesses.",
            "default": 2000
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "A free app token from any Socrata open data portal raises the request rate. Not needed for normal runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}