{
  "version": "1.0.0",
  "exported_at": "2026-05-31T16:55:00.000Z",
  "project": {
    "name": "Bookingcom Listing Scraper for Spain",
    "description": "Scrapes Booking.com Spain search/listing result pages for accommodation name, URL, photo, distance to center, room/condition details, rating, review count, prices, locality, and description. Uses Booking listing property-card selectors and known Booking offset pagination URLs for the Almería Spain listing (offset 0, 25, 50, 75) so all available result pages are appended to booking-hotel-listados-scraper.csv. Booking may block automated scraping or vary content by region, dates, currency, and availability.",
    "color": "bg-[#003b95]",
    "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": 100,
      "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": 460,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.booking.com/searchresults.es.html?ss=Almer%C3%ADa%2C%20Andaluc%C3%ADa%2C%20Espa%C3%B1a&dest_id=-370374&dest_type=city&checkin=2026-11-12&checkout=2026-11-15&group_adults=2&no_rooms=1&group_children=0&selected_currency=USD&order=popularity",
          "https://www.booking.com/searchresults.es.html?ss=Almer%C3%ADa%2C%20Andaluc%C3%ADa%2C%20Espa%C3%B1a&dest_id=-370374&dest_type=city&checkin=2026-11-12&checkout=2026-11-15&group_adults=2&no_rooms=1&group_children=0&selected_currency=USD&order=popularity&offset=25",
          "https://www.booking.com/searchresults.es.html?ss=Almer%C3%ADa%2C%20Andaluc%C3%ADa%2C%20Espa%C3%B1a&dest_id=-370374&dest_type=city&checkin=2026-11-12&checkout=2026-11-15&group_adults=2&no_rooms=1&group_children=0&selected_currency=USD&order=popularity&offset=50",
          "https://www.booking.com/searchresults.es.html?ss=Almer%C3%ADa%2C%20Andaluc%C3%ADa%2C%20Espa%C3%B1a&dest_id=-370374&dest_type=city&checkin=2026-11-12&checkout=2026-11-15&group_adults=2&no_rooms=1&group_children=0&selected_currency=USD&order=popularity&offset=75"
        ],
        "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": 820,
      "position_y": 220,
      "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": 1180,
      "position_y": 220,
      "config": {
        "selector": "[data-testid=\"property-card\"]",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1540,
      "position_y": 220,
      "config": {
        "rowSelector": "[data-testid=\"property-card\"]",
        "fileName": "booking-hotel-listados-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "alojamiento",
            "selector": "[data-testid=\"title\"]",
            "attribute": "text"
          },
          {
            "name": "alojamiento_url",
            "selector": "a[data-testid=\"title-link\"]",
            "attribute": "href"
          },
          {
            "name": "foto",
            "selector": "img[data-testid=\"image\"]",
            "attribute": "src"
          },
          {
            "name": "distancia_al_centro",
            "selector": "[data-testid=\"distance\"]",
            "attribute": "text"
          },
          {
            "name": "condicion",
            "selector": "(() => { const parts = Array.from(ROW.querySelectorAll('[data-testid=\"recommended-units\"], [data-testid=\"property-card-unit-configuration\"], [data-testid=\"property-card-room-type\"], [data-testid=\"property-card-subtitle\"], [data-testid=\"property-card-benefits-badge\"], li')).map(e => e.innerText || e.textContent || '').map(s => s.trim()).filter(Boolean); return Array.from(new Set(parts)).slice(0, 10).join(' | '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "puntuacion",
            "selector": "(() => { const t = (ROW.querySelector('[data-testid=\"review-score\"]')?.innerText || ROW.innerText || ''); const m = t.match(/Puntuaci[oó]n:\\s*([0-9]+[,.][0-9]+)/i) || t.match(/([0-9]+[,.][0-9])\\s*(?:Fant[aá]stico|Muy bien|Bien|Excepcional|Agradable|Valoraci[oó]n)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "comentarios",
            "selector": "(() => { const t = (ROW.querySelector('[data-testid=\"review-score\"]')?.innerText || ROW.innerText || ''); const m = t.match(/([0-9.]+)\\s+comentarios/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio_sin_descuento",
            "selector": "(() => { const priceBox = ROW.querySelector('[data-testid=\"price-and-discounted-price\"]')?.parentElement?.innerText || ROW.innerText || ''; const prices = Array.from(priceBox.matchAll(/(?:US\\$|€)\\s*[0-9.,]+/g)).map(m => m[0]); return prices.length > 1 ? prices[0] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio",
            "selector": "(() => { const priceBox = ROW.querySelector('[data-testid=\"price-and-discounted-price\"]')?.parentElement?.innerText || ROW.innerText || ''; const prices = Array.from(priceBox.matchAll(/(?:US\\$|€)\\s*[0-9.,]+/g)).map(m => m[0]); return prices.length ? prices[prices.length - 1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "localidad",
            "selector": "(() => { const cardLoc = ROW.querySelector('[data-testid=\"address\"], [data-testid=\"location\"], [data-testid=\"property-card-location\"]')?.innerText?.trim(); if (cardLoc) return cardLoc; try { const ss = new URL(document.location.href).searchParams.get('ss') || ''; const city = decodeURIComponent(ss).split(',')[0].trim(); if (city) return city; } catch (e) {} return 'Almería'; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "descripcion",
            "selector": "(() => { const desc = ROW.querySelector('[data-testid=\"property-card-descriptive-text\"], [data-testid=\"property-card-description\"]')?.innerText?.trim(); if (desc) return desc; const bits = Array.from(ROW.querySelectorAll('[data-testid=\"location\"], [data-testid=\"address\"], [data-testid=\"distance\"], [data-testid=\"property-card-benefits-badge\"]')).map(e => e.innerText || e.textContent || '').map(s => s.trim()).filter(Boolean); return Array.from(new Set(bits)).join(' | '); })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1900,
      "position_y": 220,
      "config": {
        "duration": 1,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2260,
      "position_y": 220,
      "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": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-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": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 28,
      "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": 388,
      "position_y": 116,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1468,
      "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": 2188,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Booking.com Spain search/listing result pages for accommodation name, URL, photo, distance to center, room/condition details, rating, review count, prices, locality, and description. Uses Booking listing property-card selectors and known Booking offset pagination URLs for the Almería Spain listing (offset 0, 25, 50, 75) so all available result pages are appended to booking-hotel-listados-scraper.csv. Booking may block automated scraping or vary content by region, dates, currency, and availability.",
      "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 4 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 660,
      "position_y": 200,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (condicion, puntuacion, comentarios, precio_sin_descuento, precio). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1740,
      "position_y": 200,
      "width": 340,
      "height": 135,
      "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": 2460,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}