{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Local Leads — Email, Phone, Website & Brazil CNPJ",
    "description": "Turn any Google Maps search into a contact-ready lead list: name, category, phone, website, email, full address and GPS. For Brazilian businesses it also resolves the CNPJ and the public registry. Pay per result.",
    "version": "0.1",
    "x-build-id": "IHMd1ycqOAFKkcz3a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/paulovitor18~google-maps-local-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-paulovitor18-google-maps-local-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/paulovitor18~google-maps-local-leads/runs": {
      "post": {
        "operationId": "runs-sync-paulovitor18-google-maps-local-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/paulovitor18~google-maps-local-leads/run-sync": {
      "post": {
        "operationId": "run-sync-paulovitor18-google-maps-local-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": {
          "search_term": {
            "title": "Search term",
            "type": "string",
            "description": "What to look for on Google Maps, exactly as you would type it (e.g. \"restaurants\", \"dental clinics\", \"pharmacies\").",
            "default": "restaurants"
          },
          "location": {
            "title": "City / area",
            "type": "string",
            "description": "City and area to search (e.g. \"Austin, TX\", \"Berlin\", \"São Paulo, SP\"). The more specific, the sharper the result. Works on any Google Maps search worldwide.",
            "default": "Austin, TX"
          },
          "max_results": {
            "title": "Maximum businesses",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Cap of businesses delivered in this run (cost control). Google Maps usually lists ~120 per search; narrow the term and city to sweep beyond that. For large sweeps, prefer turning the detail step OFF (below) — without it the crawl is fast even with many results.",
            "default": 25
          },
          "hydrate_details": {
            "title": "Fetch contact details for each business (phone, website, postal code) — opens each listing (slower)",
            "type": "boolean",
            "description": "Opens the detail listing of every business to pull phone, website, full address, postal code and precise GPS. This is the step that produces a real lead, and it is the most expensive one (one extra page load per business). Turn it off for a fast sweep with only name, category, rating and approximate location.",
            "default": true
          },
          "max_hydrations": {
            "title": "Cap of detail listings opened",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Limits how many detail listings are opened (the expensive step above). It is the time bottleneck: each listing is one page load, measured at ~9s. The default (25) is set so a default run finishes well inside Apify's 5-minute daily health check; raise it up to 100 for bigger sweeps, and run in batches by term and city beyond that.",
            "default": 25
          },
          "enrich_from_website": {
            "title": "Enrich from the business website (email, socials, and Brazilian CNPJ registry)",
            "type": "boolean",
            "description": "When the business has a website, visits it once to find email, social links and — for Brazilian businesses — the CNPJ. With a valid CNPJ the public registry is queried (legal name, registration status, company size, share capital, activity, partners). It is best-effort: many sites do not publish contact details in scrapable text, and outside Brazil there is no CNPJ to find. In those cases the field comes back empty and you are NOT charged for the enrichment.",
            "default": true
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Network routing. The default (Apify Proxy, rotating datacenter) was measured returning 200 on Google Maps with no captcha. If you see blocking or a consent wall at volume, select Residential and a country close to your target area.",
            "default": {
              "useApifyProxy": true
            }
          },
          "self_test": {
            "title": "Diagnostic mode (fixture-pack regression)",
            "type": "boolean",
            "description": "Not for production. Skips the search and runs the known-answers battery (frozen feed parsing, empty search, website enrichment, honest abstention, block-is-not-empty) to prove that the parser and the network egress are still correct. Emits a single diagnostic record.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}