{
  "version": "1.0.0",
  "exported_at": "2026-05-31T13:00:00.000Z",
  "project": {
    "name": "Airbnb Scraper by Keyword",
    "description": "Best-effort Airbnb scraper equivalent to the Octoparse Airbnb Scraper (by Keyword). Extracts Keyword, roomTitle, roomName, roomRating, roomReviewcount, roomPrice, roomURL, Host, and hostType from Airbnb room/listing pages. Navigation strategy: uses the supplied Airbnb sample listing URLs as a known URL list and loops through all URLs with append-mode CSV export. A validity guard checks for Airbnb's contact-host link and skips expired/404 room pages before export. Airbnb pages may be geo-sensitive, expired, blocked, or omit prices when dates are invalid or Airbnb returns a booking/date error.",
    "color": "bg-[#ff5a5f]",
    "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": 456,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.airbnb.com/rooms/791391176672941101?adults=1&category_tag=Tag%3A8678&children=0&enable_m3_private_room=true&infants=0&pets=0&check_in=2023-07-23&check_out=2023-07-29&source_impression_id=p3_1688612322_n7nSBvCbC9ZSyH2b&previous_page_section_name=1000&federated_search_id=63856029-82fb-450c-840a-49d7b14670d5",
          "https://www.airbnb.com/rooms/15988694?adults=1&category_tag=Tag%3A8678&children=0&enable_m3_private_room=true&infants=0&pets=0&check_in=2023-07-29&check_out=2023-08-03&source_impression_id=p3_1688612322_YhpcQ6V42WvYvxPH&previous_page_section_name=1000&federated_search_id=63856029-82fb-450c-840a-49d7b14670d5",
          "https://www.airbnb.com/rooms/39361974?adults=1&category_tag=Tag%3A8678&children=0&enable_m3_private_room=true&infants=0&pets=0&check_in=2023-07-16&check_out=2023-07-21&source_impression_id=p3_1688612322_ML6NhZO6s60%2FQuMS&previous_page_section_name=1000&federated_search_id=63856029-82fb-450c-840a-49d7b14670d5"
        ],
        "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": 792,
      "position_y": 220,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1464,
      "position_y": 220,
      "config": {
        "selector": "h1",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1800,
      "position_y": 220,
      "config": {
        "selector": "a[href*=\"/contact_host/\"]",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2136,
      "position_y": 520,
      "config": {
        "rowSelector": "body",
        "fileName": "airbnb-scraper-by-keyword.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Keyword",
            "selector": "'London'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "roomTitle",
            "selector": "(() => { const headings = Array.from(ROW.querySelectorAll('h2')).map(e => (e.textContent || '').trim()).filter(Boolean); const title = headings.find(t => /^(Room|Home|Guest suite|Apartment|Condo|Rental unit|Private room|Entire|Place|House|Cabin|Villa)\\b/i.test(t)); if (title) return title.replace(/,\\s*United Kingdom$/i, '').trim(); const og = document.querySelector('meta[property=\"og:title\"]')?.content || ''; return og ? og.split('·')[0].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "roomName",
            "selector": "(() => { const h1 = (ROW.querySelector('h1')?.textContent || '').trim(); if (h1 && !/^Oops!?$/i.test(h1)) return h1; return document.querySelector('meta[property=\"og:description\"]')?.content || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "roomRating",
            "selector": "(() => { const og = document.querySelector('meta[property=\"og:title\"]')?.content || ''; let m = og.match(/★\\s*([0-9.]+)/); if (m) return m[1]; const text = ROW.innerText || ''; m = text.match(/Rated\\s+([0-9.]+)\\s+out of\\s+5/i) || text.match(/Guest favorite[^\\n]*?([0-9]\\.[0-9]+)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "roomReviewcount",
            "selector": "(() => { const text = ROW.innerText || ''; const m = text.match(/from\\s+([0-9,]+)\\s+reviews/i) || text.match(/([0-9,]+)\\s+reviews/i); return m ? m[1].replace(/,/g, '') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "roomPrice",
            "selector": "(() => { const text = ROW.innerText || ''; const m = text.match(/(?:G\\$|[$€£¥])\\s*[0-9,.]+(?:\\s*[A-Z]{3})?\\s+per\\s+night/i) || text.match(/[0-9,.]+\\s*(?:USD|GBP|EUR|GYD)\\s+per\\s+night/i); return m ? m[0].trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "roomURL",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Host",
            "selector": "(() => { const text = (ROW.innerText || '').replace(/\\s+/g, ' '); const m = text.match(/Stay with\\s+([^·]+?)(?:\\s+Superhost|\\s+[0-9]+\\s+years hosting|\\s+Listing highlights|$)/i); return m ? ('Stay with ' + m[1].trim()) : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "hostType",
            "selector": "(() => { const text = (ROW.innerText || '').replace(/\\s+/g, ' '); return /Stay with[^.]{0,160}\\bSuperhost\\b/i.test(text) ? 'Superhost' : ''; })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2472,
      "position_y": 520,
      "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "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": "loop-continue-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": 384,
      "position_y": 116,
      "width": 1328,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1728,
      "position_y": 116,
      "width": 992,
      "height": 596,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2064,
      "position_y": 416,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Airbnb scraper equivalent to the Octoparse Airbnb Scraper (by Keyword). Extracts Keyword, roomTitle, roomName, roomRating, roomReviewcount, roomPrice, roomURL, Host, and hostType from Airbnb room/listing pages. Navigation strategy: uses the supplied Airbnb sample listing URLs as a known URL list and loops through all URLs with append-mode CSV export. A validity guard checks for Airbnb's contact-host link and skips expired/404 room pages before export. Airbnb pages may be geo-sensitive, expired, blocked, or omit prices when dates are invalid or Airbnb returns a booking/date error.",
      "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": 656,
      "position_y": 200,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `a[href*=\"/contact_host/\"]`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 200,
      "width": 340,
      "height": 138,
      "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, roomTitle, roomName, roomRating, roomReviewcount). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2336,
      "position_y": 500,
      "width": 340,
      "height": 133,
      "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": 2672,
      "position_y": 500,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}