{
  "version": "1.0.0",
  "exported_at": "2026-05-31T18:30:00.000Z",
  "project": {
    "name": "Detail page_Houzz Professional",
    "description": "Scrapes Houzz professional detail pages by URL and exports one row per profile: name, rating star, number of reviews, website, address, license number, description, page URL, typical job costs, and phone. Uses a multi-URL navigation loop so multiple Houzz profile URLs can be processed in one run. Note: Houzz /trk/ URLs may redirect to external business websites; use canonical houzz.com/professionals/... profile URLs for best results.",
    "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": 260,
      "config": {
        "urls": [
          "https://www.houzz.com/professionals/decks-patios-and-outdoor-enclosures/deckwerks-inc-pfvwus-pf~2081350033",
          "https://www.houzz.com/professionals/decks-patios-and-outdoor-enclosures/hamlen-home-improvement-pfvwus-pf~1259902518",
          "https://www.houzz.com/professionals/decks-patios-and-outdoor-enclosures/above-board-construction-pfvwus-pf~1924119374"
        ],
        "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": 480,
      "position_y": 260,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 840,
      "position_y": 260,
      "config": {
        "selector": "h1",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "jsCode": "(() => { const btn = [...document.querySelectorAll('button')].find(b => /read more/i.test((b.textContent || '').trim()) || b.getAttribute('data-component') === 'Read More'); if (btn) btn.click(); return true; })();",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "rowSelector": "body",
        "fileName": "houzz_professional_product_scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "Name",
            "selector": "(() => { const el = ROW.querySelector(\"header[data-container='Basic Pro Info'] h1\") || ROW.querySelector('h1'); return el ? el.textContent.trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Rating_Star",
            "selector": "(() => { const n = ROW.querySelector(\"header[data-container='Basic Pro Info'] .hz-star-rate__rating-number\"); if (n) return n.textContent.trim(); const sr = ROW.querySelector(\"header[data-container='Basic Pro Info'] .sr-only\")?.textContent || ''; const m = sr.match(/Average rating:\\s*([0-9.]+)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Number_of_Reviews",
            "selector": "(() => { const el = ROW.querySelector(\"header[data-container='Basic Pro Info'] .hz-star-rate__review-string\"); if (el) return el.textContent.trim(); const text = ROW.querySelector(\"header[data-container='Basic Pro Info']\")?.innerText || ''; const m = text.match(/([0-9,]+\\s+Reviews?)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Website",
            "selector": "(() => { const root = ROW.querySelector('#business') || ROW; const h = [...root.querySelectorAll('h3')].find(e => e.textContent.trim().toLowerCase() === 'website'); if (h) { let el = h.parentElement; for (let d = 0; d < 6 && el; d++, el = el.parentElement) { const a = [...el.querySelectorAll('a[href]')].find(x => !x.href.includes('#')); if (a) return a.href; } } const text = (root.innerText || root.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/Website\\s+(.*?)\\s+Address/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Address",
            "selector": "(() => { const root = ROW.querySelector('#business') || ROW; const text = (root.innerText || root.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/Address\\s+(.*?)\\s+(Typical Job Cost|License Number|Followers|Socials|Back to Navigation|Credentials)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "License_Number",
            "selector": "(() => { const root = ROW.querySelector('#business') || ROW; const text = (root.innerText || root.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/License Number\\s+(.*?)\\s+(Followers|Socials|Back to Navigation|Credentials|Reviews)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Description",
            "selector": "(() => { const root = ROW.querySelector('#about-us') || ROW.querySelector(\"[data-container='About Us']\") || ROW; let text = (root.innerText || root.textContent || '').replace(/\\s+/g, ' ').trim(); text = text.replace(/^Back to Navigation\\s*/i, '').replace(/^About Us\\s*/i, '').replace(/\\s*Read More\\s*$/i, '').trim(); return text; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Page_URL",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Typical_Job_Costs",
            "selector": "(() => { const root = ROW.querySelector('#business') || ROW; const text = (root.innerText || root.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/Typical Job Cost\\s+(.*?)\\s+(License Number|Followers|Socials|Back to Navigation|Credentials)/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Phone",
            "selector": "(() => { const root = ROW.querySelector('#business') || ROW; const text = (root.innerText || root.textContent || '').replace(/\\s+/g, ' ').trim(); const m = text.match(/Phone Number\\s+(.*?)\\s+Website/i); return m ? m[1].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2280,
      "position_y": 260,
      "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": "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-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 156,
      "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": 1128,
      "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": 1848,
      "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": 2208,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Houzz professional detail pages by URL and exports one row per profile: name, rating star, number of reviews, website, address, license number, description, page URL, typical job costs, and phone. Uses a multi-URL navigation loop so multiple Houzz profile URLs can be processed in one run. Note: Houzz /trk/ URLs may redirect to external business websites; use canonical houzz.com/professionals/... profile URLs for best results.",
      "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 btn = [...document.querySelectorAll('button')].find(b => /read more/i.test((b.textCon...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1400,
      "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 (Name, Rating_Star, Number_of_Reviews, Website, Address). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 240,
      "width": 340,
      "height": 132,
      "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": 2480,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}