{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Phone Scraper",
    "description": "Phone numbers, addresses, websites, emails and opening hours for local businesses, by trade and city. Twenty-five columns on every row, including the Better Business Bureau letter grade, review counts and coordinates. Rows with no contact are free, and so are emails we fail to find.",
    "version": "0.1",
    "x-build-id": "ZWIwqI1ZgUcRsfdxy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lightmoon~local-business-phone-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lightmoon-local-business-phone-scraper",
        "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/lightmoon~local-business-phone-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lightmoon-local-business-phone-scraper",
        "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/lightmoon~local-business-phone-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lightmoon-local-business-phone-scraper",
        "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": [
          "searchTerms",
          "locations"
        ],
        "properties": {
          "searchTerms": {
            "title": "What kind of business",
            "minItems": 1,
            "type": "array",
            "description": "One trade or category per line — the words you would type into a directory. Each term is run against every location below, so three terms and four cities is twelve searches from two short lists.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Where",
            "minItems": 1,
            "type": "array",
            "description": "One place per line, as `City, ST`. A location is required: results are geolocated by the address the request comes from, so a search with no place in it would return businesses near the server rather than near you. To cover a large city fully, list its neighbourhoods as separate lines — the directories cap how much any single search can return.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Directories to search",
            "type": "array",
            "description": "Better Business Bureau carries the phone number, the A+ to F letter grade and the accreditation flag. DuckDuckGo adds the website, the opening hours and the review count. Both together give the fullest row; either alone still returns a phone number.",
            "items": {
              "type": "string",
              "enum": [
                "bbb",
                "duckduckgo"
              ],
              "enumTitles": [
                "Better Business Bureau — phone, letter grade, accreditation",
                "DuckDuckGo — website, opening hours, reviews"
              ]
            },
            "default": [
              "bbb",
              "duckduckgo"
            ]
          },
          "maxResultsPerSearch": {
            "title": "Maximum businesses per search",
            "minimum": 0,
            "type": "integer",
            "description": "Caps each term-and-location pair. The directories themselves stop at roughly 225 from Better Business Bureau and 21 from DuckDuckGo per search, so a higher number simply returns everything available. Set 0 for no cap of your own.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum businesses in total",
            "minimum": 0,
            "type": "integer",
            "description": "A ceiling for the whole run, across every search. Set 0 for no cap.",
            "default": 0
          },
          "onlyWithContact": {
            "title": "Store only businesses with a phone or website",
            "type": "boolean",
            "description": "Businesses without either are never charged for, whichever way this is set. Turn it on to keep them out of the export as well.",
            "default": false
          },
          "findEmails": {
            "title": "Look for email addresses on business websites",
            "type": "boolean",
            "description": "Reads the website of each business that has one and pulls out the email address and any social profiles. Charged only when an email is actually found — a website with none costs nothing. Measured hit rate on US trade businesses: around a third of the sites tried, which is roughly half of all rows. It roughly doubles how long a run takes.",
            "default": false
          },
          "followContactPage": {
            "title": "Also open one contact page per site",
            "type": "boolean",
            "description": "When the home page has no email, follow one link the site itself labels Contact or About. Adds about ten percentage points of hit rate and one extra request per site that needed it. Ignored unless the option above is on.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}