{
  "version": "1.0.0",
  "exported_at": "2026-05-31T11:10:00.000Z",
  "project": {
    "name": "Zillow Listing Scraper by URL",
    "description": "Scrapes Zillow property detail pages by URL and exports Octoparse-equivalent fields: keyword/state, image_url, house_url, price, bedrooms, bathrooms, square_feet, status, address, mls_id, and listing_by. Navigation strategy: multi-URL input loop using navigate.urls[] plus loop-continue, appending all rows to zillow-scraper.csv. Selectors rely mainly on stable meta tags, h1 address, current URL, visible MLS text, and JavaScript parsing of Zillow embedded JSON because Zillow uses dynamic/hydrated markup and frequently-changing class names. Zillow may show anti-bot, CAPTCHA, cookie, or regional access controls; this is a best-effort public-page template.",
    "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 size",
      "position_x": 120,
      "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": 480,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.zillow.com/homedetails/62-Albemarle-St-Buffalo-NY-14207/30149172_zpid/",
          "https://www.zillow.com/homedetails/7667-River-Rd-Mount-Morris-NY-14510/30817158_zpid/",
          "https://www.zillow.com/homedetails/1112-Patricia-Ave-West-Islip-NY-11795/59658479_zpid/",
          "https://www.zillow.com/homedetails/30-Cardinal-Ave-Albany-NY-12208/29651683_zpid/",
          "https://www.zillow.com/homedetails/44-Madeline-Rd-Ridge-NY-11961/59479462_zpid/",
          "https://www.zillow.com/homedetails/1803-Rockport-Ct-1803-East-Greenbush-NY-12061/2056585583_zpid/",
          "https://www.zillow.com/homedetails/4-Tomkins-Ridge-Rd-Tomkins-Cove-NY-10986/32397033_zpid/",
          "https://www.zillow.com/homedetails/52-Lakeview-Ave-Jamestown-NY-14701/29888560_zpid/",
          "https://www.zillow.com/homedetails/20-Huntingdale-Way-Middle-Island-NY-11953/59495434_zpid/",
          "https://www.zillow.com/homedetails/43-Brendan-Ave-Buffalo-NY-14217/30395008_zpid/"
        ],
        "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": 220,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "jsCode": "(() => { const buttons = Array.from(document.querySelectorAll('button,[role=\"button\"],input[type=\"button\"],input[type=\"submit\"]')); const btn = buttons.find(el => /^(accept|agree|allow|got it|continue|close)$/i.test((el.textContent || el.value || el.getAttribute('aria-label') || '').trim())); if (btn) btn.click(); return btn ? 'cookie_or_modal_button_clicked' : 'no_cookie_or_modal_button_found'; })();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "duration": 1,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "selector": "h1",
        "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": 220,
      "config": {
        "rowSelector": "body",
        "fileName": "zillow-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "keyword",
            "selector": "(() => { const crumbs = Array.from(document.querySelectorAll('a')).map(a => ({ t: (a.textContent || '').trim(), h: a.getAttribute('href') || '' })); const state = crumbs.find(x => /^\\/[a-z]{2}\\/$/i.test(x.h)); if (state && state.t) return state.t.toLowerCase(); const addr = document.querySelector('h1')?.textContent || document.querySelector('meta[property=\"og:title\"]')?.content || ''; const m = addr.match(/,\\s*([A-Z]{2})\\s+\\d{5}/); return m ? m[1].toLowerCase() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "image_url",
            "selector": "(() => document.querySelector('meta[property=\"og:image\"]')?.content || document.querySelector('img[src*=\"zillowstatic.com/fp\"]')?.src || document.querySelector('img[src*=\"maps.googleapis.com/maps/api/streetview\"]')?.src || '')()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "house_url",
            "selector": "(() => document.querySelector('meta[property=\"og:url\"]')?.content || location.href)()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "price",
            "selector": "(() => { const html = document.documentElement.innerHTML; const txt = document.body.innerText || ''; const selectors = ['[data-testid=\"price\"]', 'span[data-testid=\"price\"]', '.ds-price', '.price']; for (const s of selectors) { const v = document.querySelector(s)?.textContent?.trim(); if (v && /\\$/.test(v)) return v; } const jsonMatch = html.match(/\"price\"\\s*:\\s*\"?(\\$?[\\d,]{3,})\"?/i) || html.match(/\"unformattedPrice\"\\s*:\\s*(\\d{4,})/i); if (jsonMatch) { const v = jsonMatch[1]; return v.startsWith('$') ? v : '$' + Number(v).toLocaleString('en-US'); } const m = txt.match(/\\$[\\d,]{3,}/); return m ? m[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "bedroom_s_",
            "selector": "(() => document.querySelector('meta[name=\"zillow_fb:beds\"],meta[property=\"zillow_fb:beds\"]')?.content || ((document.body.innerText || '').match(/(\\d+(?:\\.\\d+)?)\\s*(?:bd|beds?|bedrooms?)/i)?.[1] || ''))()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "bathroom_s_",
            "selector": "(() => document.querySelector('meta[name=\"zillow_fb:baths\"],meta[property=\"zillow_fb:baths\"]')?.content || ((document.body.innerText || '').match(/(\\d+(?:\\.\\d+)?)\\s*(?:ba|baths?|bathrooms?)/i)?.[1] || ''))()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "square_feet",
            "selector": "(() => { const html = document.documentElement.innerHTML; const desc = document.querySelector('meta[name=\"description\"]')?.content || document.querySelector('meta[property=\"og:description\"]')?.content || ''; const txt = desc + ' ' + (document.body.innerText || ''); const scriptMatch = html.match(/\"livingArea\"\\s*:\\s*\"?([\\d,]+)\"?/i) || html.match(/\"livingAreaValue\"\\s*:\\s*\"?([\\d,]+)\"?/i); if (scriptMatch) return scriptMatch[1].replace(/,/g, ''); const m = txt.match(/([\\d,]+)\\s*(?:Square Feet|sq\\.?\\s*ft|sqft)/i); return m ? m[1].replace(/,/g, '') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "status",
            "selector": "(() => { const html = document.documentElement.innerHTML; const txt = document.body.innerText || ''; const selectors = ['[data-testid=\"home-status\"]', '[data-testid=\"status\"]']; for (const s of selectors) { const v = document.querySelector(s)?.textContent?.trim(); if (v) return v; } const jsonMatch = html.match(/\"homeStatus\"\\s*:\\s*\"([^\"]+)\"/i) || html.match(/\"statusText\"\\s*:\\s*\"([^\"]+)\"/i); if (jsonMatch) return jsonMatch[1].replace(/_/g, ' ').toLowerCase(); const m = txt.match(/\\b(House for sale|Active|Coming soon|Pending|Sold|For sale|Off market|Not for sale)\\b/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "(() => (document.querySelector('h1')?.textContent || document.querySelector('meta[property=\"og:title\"]')?.content || '').replace(/\\s*\\|\\s*Zillow\\s*$/, '').replace(/\\u00a0/g, ' ').trim())()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "mls_id",
            "selector": "(() => { const html = document.documentElement.innerHTML; const txt = (document.body.innerText || '').replace(/\\s+/g, ' '); function valid(v) { v = (v || '').replace(/^#/, '').trim(); if (!v || /^s$/i.test(v)) return ''; if (/^[A-Z]{1,4}\\d[A-Z0-9-]{3,}$/i.test(v)) return '#' + v; if (/^\\d{6,}$/.test(v)) return '#' + v; return ''; } const visiblePatterns = [/MLS(?:\\s+ID|\\s*#|\\s*Number)?\\s*#?\\s*([A-Z]{1,4}\\d[A-Z0-9-]{3,}|\\d{6,})/i, /\\bMLS\\b[^#A-Z0-9]{0,20}#?\\s*([A-Z]{1,4}\\d[A-Z0-9-]{3,}|\\d{6,})/i]; for (const p of visiblePatterns) { const v = valid(txt.match(p)?.[1]); if (v) return v; } const src = html + '\\n' + Array.from(document.scripts).map(s => s.textContent || '').join('\\n'); const jsonPatterns = [/\"mlsId\"\\s*:\\s*\"([A-Z]{1,4}\\d[A-Z0-9-]{3,}|\\d{6,})\"/i, /\"mlsID\"\\s*:\\s*\"([A-Z]{1,4}\\d[A-Z0-9-]{3,}|\\d{6,})\"/i, /\"mlsNumber\"\\s*:\\s*\"([A-Z]{1,4}\\d[A-Z0-9-]{3,}|\\d{6,})\"/i, /\"mls_id\"\\s*:\\s*\"([A-Z]{1,4}\\d[A-Z0-9-]{3,}|\\d{6,})\"/i]; for (const p of jsonPatterns) { const v = valid(src.match(p)?.[1]); if (v) return v; } return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "listing_by",
            "selector": "(() => { const html = document.documentElement.innerHTML; const scripts = Array.from(document.scripts).map(s => s.textContent || '').join('\\n'); const src = html + '\\n' + scripts; function clean(v) { return (v || '').replace(/\\\\u0026/g, '&').replace(/\\\\u002F/g, '/').replace(/\\\\u([0-9a-fA-F]{4})/g, (_, h) => String.fromCharCode(parseInt(h, 16))).replace(/&quot;/g, '\"').replace(/&#x27;/g, \"'\").replace(/\\s+/g, ' ').trim(); } const jsonPatterns = [/\"brokerName\"\\s*:\\s*\"([^\"]{2,120})\"/i, /\"listingBrokerName\"\\s*:\\s*\"([^\"]{2,120})\"/i, /\"brokerageName\"\\s*:\\s*\"([^\"]{2,120})\"/i, /\"attributionInfo\"[\\s\\S]{0,1200}?\"brokerName\"\\s*:\\s*\"([^\"]{2,120})\"/i]; for (const p of jsonPatterns) { const m = src.match(p); const v = clean(m?.[1]); if (v && !/^(null|none|false)$/i.test(v)) return v; } const txt = clean(document.body.innerText || ''); const textPatterns = [/(?:Listing provided by|Brokered by|Listing by|Listed by)[:\\s]+(.{2,220}?)(?=Bought with:|Source:|MLS|Listing information|$)/i, /Listing agent\\s+(.{2,220}?)(?=Bought with:|Source:|MLS|$)/i]; for (const p of textPatterns) { const m = txt.match(p); if (m) { let v = m[1].replace(/Bought with:.*$/i, '').replace(/Source:.*$/i, '').replace(/\\b\\d{3}[-.\\s]?\\d{3}[-.\\s]?\\d{4}\\b/g, '').replace(/\\b\\d{3}[-.\\s]?\\d{4}\\b/g, '').trim(); const parts = v.split(',').map(x => x.trim()).filter(Boolean); if (parts.length > 1) v = parts[parts.length - 1]; return v.substring(0, 120); } } return ''; })()",
            "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": 520,
      "config": {
        "color": "bg-[#ff832b]"
      }
    }
  ],
  "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": "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": 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": 408,
      "position_y": 116,
      "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": 1128,
      "position_y": 116,
      "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": 116,
      "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": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Zillow property detail pages by URL and exports Octoparse-equivalent fields: keyword/state, image_url, house_url, price, bedrooms, bathrooms, square_feet, status, address, mls_id, and listing_by. Navigation strategy: multi-URL input loop using navigate.urls[] plus loop-continue, appending all rows to zillow-scraper.csv. Selectors rely mainly on stable meta tags, h1 address, current URL, visible MLS text, and JavaScript parsing of Zillow embedded JSON because Zillow uses dynamic/hydrated markup and frequently-changing class names. Zillow may show anti-bot, CAPTCHA, cookie, or regional access controls; this is a best-effort public-page template.",
      "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 buttons = Array.from(document.querySelectorAll('button,[role=\"button\"],input[type=\"bu...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 200,
      "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 (keyword, image_url, house_url, price, bedroom_s_). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 340,
      "height": 130,
      "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": 500,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}