{
  "version": "1.0.0",
  "exported_at": "2026-06-03T10:10:00.000Z",
  "project": {
    "name": "Google Maps advanced Scraper for Japan",
    "description": "Best-effort Google Maps Japan place-detail scraper equivalent to the Octoparse advanced template. Navigation strategy: multi-URL detail loop using navigate.urls + structured-export append + loop-continue; add all target Google Maps place URLs to navigate.urls. Extracts advanced place fields including Google ID, Place ID, coordinates, images, hours, Plus Code, amenities/about, and busy-hour bars. Google Maps may block scraping with CAPTCHA/consent/login prompts and uses unstable DOM; image host URLs can return 403 outside Maps.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 120,
      "position_y": 240,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 480,
      "position_y": 240,
      "config": {
        "urls": [
          "https://www.google.com/maps/place/%E4%B8%B8%E5%B1%B1%E3%82%B9%E3%83%9D%E3%83%BC%E3%83%84%E5%85%AC%E5%9C%92/data=!3m1!1e3!4b1!4m6!3m5!1s0x6019f4e7fc5908b3:0xe9034f4ff5da7611!8m2!3d34.8946167!4d138.7698977!16s%2Fg%2F1tr7jfn5?authuser=0&hl=ja&gl=jp&rclk=1"
        ],
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 840,
      "position_y": 240,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1200,
      "position_y": 240,
      "config": {
        "selector": "h1",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1560,
      "position_y": 240,
      "config": {
        "jsCode": "(function(){const clean=s=>(s||'').replace(/\\s+/g,' ').trim();const txt=()=>document.body.innerText||'';const uniq=a=>[...new Set(a.filter(Boolean))];const q=sel=>document.querySelector(sel);const getUrlParam=u=>{try{return new URL(u).searchParams.get('q')||u}catch(e){return u}};function addr(){return clean(q('[data-item-id=\"address\"] .Io6YTe,[data-item-id=\"address\"]')?.textContent)}function website(){const links=[...document.querySelectorAll('a[href]')];const a=links.find(a=>a.href.includes('google.com/url?q=')&&!a.href.includes('maps/contrib')&&!a.href.includes('support.google'));if(a)return getUrlParam(a.href);const b=links.find(a=>!a.href.includes('google.')&&!a.href.startsWith('tel:')&&String(a.className).includes('CsEnBe'));return b?.href||''}function phone(){return clean(q('[data-item-id^=\"phone\"] .Io6YTe,a[href^=\"tel:\"]')?.textContent)||((q('a[href^=\"tel:\"]')?.href||'').replace('tel:',''))}function coords(){let u=location.href,m=u.match(/!3d(-?\\d+(?:\\.\\d+)?)!4d(-?\\d+(?:\\.\\d+)?)/)||u.match(/@(-?\\d+(?:\\.\\d+)?),(-?\\d+(?:\\.\\d+)?)/);return m?[m[1],m[2]]:['','']}function photos(){return uniq([...document.images].map(i=>i.currentSrc||i.src).filter(s=>/googleusercontent\\.com/.test(s)))}function hoursRows(){return [...document.querySelectorAll('table.eK4R0e tr')].map(tr=>clean(tr.innerText))}function dayHour(re){return hoursRows().find(x=>re.test(x))||''}function busy(offset){const bars=[...document.querySelectorAll('.dpoVLd[aria-label]')].map(e=>e.getAttribute('aria-label'));return bars.slice(offset*24,offset*24+24).join(';')}function rating(){let a=q('[role=\"img\"][aria-label*=\"つ星\"]')?.getAttribute('aria-label')||'';let m=a.match(/([0-5](?:\\.\\d)?)/);if(m)return m[1];m=txt().match(/\\b([0-5]\\.\\d)\\s*\\(\\d/);return m?m[1]:''}function reviews(){let a=q('[aria-label*=\"件のクチコミ\"]')?.getAttribute('aria-label')||'';let m=a.match(/([\\d,]+)\\s*件/);if(m)return m[1].replace(/,/g,'');m=txt().match(/\\(([\\d,]+)\\)/);return m?m[1].replace(/,/g,''):''}function category(){return clean(q('button[jsaction*=\"category\"],button.DkEaL')?.innerText)}function placeId(){let h=document.documentElement.innerHTML;let m=h.match(/ChIJ[A-Za-z0-9_-]+/);return m?m[0]:''}function googleId(){let m=location.href.match(/!1s([^!]+)/);return m?decodeURIComponent(m[1]):''}function plus(){let x=clean(q('[data-item-id=\"oloc\"] .Io6YTe,[aria-label*=\"Plus Code\"] .Io6YTe')?.textContent);if(x)return x;let m=txt().match(/[23456789CFGHJMPQRVWX]{4}\\+[23456789CFGHJMPQRVWX]{2}(?:\\s+[^\\n]+)?/);return m?clean(m[0]):''}function state(){let m=addr().match(/(北海道|東京都|京都府|大阪府|.{2,3}県)/);return m?m[1]:''}function city(){let a=addr().replace(/^〒?\\d{3}-\\d{4}\\s*/,'');let s=state();if(!s)return '';let r=a.split(s)[1]||'';let m=r.match(/^([^市区町村]+[市区町村])/);return m?m[1]:''}function about(){return JSON.stringify(uniq([...document.querySelectorAll('[aria-label], .LTs0Rc')].map(e=>e.getAttribute('aria-label')||clean(e.textContent)).filter(s=>s&&s.length>1&&s.length<80&&!/クリック|コピー|写真|ルート|保存|共有|検索|ログイン|タブ/.test(s))))}window.__uscraperGmaps={clean,addr,website,phone,coords,photos,hoursRows,dayHour,busy,rating,reviews,category,placeId,googleId,plus,state,city,about,title:()=>clean(q('h1')?.innerText),scrapedAt:()=>new Date().toISOString(),status:()=>{let m=txt().match(/(24 時間営業|営業中|営業時間外|閉業|臨時休業)/);return m?m[1]:''},price:()=>{let m=txt().match(/[￥¥$]{1,4}|価格帯[:：]\\s*([^\\n]+)/);return m?m[0]:''},description:()=>{let h=[...document.querySelectorAll('[data-attrid], .PYvSYb, .WeS02d')].map(e=>clean(e.textContent)).find(s=>s.length>40&&s.length<500);return h||''},info:()=>''};})();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 240,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 240,
      "config": {
        "rowSelector": "body",
        "fileName": "Google-Maps-advanced-Scraper-for-Japan.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "キーワード",
            "selector": "window.__uscraperGmaps.category()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "タイトル",
            "selector": "window.__uscraperGmaps.title()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "レビュー数",
            "selector": "window.__uscraperGmaps.reviews()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "評価",
            "selector": "window.__uscraperGmaps.rating()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "住所",
            "selector": "window.__uscraperGmaps.addr()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Country",
            "selector": "'JP'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "City",
            "selector": "window.__uscraperGmaps.city()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "State",
            "selector": "window.__uscraperGmaps.state()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ウェブサイト",
            "selector": "window.__uscraperGmaps.website()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "電話番号",
            "selector": "window.__uscraperGmaps.phone()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間",
            "selector": "window.__uscraperGmaps.hoursRows().join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "店舗URL",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Google_id",
            "selector": "window.__uscraperGmaps.googleId()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Place_id",
            "selector": "window.__uscraperGmaps.placeId()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "追加情報",
            "selector": "window.__uscraperGmaps.info()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "緯度",
            "selector": "window.__uscraperGmaps.coords()[0]",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "経度",
            "selector": "window.__uscraperGmaps.coords()[1]",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "カテゴリー",
            "selector": "window.__uscraperGmaps.category()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "メイン写真",
            "selector": "window.__uscraperGmaps.photos()[0] || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "写真1",
            "selector": "window.__uscraperGmaps.photos()[1] || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "写真2",
            "selector": "window.__uscraperGmaps.photos()[2] || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "写真3",
            "selector": "window.__uscraperGmaps.photos()[3] || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "描述",
            "selector": "window.__uscraperGmaps.description()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "価格範囲",
            "selector": "window.__uscraperGmaps.price()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "店舗状態",
            "selector": "window.__uscraperGmaps.status()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Plus_code_URL",
            "selector": "window.__uscraperGmaps.plus()?('https://plus.codes/'+encodeURIComponent(window.__uscraperGmaps.plus())):''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Plus_code",
            "selector": "window.__uscraperGmaps.plus()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "デリバリーサービス",
            "selector": "(/デリバリー|宅配/.test(document.body.innerText)?'あり':'')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_月曜日",
            "selector": "window.__uscraperGmaps.dayHour(/月曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_火曜日",
            "selector": "window.__uscraperGmaps.dayHour(/火曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_水曜日",
            "selector": "window.__uscraperGmaps.dayHour(/水曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_木曜日",
            "selector": "window.__uscraperGmaps.dayHour(/木曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_金曜日",
            "selector": "window.__uscraperGmaps.dayHour(/金曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_土曜日",
            "selector": "window.__uscraperGmaps.dayHour(/土曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "営業時間_日曜日",
            "selector": "window.__uscraperGmaps.dayHour(/日曜日/)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_月曜日",
            "selector": "window.__uscraperGmaps.busy(0)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_火曜日",
            "selector": "window.__uscraperGmaps.busy(1)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_水曜日",
            "selector": "window.__uscraperGmaps.busy(2)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_木曜日",
            "selector": "window.__uscraperGmaps.busy(3)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_金曜日",
            "selector": "window.__uscraperGmaps.busy(4)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_土曜日",
            "selector": "window.__uscraperGmaps.busy(5)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "繁忙時間_日曜日",
            "selector": "window.__uscraperGmaps.busy(6)",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "about",
            "selector": "window.__uscraperGmaps.about()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ1",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ2",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ3",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ4",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ5",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ6",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ7",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ8",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ9",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "FAQ10",
            "selector": "''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "取得時刻",
            "selector": "window.__uscraperGmaps.scrapedAt()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2640,
      "position_y": 240,
      "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-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": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 136,
      "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": 408,
      "position_y": 136,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 136,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2208,
      "position_y": 136,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 2568,
      "position_y": 136,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Google Maps Japan place-detail scraper equivalent to the Octoparse advanced template. Navigation strategy: multi-URL detail loop using navigate.urls + structured-export append + loop-continue; add all target Google Maps place URLs to navigate.urls. Extracts advanced place fields including Google ID, Place ID, coordinates, images, hours, Plus Code, amenities/about, and busy-hour bars. Google Maps may block scraping with CAPTCHA/consent/login prompts and uses unstable DOM; image host URLs can return 403 outside Maps.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-navigate-1",
      "element_type": "note",
      "title": "Note: Navigate",
      "content": "Multi-URL loop over 1 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 680,
      "position_y": 220,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(function(){const clean=s=>(s||'').replace(/\\s+/g,' ').trim();const txt=()=>document.body.innerText|...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 220,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (キーワード, タイトル, レビュー数, 評価, 住所). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 220,
      "width": 340,
      "height": 122,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-loop-continue-1",
      "element_type": "note",
      "title": "Note: Loop Continue",
      "content": "Loop Continue advances a multi-URL or multi-text loop. Place at the end of the loop body with a clear back-edge to the loop start.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 220,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}