{
  "apiVersion": 1,
  "generatedAt": "2026-09-14T00:00:00+00:00",
  "slug": "local-business-profile-scraper",
  "botId": "local-business-profile-scraper",
  "configEncoding": "plain",
  "configDigest": "2bd85667352855564dd6b8b289c96fac25e32786fadf693e04b3f6d85b132411",
  "configBytes": 5046,
  "project": {
    "name": "Google Maps Local Business Scraper",
    "settings": {
      "urls": [
        "https://www.google.com/maps/?hl=en"
      ],
      "headless": false,
      "humanoidEnabled": false,
      "proxyEnabled": false,
      "captchaEnabled": false,
      "matchTimezoneAndLocale": false,
      "block_resources": false,
      "get_urls_from_sitemap": false,
      "respect_robots_txt": false,
      "skip_initial_navigation": false,
      "variables": [
        {
          "name": "search_term",
          "value": "coffee shops",
          "required": true,
          "is_list": false
        }
      ]
    },
    "datasets": {
      "Business_Details": {
        "item_selector": "",
        "properties": [
          {
            "name": "Category",
            "type": "text",
            "selector": "css=button[jsaction*='category']"
          },
          {
            "name": "Title",
            "type": "text",
            "selector": "css=h1"
          },
          {
            "name": "Amenities",
            "type": "html",
            "selector": "css=div[role=\"region\"][aria-label*=\"About\"]",
            "transformations": [
              {
                "type": "script",
                "code": "const regex = /aria-label=\"([^\"]+)\"/g;\nconst matches = [...value.matchAll(regex)].map(match => match[1]);\nreturn matches .join(\"\\n\");"
              }
            ]
          },
          {
            "name": "Phone",
            "type": "attribute",
            "selector": "css=[data-item-id*='phone']",
            "attribute": "aria-label",
            "transformations": [
              {
                "type": "replace"
              }
            ]
          },
          {
            "name": "Website",
            "type": "attribute",
            "selector": "css=[data-item-id*='authority']",
            "attribute": "href",
            "transformations": [
              {
                "type": "replace"
              }
            ]
          },
          {
            "name": "Menu",
            "type": "attribute",
            "selector": "css=[data-item-id='menu']",
            "attribute": "href"
          },
          {
            "name": "Price_Range",
            "type": "text",
            "selector": "css=table[aria-label='Price range histogram'] tr:first-child td:first-child"
          },
          {
            "name": "Rating",
            "type": "attribute",
            "selector": "css=[role='img'][aria-label*='stars' i]",
            "attribute": "aria-label",
            "transformations": [
              {
                "type": "regex",
                "pattern": "([\\d.,]+)",
                "default_value": ""
              }
            ]
          },
          {
            "name": "Reviews_Count",
            "type": "text",
            "selector": "css=[aria-label*='reviews' i]",
            "transformations": [
              {
                "type": "regex",
                "pattern": "([\\d,]+)",
                "default_value": ""
              }
            ]
          },
          {
            "name": "Address",
            "type": "attribute",
            "selector": "css=[data-item-id*='address' i]",
            "attribute": "aria-label",
            "transformations": [
              {
                "type": "replace"
              }
            ]
          },
          {
            "name": "Plus_Code",
            "type": "attribute",
            "selector": "css=[data-item-id='oloc']",
            "attribute": "aria-label",
            "transformations": [
              {
                "type": "replace"
              }
            ]
          }
        ]
      },
      "Map_Search_URLs": {
        "item_selector": "css=div[aria-label*='Results for '] div[role='article']",
        "properties": [
          {
            "name": "PlaceURL",
            "type": "attribute",
            "selector": "css=a[href*='/maps/place/']",
            "attribute": "href"
          }
        ]
      }
    },
    "commands": [
      {
        "command": "fill",
        "params": {
          "clear_before_fill": true,
          "selector": "css=input[name='q']",
          "value": "${search_term}"
        }
      },
      {
        "command": "wait_for_selector",
        "params": {
          "selector": "css=div[aria-label*='Results for '] div[role='article']"
        }
      },
      {
        "command": "infinite_scroll",
        "params": {
          "do": [],
          "max_scrolls": 0,
          "scroll_delay": 1500,
          "selector": "css=div[aria-label*='Results for ']"
        }
      },
      {
        "command": "extract_data",
        "params": {
          "dataset": "Map_Search_URLs"
        }
      },
      {
        "command": "for_each",
        "params": {
          "source_type": "dataset",
          "as": "item",
          "dataset": "Map_Search_URLs",
          "do": [
            {
              "command": "goto",
              "params": {
                "url": "${item.PlaceURL}"
              }
            },
            {
              "command": "wait_for_selector",
              "params": {
                "selector": "css=h1"
              }
            },
            {
              "command": "extract_data",
              "params": {
                "dataset": "Business_Details"
              }
            }
          ]
        }
      }
    ],
    "authors": []
  }
}