{
  "version": "1.0.0",
  "exported_at": "2026-05-31T00:00:00.000Z",
  "project": {
    "name": "Google Local Service Scraper by URL",
    "description": "Scrapes Google Local Services provider listings from a prolist URL, including business name, rating, review count, service type, experience, service area, profile URL when available, open hours/snippets, services/snippets, phone when already visible, Google verification text, and service-area details. Pagination/lazy loading is handled with repeated scroll/click load passes for More/Next-style controls before extraction. The final parser creates stable synthetic rows and filters loader, dialog, and container rows. Best effort: Google may show CAPTCHA, consent pages, anti-bot interstitials, regional layouts, or hide phone/profile/detail fields behind modals.",
    "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": {
        "url": "https://www.google.com/localservices/prolist?q=plumber+new+york&hl=en-US&gl=us&src=1",
        "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": 5,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript on the page",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "jsCode": "return (function(){function clean(s){return (s||'').replace(/\\u00a0/g,' ').replace(/[ \\t]+/g,' ').trim()}function visible(e){try{var r=e.getBoundingClientRect();return r.width>0&&r.height>0&&getComputedStyle(e).visibility!=='hidden'&&getComputedStyle(e).display!=='none'}catch(x){return false}}var clicked=0;Array.from(document.querySelectorAll('button,input[type=submit],div[role=\"button\"],a[role=\"button\"]')).filter(visible).forEach(function(e){var t=clean(e.innerText||e.value||e.getAttribute('aria-label'));if(/^(Accept all|I agree|Accept|Agree|More|Show more|More results|More businesses|More providers|Next)$/i.test(t)){try{e.click();clicked++}catch(x){}}});window.scrollTo(0,document.body.scrollHeight);Array.from(document.querySelectorAll('div,main,section')).filter(function(e){return e.scrollHeight>e.clientHeight+250}).slice(0,30).forEach(function(e){try{e.scrollTop=e.scrollHeight}catch(x){}});return 'load pass 1 clicked '+clicked;})()",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "duration": 4,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "inject-javascript-2",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript on the page",
      "position_x": 2280,
      "position_y": 260,
      "config": {
        "jsCode": "return (function(){function clean(s){return (s||'').replace(/\\u00a0/g,' ').replace(/[ \\t]+/g,' ').trim()}function visible(e){try{var r=e.getBoundingClientRect();return r.width>0&&r.height>0&&getComputedStyle(e).visibility!=='hidden'&&getComputedStyle(e).display!=='none'}catch(x){return false}}var clicked=0;window.scrollTo(0,document.body.scrollHeight);Array.from(document.querySelectorAll('div,main,section')).filter(function(e){return e.scrollHeight>e.clientHeight+250}).slice(0,30).forEach(function(e){try{e.scrollTop=e.scrollHeight}catch(x){}});Array.from(document.querySelectorAll('button,input[type=submit],div[role=\"button\"],a[role=\"button\"]')).filter(visible).forEach(function(e){var t=clean(e.innerText||e.value||e.getAttribute('aria-label'));if(/^(More|Show more|More results|More businesses|More providers|Next)$/i.test(t)){try{e.click();clicked++}catch(x){}}});return 'load pass 2 clicked '+clicked;})()",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2640,
      "position_y": 260,
      "config": {
        "duration": 4,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "inject-javascript-3",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript on the page",
      "position_x": 3000,
      "position_y": 260,
      "config": {
        "jsCode": "return (function(){function clean(s){return (s||'').replace(/\\u00a0/g,' ').replace(/[ \\t]+/g,' ').trim()}function linesFromText(t){return clean(t).split(/\\n+/).map(clean).filter(Boolean)}function visible(e){try{var r=e.getBoundingClientRect();return r.width>0&&r.height>0&&getComputedStyle(e).visibility!=='hidden'&&getComputedStyle(e).display!=='none'}catch(x){return false}}function abs(u){try{return new URL(u,location.href).href}catch(x){return u||''}}function serviceFromUrl(){var q=new URLSearchParams(location.search).get('q')||'';var first=q.split(/[ +]/).filter(Boolean)[0]||'';if(!first)return '';var base=first.charAt(0).toUpperCase()+first.slice(1);return /s$/i.test(base)?base:base+'s'}var bad=/^(Ad|Ads|Sponsored|Google|Rating|Ratings|Reviews|Open|Closed|Serves|Call|Message|Website|Directions|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|Details|Overview|Photos|Loading|Close dialog|Get phone number|Get quote|Share|Back|Next)$/i;function scoreText(t){var s=0;if(/[0-5][.]\\d/.test(t))s++;if(/reviews?|\\([0-9,]+\\)/i.test(t))s++;if(/(^|\\n)Serves /i.test(t))s++;if(/years? in business/i.test(t))s++;if(/[(]?[0-9]{3}[)]?[-. ][0-9]{3}[-. ][0-9]{4}/.test(t))s++;return s}function parseLines(lines,profileUrl){var text=lines.join('\\n');var provider='';for(var i=0;i<lines.length;i++){var l=lines[i];if(l.length>1&&l.length<110&&!bad.test(l)&&!/[0-5][.]\\d/.test(l)&&!/reviews?/i.test(l)&&!/[(]?[0-9]{3}[)]?[-. ][0-9]{3}[-. ][0-9]{4}/.test(l)&&!/years? in business/i.test(l)&&!/^Serves /i.test(l)&&!/^(Free estimate|Family owned|Background checked|Open 24 hours|Open ·|Typically replies)/i.test(l)){provider=l;break}}var rm=text.match(/([0-5][.]\\d)(?:\\s*out of 5)?/i);var rating=rm?rm[1]+' out of 5':'';var rc='';if(rating){rc=(text.match(/([0-9,]+)\\s+reviews?/i)||text.match(/\\(([0-9,]+)\\)/)||[])[1]||''}var exp=(text.match(/[0-9]+[+]? years? in business/i)||[''])[0];var serve=lines.find(function(l){return /^Serves /i.test(l)})||'';var provides=lines.find(function(l){return l.indexOf('·')>-1})||'';var phone=(text.match(/(?:\\+?1[\\s.-]?)?[(]?[0-9]{3}[)]?[\\s.-][0-9]{3}[\\s.-][0-9]{4}/)||[''])[0];var verified=lines.find(function(l){return /verified by Google|Google Guaranteed|Google Screened|Background checked/i.test(l)})||'';var dayIdx=lines.findIndex(function(l){return /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$/i.test(l)});var openHours='';if(dayIdx>=0){var end=-1;for(var j=dayIdx+1;j<lines.length;j++){if(/^(Find|Install|Repair|Unclog|Replace|Other)/i.test(lines[j])||/(?:\\+?1[\\s.-]?)?[(]?[0-9]{3}[)]?[\\s.-][0-9]{3}[\\s.-][0-9]{4}/.test(lines[j])){end=j;break}}if(end<0)end=Math.min(lines.length,dayIdx+16);openHours=lines.slice(dayIdx,end).join(' | ')}else{openHours=lines.find(function(l){return /^Open\\b|^Closed\\b/i.test(l)})||''}var services=lines.filter(function(l){return /^(Find|Install|Repair|Unclog|Replace|Other)/i.test(l)&&l.length<500}).join(', ');var servIdx=lines.findIndex(function(l){return /^Serves /i.test(l)});var areaDetails=servIdx>=0?lines.slice(servIdx,Math.min(lines.length,servIdx+18)).filter(function(l){return !/^(Get phone number|Get quote|Share|Close dialog)$/i.test(l)}).join(' | '):'';return {page_url:location.href,provider:provider,rating:rating,rating_count:rc,service_type:serviceFromUrl(),experience:exp,serve_area:serve,provides:provides,profile_url:profileUrl||'',open_hours:openHours,services:services,phone:phone,google_verified:verified,service_area_details:areaDetails,raw:text}}document.querySelectorAll('#uscraper-lsa-container').forEach(function(e){e.remove()});var raw=[];Array.from(document.querySelectorAll('a[href*=\"/localservices/profile\"],a[href*=\"google.com/localservices/profile\"]')).forEach(function(a){var e=a;for(var i=0;i<10&&e;i++,e=e.parentElement){if(e.closest('[role=\"dialog\"]'))continue;var t=e.innerText||'';var ratings=(t.match(/[0-5][.]\\d/g)||[]).length;var ctas=(t.match(/Get phone number|Get quote|Share/g)||[]).length;if(t.length>70&&t.length<3000&&scoreText(t)>=1&&!(ratings>2&&t.length>700)&&ctas<=3&&!/^Loading\\b/i.test(clean(t))){raw.push({el:e,profile:abs(a.getAttribute('href')||a.href),text:t});break}}});Array.from(document.querySelectorAll('div[role=\"article\"],div[role=\"listitem\"],li,div[jscontroller],div')).filter(visible).forEach(function(e){if(e.closest('[role=\"dialog\"]'))return;var t=e.innerText||'';var ratings=(t.match(/[0-5][.]\\d/g)||[]).length;var ctas=(t.match(/Get phone number|Get quote|Share/g)||[]).length;if(t.length>80&&t.length<2200&&scoreText(t)>=2&&!(ratings>1&&t.length>650)&&ctas<=3&&!/^Loading\\b/i.test(clean(t))&&!/^Close dialog\\b/i.test(clean(t))){var a=e.querySelector('a[href*=\"/localservices/profile\"],a[href*=\"google.com/localservices/profile\"]');raw.push({el:e,profile:a?abs(a.getAttribute('href')||a.href):'',text:t})}});var uniq=[];var seenEl=new Set();raw.forEach(function(c){if(!seenEl.has(c.el)){seenEl.add(c.el);uniq.push(c)}});uniq=uniq.filter(function(c){return !uniq.some(function(o){return o!==c&&c.el.contains(o.el)&&(c.text||'').length>(o.text||'').length*1.25})});uniq.sort(function(a,b){return (a.text||'').length-(b.text||'').length});var rows=[];var seen=new Set();uniq.forEach(function(c){var data=parseLines(linesFromText(c.text||c.el.innerText||''),c.profile);if(!data.provider||data.provider.length>120||bad.test(data.provider)||/^Loading$/i.test(data.provider)||/^Close dialog$/i.test(data.provider))return;if(!data.rating&&!data.rating_count&&!data.serve_area)return;var key=(data.provider+'|'+data.rating+'|'+data.rating_count+'|'+data.serve_area).toLowerCase();if(seen.has(key))return;seen.add(key);rows.push(data)});var box=document.createElement('div');box.id='uscraper-lsa-container';box.style.cssText='position:fixed;left:0;bottom:0;width:24px;height:24px;overflow:hidden;background:#fff;color:#000;z-index:2147483647;font-size:1px;';rows.forEach(function(r,idx){var div=document.createElement('div');div.className='uscraper-lsa-row';div.textContent=r.provider||('provider '+idx);Object.keys(r).forEach(function(k){if(k!=='raw')div.setAttribute('data-us-'+k.replace(/_/g,'-'),r[k]||'')});box.appendChild(div)});document.body.appendChild(box);return 'created '+rows.length+' filtered UScraper rows';})()",
        "waitForCompletion": true,
        "timeout": 20,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 3360,
      "position_y": 260,
      "config": {
        "selector": ".uscraper-lsa-row",
        "timeout": 20,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 3720,
      "position_y": 260,
      "config": {
        "rowSelector": ".uscraper-lsa-row",
        "fileName": "google-business-local-services-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "create",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "page_url",
            "selector": "",
            "attribute": "data-us-page-url"
          },
          {
            "name": "provider",
            "selector": "",
            "attribute": "data-us-provider"
          },
          {
            "name": "rating",
            "selector": "",
            "attribute": "data-us-rating"
          },
          {
            "name": "rating_count",
            "selector": "",
            "attribute": "data-us-rating-count"
          },
          {
            "name": "service_type",
            "selector": "",
            "attribute": "data-us-service-type"
          },
          {
            "name": "experience",
            "selector": "",
            "attribute": "data-us-experience"
          },
          {
            "name": "serve_area",
            "selector": "",
            "attribute": "data-us-serve-area"
          },
          {
            "name": "provides",
            "selector": "",
            "attribute": "data-us-provides"
          },
          {
            "name": "profile_url",
            "selector": "",
            "attribute": "data-us-profile-url"
          },
          {
            "name": "open_hours",
            "selector": "",
            "attribute": "data-us-open-hours"
          },
          {
            "name": "services",
            "selector": "",
            "attribute": "data-us-services"
          },
          {
            "name": "phone",
            "selector": "",
            "attribute": "data-us-phone"
          },
          {
            "name": "google_verified",
            "selector": "",
            "attribute": "data-us-google-verified"
          },
          {
            "name": "service_area_details",
            "selector": "",
            "attribute": "data-us-service-area-details"
          }
        ]
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 4080,
      "position_y": 260,
      "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": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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": "inject-javascript-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-2",
      "from_connector_id": "right",
      "to_block_id": "sleep-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-3",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-3",
      "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": "end-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": 3200,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2",
          "sleep-3",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 156,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1",
          "inject-javascript-2",
          "inject-javascript-3"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 3648,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 4008,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes Google Local Services provider listings from a prolist URL, including business name, rating, review count, service type, experience, service area, profile URL when available, open hours/snippets, services/snippets, phone when already visible, Google verification text, and service-area details. Pagination/lazy loading is handled with repeated scroll/click load passes for More/Next-style controls before extraction. The final parser creates stable synthetic rows and filters loader, dialog, and container rows. Best effort: Google may show CAPTCHA, consent pages, anti-bot interstitials, regional layouts, or hide phone/profile/detail fields behind modals.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `return (function(){function clean(s){return (s||'').replace(/\\u00a0/g,' ').replace(/[ \\t]+/g,' ').tr...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 240,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-inject-javascript-3",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `return (function(){function clean(s){return (s||'').replace(/\\u00a0/g,' ').replace(/[ \\t]+/g,' ').tr...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 3200,
      "position_y": 240,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-3"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Extracts rows matching `.uscraper-lsa-row`. Confirm row count > 0 before running at scale.",
      "color": "#ee5396",
      "position_x": 3920,
      "position_y": 240,
      "width": 340,
      "height": 110,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    }
  ]
}