{
  "version": "1.0.0",
  "exported_at": "2026-05-31T00:00:00.000Z",
  "project": {
    "name": "Google Maps Scraper",
    "description": "Best-effort Google Maps search-results scraper equivalent to the Octoparse Google Maps Scraper. Default target is a sample Google Maps query for restaurants in New York; edit the Navigate URL to your desired keyword/location. Google Maps uses an infinite-scroll results feed and the end-of-list text is not reliable across locales/sessions, so this template performs a bounded sequence of results-pane scrolls before exporting loaded business listings to google-maps-scraper.csv. Extracted fields include business name, rating, review count, category, address, phone if visible, website if visible, place URL, open/status text, visible email if present, and full listing text. Limitations: Google Maps is heavily dynamic, may show cookie consent/CAPTCHA, uses changing class names, may virtualize results, and emails/websites/phones are often not displayed directly in search-result cards.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "url": "https://www.google.com/maps/search/restaurants+in+New+York/",
        "color": "bg-[#4589ff]",
        "tags": [
          "google-maps",
          "lead-generation"
        ]
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 456,
      "position_y": 220,
      "config": {
        "timeout": 45
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "selector": "button[aria-label='Accept all'], button[aria-label='I agree'], button[aria-label='Accept']"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 1128,
      "position_y": 520,
      "config": {
        "selector": "button[aria-label='Accept all'], button[aria-label='I agree'], button[aria-label='Accept']",
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "selector": "div[role='feed'], div.Nv2PK, div[role='article']",
        "timeout": 45,
        "visible": true
      }
    },
    {
      "block_id": "scroll-1",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 2136,
      "position_y": 520,
      "config": {
        "selector": "div[role='feed']",
        "direction": "down",
        "amount": 2500
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2472,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "scroll-2",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 2808,
      "position_y": 520,
      "config": {
        "selector": "div[role='feed']",
        "direction": "down",
        "amount": 2500
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3144,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "scroll-3",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 3480,
      "position_y": 520,
      "config": {
        "selector": "div[role='feed']",
        "direction": "down",
        "amount": 2500
      }
    },
    {
      "block_id": "sleep-4",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3816,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "scroll-4",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 4152,
      "position_y": 520,
      "config": {
        "selector": "div[role='feed']",
        "direction": "down",
        "amount": 2500
      }
    },
    {
      "block_id": "sleep-5",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 4488,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "scroll-5",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll the page or element",
      "position_x": 4824,
      "position_y": 520,
      "config": {
        "selector": "div[role='feed']",
        "direction": "down",
        "amount": 2500
      }
    },
    {
      "block_id": "sleep-6",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 5160,
      "position_y": 520,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 5496,
      "position_y": 520,
      "config": {
        "selector": "div[role='article'], div.Nv2PK",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 5832,
      "position_y": 520,
      "config": {
        "rowSelector": "div[role='article'], div.Nv2PK",
        "fileName": "google-maps-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "create",
        "columns": [
          {
            "name": "business_name",
            "selector": ".qBF1Pd, .fontHeadlineSmall",
            "attribute": "text"
          },
          {
            "name": "rating",
            "selector": "span.MW4etd",
            "attribute": "text"
          },
          {
            "name": "review_count",
            "selector": "span.UY7F9",
            "attribute": "text"
          },
          {
            "name": "category",
            "selector": "(() => { const clean = s => (s || '').replace(/[\\uE000-\\uF8FF]/g, '').replace(/\\s+/g, ' ').trim(); const lines = (ROW.innerText || '').split('\\n').map(clean).filter(Boolean); const detail = lines.find(l => l.includes('·') && !/^[0-5](\\.\\d)?\\s*\\(?[\\d,]+\\)?/.test(l) && !/^\\$/.test(l) && !/review/i.test(l)) || ''; const parts = detail.split('·').map(clean).filter(Boolean); return parts.find(p => !/^\\$/.test(p) && !/\\d{1,6}\\s+[A-Za-z0-9]/.test(p) && !/open|closed|opens|closes|24 hours/i.test(p)) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "(() => { const clean = s => (s || '').replace(/[\\uE000-\\uF8FF]/g, '').replace(/\\s+/g, ' ').trim(); const lines = (ROW.innerText || '').split('\\n').map(clean).filter(Boolean); const detail = lines.find(l => l.includes('·') && /\\d{1,6}\\s+[A-Za-z0-9]/.test(l) && !/^[0-5](\\.\\d)?\\s*\\(?[\\d,]+\\)?/.test(l)) || lines.find(l => /\\d{1,6}\\s+[A-Za-z0-9]/.test(l) && !/review|open|closed|opens|closes/i.test(l)) || ''; const parts = detail.split('·').map(clean).filter(Boolean); return parts.find(p => /\\d{1,6}\\s+[A-Za-z0-9]/.test(p) && !/review|open|closed|opens|closes/i.test(p)) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "phone",
            "selector": "(() => { const m = (ROW.innerText || '').match(/(?:\\+?\\d[\\d\\s().-]{7,}\\d)/); return m ? m[0].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "a[data-value='Website'], a[aria-label^='Website'], a[href^='http']:not([href*='google.com/maps'])",
            "attribute": "href"
          },
          {
            "name": "place_url",
            "selector": "a.hfpxzc, a[href*='/maps/place/'], a[href*='google.com/maps']",
            "attribute": "href"
          },
          {
            "name": "status_hours",
            "selector": "(() => { const parts = (ROW.innerText || '').split('\\n').map(s => s.trim()).filter(Boolean); return parts.find(p => /open|closed|opens|closes|24 hours/i.test(p)) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "email",
            "selector": "(() => { const m = (ROW.innerText || '').match(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/i); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "listing_text",
            "selector": "",
            "attribute": "text"
          }
        ]
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 6168,
      "position_y": 520,
      "config": {}
    }
  ],
  "connections": [
    {
      "from_block_id": "navigate-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-1",
      "from_connector_id": "right",
      "to_block_id": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "from_connector_id": "right",
      "to_block_id": "scroll-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "scroll-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-2",
      "from_connector_id": "right",
      "to_block_id": "sleep-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-3",
      "from_connector_id": "right",
      "to_block_id": "scroll-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-3",
      "from_connector_id": "right",
      "to_block_id": "sleep-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-4",
      "from_connector_id": "right",
      "to_block_id": "scroll-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-4",
      "from_connector_id": "right",
      "to_block_id": "sleep-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-5",
      "from_connector_id": "right",
      "to_block_id": "scroll-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "scroll-5",
      "from_connector_id": "right",
      "to_block_id": "sleep-6",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-6",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-2",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 5696,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "sleep-2",
          "sleep-3",
          "sleep-4",
          "sleep-5",
          "sleep-6",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 720,
      "position_y": 116,
      "width": 656,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 2064,
      "position_y": 416,
      "width": 3008,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "scroll-1",
          "scroll-2",
          "scroll-3",
          "scroll-4",
          "scroll-5"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 5760,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 6096,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Google Maps search-results scraper equivalent to the Octoparse Google Maps Scraper. Default target is a sample Google Maps query for restaurants in New York; edit the Navigate URL to your desired keyword/location. Google Maps uses an infinite-scroll results feed and the end-of-list text is not reliable across locales/sessions, so this template performs a bounded sequence of results-pane scrolls before exporting loaded business listings to google-maps-scraper.csv. Extracted fields include business name, rating, review count, category, address, phone if visible, website if visible, place URL, open/status text, visible email if present, and full listing text. Limitations: Google Maps is heavily dynamic, may show cookie consent/CAPTCHA, uses changing class names, may virtualize results, and emails/websites/phones are often not displayed directly in search-result cards.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `button[aria-label='Accept all'], button[aria-label='I agree'], button[aria-label='Accept']`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 992,
      "position_y": 200,
      "width": 340,
      "height": 160,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (category, address, phone, status_hours, email). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 6032,
      "position_y": 500,
      "width": 340,
      "height": 129,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    }
  ]
}