{
  "openapi": "3.0.1",
  "info": {
    "title": "Universal Business Directory Intelligence",
    "description": "Find, verify, enrich, qualify, and export businesses across multiple industries and locations using automatically selected sources or user-specified public directories. Results include contact details, source attribution, match quality, diagnostics, and CRM-ready CSV and XLSX exports.",
    "version": "0.6",
    "x-build-id": "H90AIfJsSeNvJyob1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adinfosys-labs~actor-6-directory-listing-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adinfosys-labs-actor-6-directory-listing-extractor",
        "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/adinfosys-labs~actor-6-directory-listing-extractor/runs": {
      "post": {
        "operationId": "runs-sync-adinfosys-labs-actor-6-directory-listing-extractor",
        "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/adinfosys-labs~actor-6-directory-listing-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-adinfosys-labs-actor-6-directory-listing-extractor",
        "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": {
          "sourceStrategy": {
            "title": "Source strategy",
            "enum": [
              "automatic",
              "specified"
            ],
            "type": "string",
            "description": "Automatic lets UBDIP select relevant directories and open-data sources. Specified lets you choose directory platforms or provide particular directory URLs.",
            "default": "automatic"
          },
          "search": {
            "title": "Business search",
            "required": [
              "industryCount",
              "keyword",
              "locationCount",
              "location",
              "country",
              "maxResults"
            ],
            "type": "object",
            "description": "Specify industries, services, products, or business types and one or more locations. UBDIP creates a fair multi-search matrix and returns the best matching businesses.",
            "properties": {
              "industryCount": {
                "title": "Number of industries",
                "description": "Enter how many industries, services, products, professions, or business types you will provide in the next field.",
                "type": "integer",
                "minimum": 1,
                "maximum": 25,
                "editor": "number"
              },
              "keyword": {
                "title": "Industries, services, products, or business types",
                "description": "Enter one or more industries, services, products, professions, or business types to find.",
                "type": "array",
                "editor": "stringList",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "minItems": 1,
                "maxItems": 25,
                "uniqueItems": true
              },
              "locationCount": {
                "title": "Number of locations",
                "description": "Enter how many cities, regions, states, or other target locations you will provide in the next field.",
                "type": "integer",
                "minimum": 1,
                "maximum": 25,
                "editor": "number"
              },
              "location": {
                "title": "Locations",
                "description": "Enter one or more cities, regions, states, or other target locations. Every keyword/location combination is searched.",
                "type": "array",
                "editor": "stringList",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "minItems": 1,
                "maxItems": 25,
                "uniqueItems": true
              },
              "country": {
                "title": "Country",
                "description": "Country applied to all listed locations.",
                "type": "string",
                "minLength": 1,
                "editor": "textfield"
              },
              "maxResults": {
                "title": "Maximum businesses",
                "description": "Request-wide maximum number of unique businesses. Multi-search requests reserve a fair share for every keyword/location combination before unused capacity is redistributed. Access diagnostics do not consume this limit.",
                "type": "integer",
                "minimum": 1,
                "maximum": 1000,
                "editor": "number"
              },
              "directories": {
                "title": "Requested directory platforms",
                "description": "Optional when Source strategy is Specified. Select one or more directory platforms. UBDIP resolves verified regional endpoints for the requested locations. Supported values include chambermaster, growthzone, bbb, openstreetmap, overture_places, and yelp.",
                "type": "array",
                "editor": "stringList",
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "uniqueItems": true
              },
              "maxResultsPerSearch": {
                "title": "Maximum candidates per search combination",
                "description": "Internal discovery limit for each industry/location combination. The final export still respects Maximum businesses.",
                "type": "integer",
                "minimum": 1,
                "maximum": 250,
                "editor": "number"
              },
              "maxCombinations": {
                "title": "Advanced search-combination safety limit",
                "description": "Optional advanced safety override. UBDIP normally calculates the required combinations automatically as the number of industries multiplied by the number of locations.",
                "type": "integer",
                "minimum": 1,
                "maximum": 625,
                "editor": "number"
              }
            },
            "additionalProperties": false
          },
          "directoryTargets": {
            "title": "Specific directory URLs",
            "type": "array",
            "description": "Optional URLs for Source strategy = Specified. Location and country scope each URL to the appropriate search combinations.",
            "items": {
              "type": "object",
              "properties": {
                "directory": {
                  "title": "Directory platform",
                  "type": "string",
                  "editor": "select",
                  "enum": [
                    "chambermaster",
                    "growthzone",
                    "bbb",
                    "generic_directory",
                    "yelp"
                  ],
                  "enumTitles": [
                    "ChamberMaster",
                    "GrowthZone",
                    "Better Business Bureau",
                    "Generic public directory",
                    "Yelp"
                  ],
                  "description": "Directory architecture or provider associated with this URL, for example chambermaster or growthzone."
                },
                "url": {
                  "title": "Public directory URL",
                  "type": "string",
                  "editor": "textfield",
                  "pattern": "^https?://",
                  "description": "Public directory endpoint that the Actor should search."
                },
                "location": {
                  "title": "Location scope",
                  "description": "Example: Rochester, NY. Leave empty only if the URL applies to every requested location.",
                  "type": "string",
                  "editor": "textfield"
                },
                "country": {
                  "title": "Country scope",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Country for which this directory endpoint should be used."
                }
              },
              "required": [
                "directory",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "startUrls": {
            "title": "Direct directory page URLs",
            "type": "array",
            "description": "Use this for direct directory intelligence when you already have one or more directory pages and do not need a keyword/location search matrix.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Directory page URL",
                  "type": "string",
                  "editor": "textfield",
                  "pattern": "^https?://",
                  "description": "Public business-directory URL to crawl directly. Use this option when the user provides a specific directory page."
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "mode": {
            "title": "Directory processing mode",
            "enum": [
              "auto",
              "generic_directory",
              "chambermaster",
              "growthzone",
              "bbb",
              "yelp"
            ],
            "type": "string",
            "description": "Auto-detect is recommended. Generic directory supports public directory pages that do not use a registered platform adapter.",
            "default": "auto"
          },
          "enableProfileEnrichment": {
            "title": "Enrich directory profile pages",
            "type": "boolean",
            "description": "Visit individual business profile pages to collect additional contact, location, category, and attribution information.",
            "default": true
          },
          "maxProfilePages": {
            "title": "Maximum profile pages",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum business profile pages to visit. This is a safety ceiling, not the expected number of exported businesses.",
            "default": 25
          },
          "enableWebsiteEnrichment": {
            "title": "Enrich official business websites",
            "type": "boolean",
            "description": "Visit official company websites to find additional business contact details and intelligence.",
            "default": true
          },
          "confidenceThreshold": {
            "title": "Minimum confidence score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum confidence score required for a business to be included in the exported results.",
            "default": 0
          },
          "outputColumnsMode": {
            "title": "Output detail level",
            "enum": [
              "default",
              "all"
            ],
            "type": "string",
            "description": "Customer columns provides a concise business table. Technical audit columns includes all diagnostic and processing fields.",
            "default": "default"
          },
          "outputCsv": {
            "title": "Create CSV",
            "type": "boolean",
            "description": "Create a CSV export containing the resulting business records.",
            "default": true
          },
          "outputXlsx": {
            "title": "Create XLSX workbook",
            "type": "boolean",
            "description": "Create an XLSX workbook containing request details, business results, source diagnostics, and the run summary.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}