{
  "openapi": "3.0.1",
  "info": {
    "title": "US Business Data API - Business Listings and Firmographics",
    "description": "Search millions of US and Canada business listings by NAICS or SIC code, state, city, postal code, radius, employee count, sales volume and credit score. Returns name, address, phone, email, size, sales, credit and executive contacts as flat rows. Pay per result. Bring your own API key.",
    "version": "0.1",
    "x-build-id": "itMEe6GuoyAxgpTmU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~us-business-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-us-business-data-api",
        "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/nabeelbaghoor~us-business-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-us-business-data-api",
        "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/nabeelbaghoor~us-business-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-us-business-data-api",
        "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": [
              "business-search",
              "business-lookup",
              "people-search"
            ],
            "type": "string",
            "description": "What this run does. Business search finds business listings by industry, location, size, sales and credit. Business lookup reads records you already hold the identifiers for. Consumer search runs the same filter language against the provider's consumer index.",
            "default": "business-search"
          },
          "query": {
            "title": "Free-text query",
            "type": "string",
            "description": "Searches business name, address and phone. Results are scored by how well they match and the best come first. Can be used on its own or alongside the filters below."
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Fuzzy match against the business name only, unlike the free-text query which also searches address and phone."
          },
          "recordIds": {
            "title": "Record ids",
            "type": "array",
            "description": "The record identifiers to read. These are the infogroupId values the business search returns. Lookup mode only.",
            "items": {
              "type": "string"
            }
          },
          "primaryNaicsCodes": {
            "title": "Primary NAICS codes",
            "type": "array",
            "description": "Match the business's main line of business by NAICS code. The provider extends the standard six digit NAICS with extra digits, so a longer code is more specific.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "Any NAICS code",
            "type": "array",
            "description": "Match a business carrying any of these NAICS codes, whether or not it is the primary one.",
            "items": {
              "type": "string"
            }
          },
          "primarySicCodes": {
            "title": "Primary SIC codes",
            "type": "array",
            "description": "Match the business's main line of business by SIC code. The provider extends the government four digit SIC with a two digit suffix, so 551103 is used cars specifically rather than motor vehicle dealers generally.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "Any SIC code",
            "type": "array",
            "description": "Match a business carrying any of these SIC codes.",
            "items": {
              "type": "string"
            }
          },
          "placeTypes": {
            "title": "Place types",
            "type": "array",
            "description": "The role the location plays in its organisation. Headquarters and branches belong to a corporate family; independents do not.",
            "items": {
              "type": "string",
              "enum": [
                "headquarters",
                "branch",
                "kiosk",
                "individual",
                "independent"
              ]
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two letter state or province codes, for example CA, NY, ON.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names to restrict the search to.",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "Exact postal codes to restrict the search to.",
            "items": {
              "type": "string"
            }
          },
          "countryCodes": {
            "title": "Country codes",
            "type": "array",
            "description": "Country codes, for the provider's US and Canada coverage.",
            "items": {
              "type": "string"
            }
          },
          "geoDistance": {
            "title": "Radius",
            "type": "string",
            "description": "Search within a radius of a point, for example 7km, 5mi, 1500m or 3000ft. Needs either a latitude and longitude below, or a list of postal codes to measure from."
          },
          "geoLatitude": {
            "title": "Centre latitude",
            "type": "string",
            "description": "Latitude of the centre of the radius, for example 47.60."
          },
          "geoLongitude": {
            "title": "Centre longitude",
            "type": "string",
            "description": "Longitude of the centre of the radius, for example -122.33."
          },
          "geoPostalCodes": {
            "title": "Centre postal codes",
            "type": "array",
            "description": "Measure the radius from these postal codes instead of from coordinates.",
            "items": {
              "type": "string"
            }
          },
          "employeeCountFrom": {
            "title": "Employees at this location from",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on the reported number of employees at the location itself."
          },
          "employeeCountTo": {
            "title": "Employees at this location to",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on the reported number of employees at the location itself."
          },
          "estimatedEmployeeCountFrom": {
            "title": "Estimated employees from",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on the estimated location employee count. The estimated field carries the actual value when one exists, so it has a higher fill rate than the reported count and is usually the better filter."
          },
          "estimatedEmployeeCountTo": {
            "title": "Estimated employees to",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on the estimated location employee count."
          },
          "corporateEmployeeCountFrom": {
            "title": "Corporate family employees from",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on employees across every location in the corporate family, rather than at this one site."
          },
          "corporateEmployeeCountTo": {
            "title": "Corporate family employees to",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on employees across the whole corporate family."
          },
          "salesVolumeFrom": {
            "title": "Location sales volume from",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on estimated annual sales at this location, in USD."
          },
          "salesVolumeTo": {
            "title": "Location sales volume to",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on estimated annual sales at this location, in USD."
          },
          "creditScoreFrom": {
            "title": "Credit score from",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound on the provider's numeric creditworthiness estimate. Treat it as a starting point for a credit decision rather than the decision itself."
          },
          "creditScoreTo": {
            "title": "Credit score to",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on the provider's numeric creditworthiness estimate."
          },
          "inBusiness": {
            "title": "In business",
            "enum": [
              "any",
              "yes",
              "maybe",
              "no",
              "junk"
            ],
            "type": "string",
            "description": "Operational status. Yes is verified operating, no is verified closed, maybe is unverified, junk is a duplicate or invalid record.",
            "default": "yes"
          },
          "verifiedAfter": {
            "title": "Verified after",
            "type": "string",
            "description": "Only return businesses verified after this date, as an ISO date such as 2026-01-01. The single best filter for keeping an export fresh."
          },
          "openedForBusinessAfter": {
            "title": "Opened for business after",
            "type": "string",
            "description": "Only return businesses that opened after this date, as an ISO date. Use it to find newly opened locations."
          },
          "requireFieldsPresent": {
            "title": "Require these fields to be filled",
            "type": "array",
            "description": "Attribute names that must be populated, for example location_email_address, phone or website. Names come from the provider data dictionary and an unknown name is rejected rather than ignored.",
            "items": {
              "type": "string"
            }
          },
          "requireFieldsMissing": {
            "title": "Require these fields to be empty",
            "type": "array",
            "description": "Attribute names that must be missing, for example toll_free_number.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "location_sales_volume",
              "estimated_location_employee_count",
              "location_employee_count",
              "verified_on",
              "created_at",
              "name",
              "geo-distance"
            ],
            "type": "string",
            "description": "How to order results. Relevance uses the provider's own match scoring. Distance needs a centre latitude and longitude.",
            "default": "relevance"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction for the sort field. Ignored for relevance and distance.",
            "default": "desc"
          },
          "fields": {
            "title": "Fields to return",
            "type": "array",
            "description": "Attribute names to return, from the provider data dictionary. Leave empty to use this actor's default selection, which covers identity, address, contact, industry codes, size, sales, credit, status and corporate linkage.",
            "items": {
              "type": "string"
            }
          },
          "allFields": {
            "title": "Return every available field",
            "type": "boolean",
            "description": "Ask the provider for everything your contract allows instead of a field list. Slower and much larger, but nothing is left out.",
            "default": false
          },
          "packages": {
            "title": "Field packages",
            "type": "array",
            "description": "Provider field packages to include, such as core_v1. Packages bundle related attributes and what is available depends on your contract.",
            "items": {
              "type": "string"
            }
          },
          "advancedFilter": {
            "title": "Advanced filter",
            "type": "string",
            "description": "A raw filter object in the provider's filter language, merged into the filter tree alongside the fields above. Supports relations (equals, matches, in, between, greater_than, less_than, present, missing, range), geo relations (geo_distance, geo_box, geo_polygon), negation and nested and/or connectives. Example: {\"connective\":\"or\",\"propositions\":[{\"relation\":\"equals\",\"attribute\":\"state\",\"value\":\"AZ\"},{\"relation\":\"equals\",\"attribute\":\"state\",\"value\":\"NM\"}]}"
          },
          "contract": {
            "title": "Contract id",
            "type": "string",
            "description": "Required only if your account holds more than one contract. Sent with every request so the provider knows which entitlement to bill."
          },
          "skipUnmatched": {
            "title": "Skip unmatched ids",
            "type": "boolean",
            "description": "Leave unresolved identifiers out of the dataset entirely. By default they are stored with matched set to false, which is free, so you can see exactly which inputs failed to resolve.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Stop after this many records (1 to 25,000). You are charged per record returned. Note that the provider caps paging at an offset of 4,000 per filter set, so beyond that a run needs a narrower filter."
          },
          "pageSize": {
            "title": "Results per request",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "How many records to request per call (1 to 400, which is the provider's maximum)."
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own API token for the data provider. Required. Sent as a request header and never logged or placed in a URL."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}