{
  "openapi": "3.0.1",
  "info": {
    "title": "Business Directory Lead Intelligence & Contact Extractor",
    "description": "Discover businesses from online directories and extract company profiles, contact details, websites, categories, locations, and business intelligence. Export CRM-ready lead databases in CSV, Excel, JSON, Google Sheets, and API-ready formats.",
    "version": "0.1",
    "x-build-id": "ltrxBCKr5FtsszS2y"
  },
  "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",
        "required": [
          "mode",
          "startUrls"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "embedded_js",
              "dom"
            ],
            "type": "string",
            "description": "Extraction mode. Use embedded_js for JS-embedded listing objects. Use dom for HTML listing cards.",
            "default": "embedded_js"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more directory/map pages to crawl.",
            "default": [
              {
                "url": "https://regenerationcanada.org/en/map/"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxListings": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety cap for number of dataset items produced.",
            "default": 500
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap for number of pages visited.",
            "default": 1
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Print verbose logs for troubleshooting (responses, taxonomy detection, counts).",
            "default": false
          },
          "outputCsv": {
            "title": "Export CSV",
            "type": "boolean",
            "description": "Generate output.csv in the run output (in addition to dataset).",
            "default": true
          },
          "outputXlsx": {
            "title": "Export XLSX",
            "type": "boolean",
            "description": "Generate output.xlsx in the run output (in addition to dataset).",
            "default": true
          },
          "outputColumnsMode": {
            "title": "Output columns mode",
            "enum": [
              "default",
              "all"
            ],
            "type": "string",
            "description": "default = core columns only, all = includes extra fields (address, quote, logo, etc.).",
            "default": "default"
          },
          "outputBaseName": {
            "title": "Output base name",
            "type": "string",
            "description": "Base name for exported files (without extension).",
            "default": "output"
          },
          "embedded": {
            "title": "Embedded extraction",
            "type": "object",
            "description": "Controls extraction of embedded JSON/LD data and mapping to output fields.",
            "properties": {
              "enabled": {
                "title": "Enable embedded extraction",
                "description": "If true, the Actor will try to extract embedded JSON/LD data (e.g., JSON-LD, script tags) and map it using fieldMap.",
                "type": "boolean",
                "default": true
              },
              "preferJsonLd": {
                "title": "Prefer JSON-LD",
                "description": "If true, prefer schema.org JSON-LD blocks when multiple embedded formats are present.",
                "type": "boolean",
                "default": true
              },
              "fieldMap": {
                "title": "Field map",
                "description": "Map raw embedded keys to your output field names. Keys are source keys, values are output fields.",
                "type": "object",
                "editor": "json",
                "default": {
                  "name": "entity_name",
                  "loc": "location",
                  "address": "address",
                  "lat": "lat",
                  "lng": "lng",
                  "email": "email",
                  "tel": "phone",
                  "website": "website",
                  "pageURL": "profile_url",
                  "categories": "categories",
                  "products": "products",
                  "services": "services",
                  "buy": "how_to_buy",
                  "size": "size",
                  "results": "results",
                  "quote": "quote",
                  "logo": "logo",
                  "logoMedium": "logo_medium"
                },
                "additionalProperties": true
              }
            },
            "default": {
              "enabled": true,
              "preferJsonLd": true,
              "fieldMap": {
                "name": "entity_name",
                "loc": "location",
                "address": "address",
                "lat": "lat",
                "lng": "lng",
                "email": "email",
                "tel": "phone",
                "website": "website",
                "pageURL": "profile_url",
                "categories": "categories",
                "products": "products",
                "services": "services",
                "buy": "how_to_buy",
                "size": "size",
                "results": "results",
                "quote": "quote",
                "logo": "logo",
                "logoMedium": "logo_medium"
              }
            },
            "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}