{
  "version": "1.0.0",
  "exported_at": "2026-06-03T18:15:00.000Z",
  "project": {
    "name": "Google Search Email Finder Premium",
    "description": "Best-effort equivalent of the Octoparse Google Search Email Finder. Google Search itself was observed redirecting automated requests to a CAPTCHA/unusual-traffic page, so this template uses pre-enumerated sample result/detail URLs from the Octoparse entry and extracts SERP-like lead fields directly from those pages: title, description, detail URL, displayed URL, compact HTML snapshot, emails, phone numbers, and social links. Navigation uses a multi-URL loop with append mode to collect all configured result pages into one CSV. Limitation: UScraper cannot dynamically visit every discovered Google result URL without pre-enumerated URLs, and Google SERP scraping may be blocked by CAPTCHA.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 120,
      "position_y": 240,
      "config": {
        "urls": [
          "https://cloud.google.com/learn/what-is-artificial-intelligence",
          "https://cloud.google.com"
        ],
        "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": 240,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 840,
      "position_y": 240,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1200,
      "position_y": 240,
      "config": {
        "duration": 2
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1560,
      "position_y": 240,
      "config": {
        "rowSelector": "body",
        "fileName": "google_search_email_finder_premium.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "input_params",
            "selector": "JSON.stringify({All_these_words:'AI',None_of_these_words:'gpt',Results_per_page:'15',Pagination_times:'6',Mode:'Pre-enumerated result/detail URLs because Google SERP CAPTCHA was detected'})",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "title",
            "selector": "(() => { const h1 = document.querySelector('h1'); return (document.title || (h1 ? h1.innerText : '') || '').trim(); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "description",
            "selector": "(() => { const meta = document.querySelector('meta[name=\"description\"], meta[property=\"og:description\"], meta[name=\"twitter:description\"]'); if (meta && meta.content) return meta.content.trim(); const p = document.querySelector('main p, section p, p'); return p ? p.innerText.trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "detail_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "source_url",
            "selector": "'https://www.google.com/search?q=AI%20-gpt&lr=&cr=&as_qdr=all&as_sitesearch=&as_occt=any&as_filetype=&tbs=&start=0&num=15'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "displayed_url",
            "selector": "location.origin",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "current_page",
            "selector": "'1'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "has_next_page",
            "selector": "'False'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "position",
            "selector": "(() => { const u = location.href; if (u.includes('/learn/what-is-artificial-intelligence')) return '1'; if (u === 'https://cloud.google.com/' || u === 'https://cloud.google.com') return '2'; return ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_title1",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[0] ? links[0].innerText.trim().replace(/\\s+/g,' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_url1",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[0] ? links[0].href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_title2",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[1] ? links[1].innerText.trim().replace(/\\s+/g,' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_url2",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[1] ? links[1].href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_title3",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[2] ? links[2].innerText.trim().replace(/\\s+/g,' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_url3",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[2] ? links[2].href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_title4",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[3] ? links[3].innerText.trim().replace(/\\s+/g,' ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "site_link_url4",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('main a[href], section a[href], a[href]')).filter(a => a.innerText.trim() && !a.href.startsWith('javascript:')); return links[3] ? links[3].href : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "average_rating",
            "selector": "(() => { const t = document.body.innerText || ''; const m = t.match(/(?:Rating|Rated)\\s*:?\\s*(\\d(?:\\.\\d)?)/i) || t.match(/(\\d(?:\\.\\d)?)\\s*stars?/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating_count",
            "selector": "(() => { const t = document.body.innerText || ''; const m = t.match(/([\\d,]+)\\s*(?:reviews|ratings)/i); return m ? m[1] : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "email",
            "selector": "(() => { const t = document.body.innerText + ' ' + document.body.innerHTML; const m = t.match(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/gi); return m ? Array.from(new Set(m)).join('; ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "phone_number",
            "selector": "(() => { const t = document.body.innerText || ''; const m = t.match(/(?:\\+?\\d[\\d\\s().-]{7,}\\d)/g); return m ? Array.from(new Set(m.map(x => x.trim()))).join('; ') : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "facebook_url",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('a[href]')).map(a => a.href).filter(h => /facebook\\.com/i.test(h)); return Array.from(new Set(links)).join('; '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "instagram_url",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('a[href]')).map(a => a.href).filter(h => /instagram\\.com/i.test(h)); return Array.from(new Set(links)).join('; '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "twitter_url",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('a[href]')).map(a => a.href).filter(h => /(twitter\\.com|x\\.com)/i.test(h)); return Array.from(new Set(links)).join('; '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "tiktok_url",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('a[href]')).map(a => a.href).filter(h => /tiktok\\.com/i.test(h)); return Array.from(new Set(links)).join('; '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "linkedin_url",
            "selector": "(() => { const links = Array.from(document.querySelectorAll('a[href]')).map(a => a.href).filter(h => /linkedin\\.com/i.test(h)); return Array.from(new Set(links)).join('; '); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "html",
            "selector": "(() => { const h1 = document.querySelector('h1') ? document.querySelector('h1').innerText.trim() : ''; const meta = document.querySelector('meta[name=\"description\"], meta[property=\"og:description\"]'); const desc = meta && meta.content ? meta.content.trim() : ''; return ('HTML snapshot: title=' + document.title + ' | h1=' + h1 + ' | description=' + desc + ' | url=' + location.href).replace(/[\\r\\n\\t]+/g, ' ').replace(/\\s{2,}/g, ' ').slice(0, 1000); })()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 240,
      "config": {
        "duration": 1
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2280,
      "position_y": 240,
      "config": {}
    }
  ],
  "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": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-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-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "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": 136,
      "width": 2120,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "sleep-1",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1488,
      "position_y": 136,
      "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": 136,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort equivalent of the Octoparse Google Search Email Finder. Google Search itself was observed redirecting automated requests to a CAPTCHA/unusual-traffic page, so this template uses pre-enumerated sample result/detail URLs from the Octoparse entry and extracts SERP-like lead fields directly from those pages: title, description, detail URL, displayed URL, compact HTML snapshot, emails, phone numbers, and social links. Navigation uses a multi-URL loop with append mode to collect all configured result pages into one CSV. Limitation: UScraper cannot dynamically visit every discovered Google result URL without pre-enumerated URLs, and Google SERP scraping may be blocked by CAPTCHA.",
      "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 (input_params, title, description, detail_url, source_url). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 220,
      "width": 340,
      "height": 132,
      "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": 220,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}