{
  "version": "1.0.0",
  "exported_at": "2026-06-01T10:56:00.000Z",
  "project": {
    "name": "Suumo Detached House Details Scraper",
    "description": "Extracts detached-house property details from SUUMO detail URLs. Uses multi-URL navigation with loop-continue and appends one CSV row per URL. The provided sample URLs currently return SUUMO expired/error pages, so the template detects unavailable pages, records page_status, and leaves property/image fields blank instead of capturing error-page assets. For valid current SUUMO detached-house detail pages, it uses JavaScript label lookup against Japanese table/definition labels such as 所在地, 価格, 交通, 土地面積, 建物面積, and 用途地域. No listing pagination applies because this is a detail-page via URL workflow.",
    "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": 260,
      "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": 260,
      "config": {
        "urls": [
          "https://suumo.jp/chukoikkodate/hokkaido_/sc_sapporoshihigashi/nc_98174705/",
          "https://suumo.jp/chukoikkodate/hokkaido_/sc_sapporoshiminami/nc_98392210/",
          "https://suumo.jp/chukoikkodate/hokkaido_/sc_sapporoshihigashi/nc_70066485/"
        ],
        "color": "bg-[#4589ff]"
      }
    },
    {
      "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": 260,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "duration": 1,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "jsCode": "(() => { const norm = s => (s || '').replace(/\\s+/g, ' ').trim(); const text = () => document.body?.innerText || ''; const unavailable = () => document.title.includes('エラー') || text().includes('掲載が終了') || text().includes('ご覧いただけません') || text().includes('お探しの情報'); const valueByLabels = labels => { if (unavailable()) return ''; for (const label of labels) { for (const tr of document.querySelectorAll('tr')) { const h = [...tr.querySelectorAll('th,dt')].find(e => norm(e.textContent).includes(label)); if (h) { const cells = [...tr.children].filter(e => e !== h && e.tagName !== 'TH'); const v = norm(cells.map(e => e.textContent).join(' ')); if (v) return v; } } for (const dt of document.querySelectorAll('dt')) { if (norm(dt.textContent).includes(label)) { const dd = dt.nextElementSibling; const v = norm(dd?.textContent); if (v) return v; } } } return ''; }; const images = () => { if (unavailable()) return []; return [...new Set([...document.images].map(img => img.currentSrc || img.src).filter(Boolean).map(u => new URL(u, location.href).href).filter(u => !/gifanime_suumo_gomen|inc_CM|pagetop|logo|icon|btn|sprite|header|footer|map|blank|recruit/i.test(u)))]; }; const name = () => unavailable() ? '' : norm(document.querySelector('h1')?.textContent || document.querySelector('[class*=property_view] h1')?.textContent || document.title.replace('｜SUUMO(スーモ)', '')); const desc = () => { if (unavailable()) return ''; for (const sel of ['.property_view_note-body','.property_view_note','.cassettepoint','.pointBody','.point-body','[class*=point]']) { const v = norm(document.querySelector(sel)?.textContent); if (v && v.length > 10) return v; } return norm(document.querySelector('meta[name=\"description\"]')?.content || ''); }; window.__uscraperSuumo = { norm, unavailable, status: () => unavailable() ? 'expired_or_unavailable' : 'active_or_unknown', valueByLabels, images, image: i => images()[i] || '', name, desc }; })();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 260,
      "config": {
        "rowSelector": "body",
        "fileName": "suumo-detached-house-details-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "property_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "page_status",
            "selector": "window.__uscraperSuumo?.status?.() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "property_name",
            "selector": "window.__uscraperSuumo?.name?.() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "property_type",
            "selector": "window.__uscraperSuumo?.unavailable?.() ? '' : (window.__uscraperSuumo?.valueByLabels?.(['物件種別','種別']) || (location.href.includes('/chukoikkodate/') ? '中古一戸建て' : ''))",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "description",
            "selector": "window.__uscraperSuumo?.desc?.() || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "information_provided_date",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['情報提供日','情報提供']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "next_update_date",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['次回更新日','更新日']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "image_1",
            "selector": "window.__uscraperSuumo?.image?.(0) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "image_2",
            "selector": "window.__uscraperSuumo?.image?.(1) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "image_3",
            "selector": "window.__uscraperSuumo?.image?.(2) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "image_4",
            "selector": "window.__uscraperSuumo?.image?.(3) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "image_5",
            "selector": "window.__uscraperSuumo?.image?.(4) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "extracted_at_1",
            "selector": "new Date().toISOString()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "location",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['所在地','住所']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "price",
            "selector": "window.__uscraperSuumo?.unavailable?.() ? '' : ((document.querySelector('[class*=price]')?.textContent || '').replace(/\\s+/g, ' ').trim() || window.__uscraperSuumo?.valueByLabels?.(['価格','販売価格']) || '')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "transportation",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['交通']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "private_road_area",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['私道負担・道路','私道負担','私道面積','道路']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "floor_plan",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['間取り']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "building_area",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['建物面積','建築面積']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "land_area",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['土地面積','敷地面積']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "coverage_floor_area_ratio",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['建ぺい率・容積率','建ぺい率/容積率','建ぺい率と容積率','容積率']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "built_date",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['築年月','完成時期','築年数']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "land_rights",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['土地権利']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "building_structure",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['構造・工法','建物構造','構造']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "zoning",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['用途地域']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "registered_land_category",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['登記簿地目','地目']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "remarks_1",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['その他制限事項','法令上の制限','備考']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "remarks_2",
            "selector": "window.__uscraperSuumo?.valueByLabels?.(['設備','その他概要','引渡し','駐車場']) || ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "member_name",
            "selector": "window.__uscraperSuumo?.unavailable?.() ? '' : (window.__uscraperSuumo?.valueByLabels?.(['会社名','販売会社','情報提供元','取扱会社']) || ((document.body.innerText || '').match(/[^\\n]*(?:\\(株\\)|株式会社|有限会社)[^\\n]*/)?.[0] || '').trim())",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "contact",
            "selector": "window.__uscraperSuumo?.unavailable?.() ? '' : (window.__uscraperSuumo?.valueByLabels?.(['問い合わせ先','お問い合せ先','TEL','電話']) || ((document.body.innerText || '').match(/TEL[:：]?\\s*[0-9０-９\\-－]+/i)?.[0] || '').trim())",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "extracted_at_2",
            "selector": "new Date().toISOString()",
            "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": 260,
      "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": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-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": 156,
      "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": 156,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 156,
      "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": 156,
      "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": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Extracts detached-house property details from SUUMO detail URLs. Uses multi-URL navigation with loop-continue and appends one CSV row per URL. The provided sample URLs currently return SUUMO expired/error pages, so the template detects unavailable pages, records page_status, and leaves property/image fields blank instead of capturing error-page assets. For valid current SUUMO detached-house detail pages, it uses JavaScript label lookup against Japanese table/definition labels such as 所在地, 価格, 交通, 土地面積, 建物面積, and 用途地域. No listing pagination applies because this is a detail-page via URL workflow.",
      "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 3 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 680,
      "position_y": 240,
      "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: `(() => { const norm = s => (s || '').replace(/\\s+/g, ' ').trim(); const text = () => document.body?....` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 240,
      "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 (property_url, page_status, property_name, property_type, description). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 240,
      "width": 340,
      "height": 136,
      "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": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}