{
  "version": "1.0.0",
  "exported_at": "2026-06-03T15:45:00.000Z",
  "project": {
    "name": "App Store Search Scraper",
    "description": "Scrapes Apple App Store search results for app name, URL, icon URL, rating, rating count, introduction, and query URL. Uses a multi-URL loop seeded with US App Store searches for music, video, and health across iPhone, iPad, Mac, Vision, Watch, and TV device paths. Search pages do not expose reliable numbered pagination, so navigation is handled by editable search URL inputs; extend navigate.urls for more countries/regions and keywords.",
    "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 dimensions",
      "position_x": 120,
      "position_y": 260,
      "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": 260,
      "config": {
        "urls": [
          "https://apps.apple.com/us/iphone/search?term=music",
          "https://apps.apple.com/us/iphone/search?term=video",
          "https://apps.apple.com/us/iphone/search?term=health",
          "https://apps.apple.com/us/ipad/search?term=music",
          "https://apps.apple.com/us/ipad/search?term=video",
          "https://apps.apple.com/us/ipad/search?term=health",
          "https://apps.apple.com/us/mac/search?term=music",
          "https://apps.apple.com/us/mac/search?term=video",
          "https://apps.apple.com/us/mac/search?term=health",
          "https://apps.apple.com/us/vision/search?term=music",
          "https://apps.apple.com/us/vision/search?term=video",
          "https://apps.apple.com/us/vision/search?term=health",
          "https://apps.apple.com/us/watch/search?term=music",
          "https://apps.apple.com/us/watch/search?term=video",
          "https://apps.apple.com/us/watch/search?term=health",
          "https://apps.apple.com/us/tv/search?term=music",
          "https://apps.apple.com/us/tv/search?term=video",
          "https://apps.apple.com/us/tv/search?term=health"
        ],
        "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": 260,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "duration": 2,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "selector": "main a[href*=\"/app/\"][href*=\"/id\"]:has(img), main a[href*=\"/app/\"][href*=\"/id\"]:has([data-testid=\"artwork-component\"])",
        "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": 1920,
      "position_y": 260,
      "config": {
        "rowSelector": "main a[href*=\"/app/\"][href*=\"/id\"]:has(img), main a[href*=\"/app/\"][href*=\"/id\"]:has([data-testid=\"artwork-component\"])",
        "fileName": "app-store-search-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "Query_URL",
            "selector": "window.location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "App_name",
            "selector": "(()=>{const root=ROW.closest('li')||ROW;const h=root.querySelector('h1,h2,h3');const clamp=Array.from(root.querySelectorAll('.multiline-clamp__text')).map(e=>e.textContent.trim()).find(t=>t&&!/^(View|GET|OPEN)$/i.test(t));const raw=(h?h.textContent:clamp)||ROW.getAttribute('aria-label')||ROW.textContent||'';return raw.replace(/^(View|GET|OPEN)\\s+/i,'').replace(/\\s+/g,' ').trim();})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "App_URL",
            "selector": "",
            "attribute": "href"
          },
          {
            "name": "App_introduction",
            "selector": "(()=>{const root=ROW.closest('li')||ROW;const titleEl=root.querySelector('h1,h2,h3');const title=titleEl?titleEl.textContent.replace(/\\s+/g,' ').trim():'';const candidates=Array.from(root.querySelectorAll('.multiline-clamp__text,p.subtitle,p,span')).map(e=>e.textContent.replace(/\\s+/g,' ').trim()).filter(t=>t&&t!==title&&!/^(View|GET|OPEN|Free)$/i.test(t)&&!/^[0-9.]+\\s*Stars?$/i.test(t)&&!/Ratings?$/i.test(t));return candidates.find(t=>t.length>2)||'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "App_icon_URL",
            "selector": "(()=>{const root=ROW.closest('li')||ROW;const srcset=Array.from(root.querySelectorAll('source')).map(s=>s.getAttribute('srcset')).find(Boolean);if(srcset){return srcset.split(',')[0].trim().split(' ')[0];}const img=root.querySelector('img');return img?(img.currentSrc||img.src||''):'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "App_rating",
            "selector": "(()=>{const root=ROW.closest('li')||ROW;const labelEl=Array.from(root.querySelectorAll('[aria-label]')).find(e=>/stars?/i.test(e.getAttribute('aria-label')||''));const label=labelEl?(labelEl.getAttribute('aria-label')||''):'';const text=(root.textContent||'').replace(/\\s+/g,' ');const m=label.match(/([0-9](?:\\.[0-9])?)\\s*(?:out of 5\\s*)?Stars?/i)||text.match(/([0-9](?:\\.[0-9])?)\\s*Stars?/i);return m?m[1]+' Stars':'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "App_rating_count",
            "selector": "(()=>{const root=ROW.closest('li')||ROW;const text=(root.textContent||'').replace(/\\s+/g,' ');const m=text.match(/([0-9][0-9.,]*\\s?[KMB]?)\\s+Ratings?/i);return m?m[1].replace(/\\s+/g,''):'';})()",
            "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": {
        "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": "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": 156,
      "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": 156,
      "width": 1400,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-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 Apple App Store search results for app name, URL, icon URL, rating, rating count, introduction, and query URL. Uses a multi-URL loop seeded with US App Store searches for music, video, and health across iPhone, iPad, Mac, Vision, Watch, and TV device paths. Search pages do not expose reliable numbered pagination, so navigation is handled by editable search URL inputs; extend navigate.urls for more countries/regions and keywords.",
      "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 18 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 680,
      "position_y": 240,
      "width": 332,
      "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 (Query_URL, App_name, App_introduction, App_icon_URL, App_rating). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 240,
      "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": 2480,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}