{
  "version": "1.0.0",
  "exported_at": "2026-06-01T10:45:00.000Z",
  "project": {
    "name": "OpenStreetMap Scraper",
    "description": "Scrapes detailed information from OpenStreetMap node/way/relation detail pages. Uses a multi-URL navigation loop so every configured OpenStreetMap detail URL is visited and appended to openstreetmap-scraper.csv. Extracts page URL, title, latitude, longitude, address tags, amenity, opening hours, email, phone, website, and Twitter/contact Twitter where available.",
    "color": "bg-[#42be65]",
    "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.openstreetmap.org/node/2632446787",
          "https://www.openstreetmap.org/node/4357768193",
          "https://www.openstreetmap.org/way/278241633",
          "https://www.openstreetmap.org/node/2622767704"
        ],
        "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,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "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": "#sidebar_content table.browse-tag-list",
        "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": 1200,
      "position_y": 260,
      "config": {
        "rowSelector": "#sidebar_content",
        "fileName": "openstreetmap-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Page_URL",
            "selector": "window.location.href.split('#')[0]",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Title",
            "selector": "(()=>{const tag=(k)=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()===k);return r?(r.querySelector('td')?.innerText||'').trim():''};const heading=(ROW.querySelector('h2')?.innerText||'').trim();const m=heading.match(/^(?:Node|Way|Relation):\\s*(.*?)\\s*\\(/);return tag('name') || (m?m[1]:heading);})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Latitude",
            "selector": ".latitude",
            "attribute": "text"
          },
          {
            "name": "Longitude",
            "selector": ".longitude",
            "attribute": "text"
          },
          {
            "name": "State",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='addr:state');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "City",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='addr:city');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Street",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='addr:street');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Housenumber",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='addr:housenumber');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Postcode",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='addr:postcode');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Amenity",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='amenity');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Opening_hours",
            "selector": "(()=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()==='opening_hours');return r?(r.querySelector('td')?.innerText||'').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Email",
            "selector": "(()=>{const get=(k)=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()===k);return r?(r.querySelector('td')?.innerText||'').trim():''};return get('contact:email') || get('email');})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Phone",
            "selector": "(()=>{const get=(k)=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()===k);return r?(r.querySelector('td')?.innerText||'').trim():''};return get('phone') || get('contact:phone');})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Website",
            "selector": "(()=>{const get=(k)=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()===k);return r?(r.querySelector('td')?.innerText||'').trim():''};return get('website') || get('contact:website');})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Twitter",
            "selector": "(()=>{const get=(k)=>{const rows=Array.from(ROW.querySelectorAll('table.browse-tag-list tr'));const r=rows.find(x=>(x.querySelector('th')?.innerText||'').trim()===k);return r?(r.querySelector('td')?.innerText||'').trim():''};return get('twitter') || get('contact:twitter');})()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "color": "bg-[#ff832b]"
      }
    }
  ],
  "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": "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": 1040,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1128,
      "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": 1488,
      "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 detailed information from OpenStreetMap node/way/relation detail pages. Uses a multi-URL navigation loop so every configured OpenStreetMap detail URL is visited and appended to openstreetmap-scraper.csv. Extracts page URL, title, latitude, longitude, address tags, amenity, opening hours, email, phone, website, and Twitter/contact Twitter where available.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (Page_URL, Title, State, City, Street). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 240,
      "width": 340,
      "height": 126,
      "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": 1760,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}