{
  "version": "1.0.0",
  "exported_at": "2026-06-01T00:10:00.000Z",
  "project": {
    "name": "Google Maps Listing Scraper Germany",
    "description": "Best-effort Google Maps Germany listing scraper equivalent to the Octoparse template. Searches Google Maps for the keyword 'supermarket Germany', scrolls the infinite Google Maps results feed until the end-of-list message appears, then exports keyword, shop name, rating, review count, address/category line, overview, and main image URL. Google Maps may show consent, CAPTCHA, rate limits, or changed DOM selectors.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser viewport size",
      "position_x": 100,
      "position_y": 220,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 460,
      "position_y": 220,
      "config": {
        "url": "https://www.google.com/maps/search/supermarket+Germany?hl=de",
        "color": "bg-[#4589ff]",
        "tags": [
          "google-maps",
          "keyword-search",
          "germany"
        ]
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 820,
      "position_y": 220,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1180,
      "position_y": 220,
      "config": {
        "jsCode": "(() => { const labels = ['Alle akzeptieren', 'Ich stimme zu', 'Akzeptieren', 'Accept all', 'I agree', 'Accept cookies']; const candidates = Array.from(document.querySelectorAll('button, div[role=\"button\"], input[type=\"submit\"]')); const btn = candidates.find(el => labels.some(label => ((el.innerText || el.value || '').trim()).includes(label))); if (btn) { btn.click(); return 'clicked_consent'; } return 'no_consent_dialog_found'; })()",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1540,
      "position_y": 220,
      "config": {
        "duration": 2,
        "color": "bg-[#8d8d8d]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1900,
      "position_y": 220,
      "config": {
        "selector": "div[role=\"feed\"] a.hfpxzc, div[role=\"feed\"] div.Nv2PK",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "scroll-1",
      "block_type": "process",
      "title": "Scroll",
      "description": "Scroll page or element",
      "position_x": 2260,
      "position_y": 820,
      "config": {
        "selector": "div[role=\"feed\"]",
        "direction": "down",
        "amount": 2500,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2620,
      "position_y": 820,
      "config": {
        "duration": 2,
        "color": "bg-[#8d8d8d]"
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2980,
      "position_y": 540,
      "config": {
        "selector": "//span[contains(., \"Das Ende der Liste ist erreicht\") or contains(., \"You've reached the end of the list\")] | //div[contains(., \"Das Ende der Liste ist erreicht\") or contains(., \"You've reached the end of the list\")]",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 3340,
      "position_y": 540,
      "config": {
        "rowSelector": "div[role=\"feed\"] div.Nv2PK",
        "fileName": "google-maps-geschaefte-listing-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Keyword",
            "selector": "\"supermarket\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Name_des_Ladens",
            "selector": "ROW.querySelector('a.hfpxzc')?.getAttribute('aria-label') || ROW.querySelector('.qBF1Pd')?.textContent?.trim() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Kundenbewertung",
            "selector": "ROW.querySelector('.MW4etd')?.textContent?.trim() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Anzahl_der_Bewertungen",
            "selector": "(ROW.querySelector('.UY7F9')?.textContent || '').replace(/[()]/g, '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Adresse",
            "selector": "(() => { const texts = Array.from(ROW.querySelectorAll('.W4Efsd span, .fontBodyMedium span')).map(e => (e.textContent || '').trim()).filter(Boolean); return texts.find(t => t.includes('·') && !/^\\(?\\d+[,.]?\\d*\\)?$/.test(t)) || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Übersicht",
            "selector": "(() => { const texts = Array.from(ROW.querySelectorAll('.W4Efsd span, .fontBodyMedium span')).map(e => (e.textContent || '').trim()).filter(Boolean); const filtered = texts.filter(t => !t.includes('·') && !/^\\(?[\\d,.]+\\)?$/.test(t) && !/^Geschlossen|Geöffnet|Open|Closed/i.test(t)); return filtered[filtered.length - 1] || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Main_image",
            "selector": "ROW.querySelector('img[src*=\"googleusercontent.com\"]')?.src || ''",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 3700,
      "position_y": 540,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "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": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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": "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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "scroll-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-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 28,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 388,
      "position_y": 116,
      "width": 2480,
      "height": 896,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1108,
      "position_y": 116,
      "width": 1400,
      "height": 896,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1",
          "scroll-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 2908,
      "position_y": 436,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 3268,
      "position_y": 436,
      "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": 3628,
      "position_y": 436,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Google Maps Germany listing scraper equivalent to the Octoparse template. Searches Google Maps for the keyword 'supermarket Germany', scrolls the infinite Google Maps results feed until the end-of-list message appears, then exports keyword, shop name, rating, review count, address/category line, overview, and main image URL. Google Maps may show consent, CAPTCHA, rate limits, or changed DOM selectors.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(() => { const labels = ['Alle akzeptieren', 'Ich stimme zu', 'Akzeptieren', 'Accept all', 'I agree'...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1380,
      "position_y": 200,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `//span[contains(., \"Das Ende der Liste ist erreicht\") or contains(., \"You've reached the end of the list\")] | //div[cont`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 3180,
      "position_y": 520,
      "width": 340,
      "height": 170,
      "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 (Keyword, Name_des_Ladens, Kundenbewertung, Anzahl_der_Bewertungen, Adresse). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 3540,
      "position_y": 520,
      "width": 340,
      "height": 138,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    }
  ]
}