{"id":454,"date":"2025-10-24T13:59:16","date_gmt":"2025-10-24T20:59:16","guid":{"rendered":"https:\/\/simpkins.social\/cliff\/?p=454"},"modified":"2025-10-24T14:07:34","modified_gmt":"2025-10-24T21:07:34","slug":"tip-retrieving-all-google-search-results-in-n8n","status":"publish","type":"post","link":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/","title":{"rendered":"Tip: Retrieving all Google search results in n8n"},"content":{"rendered":"\n<p>To retrieve all of the Google search results for a given query string, you need to set up a do\/while loop within n8n. This approach expands <a href=\"https:\/\/simpkins.social\/cliff\/blog\/2025\/08\/26\/adding-google-search-to-my-n8n-driven-job-search-agent\/\">my workflow&#8217;s Google Search<\/a> to return more than 10 results per call. \ud83d\ude42<\/p>\n\n\n\n<p>Below is JSON that I run as a sub-workflow, it does six things:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>Initialize with Input<\/code> code node creates the necessary values for the workflow to run\n<ul class=\"wp-block-list\">\n<li>CX string required by the <a href=\"https:\/\/console.cloud.google.com\/apis\/library\/customsearch.googleapis.com\">Google Custom Search API<\/a>.<\/li>\n\n\n\n<li>The <code>query<\/code> to run &#8211; I pass this into the sub-workflow, but I set up a default value for testing\/debugging purposes. In a non-personal environment, I wouldn&#8217;t do this. \ud83d\ude09<\/li>\n\n\n\n<li>And it initializes various &#8216;loop variables&#8217; (<code>start<\/code>, <code>allResults<\/code>, <code>hasMoreResults<\/code>, <code>totalResults<\/code>, <code>currentPage<\/code>, and <code>inputData<\/code>).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>Google Search Request<\/code> is an <code>httpRequest<\/code> node that executes the query using the following query parameters:\n<ul class=\"wp-block-list\">\n<li><code>key<\/code> passes your <a href=\"https:\/\/console.cloud.google.com\/apis\/credentials\">Google API key<\/a> <br>ToDo &#8211; I would like to store this in the n8n credentials, but I can&#8217;t figure out how yet. \ud83d\ude41 <\/li>\n\n\n\n<li>The other required search parameters, including <code>start<\/code>, which tells Google which page of results to return.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>Process Results<\/code> code node examines the output from the <code>httpRequest<\/code> and updates all of the relevant &#8216;loop variables&#8217; and concatenates the items returned from <code>httpRequest<\/code> to the <code>allResults<\/code> and updates relevant variables for the next run (if one is needed).<\/li>\n\n\n\n<li><code>Should Continue?<\/code> is an <code>if<\/code> node that checks <code>hasMoreResults<\/code> from the prior node to determine if we need to retrieve more results, or whether we are done.<\/li>\n\n\n\n<li>If we are not done, and  <code>Should Continue?<\/code> returns true, we hit a pause node (Rate Limit Wait) to not overwhelm the API, and then we go to the <code>Google Search Request<\/code> node to request more results using the updated variables set in the <code>Process Results<\/code> node.<\/li>\n\n\n\n<li>Once we are done, <code>Prepare Output<\/code> formats the JSON that we will return back to the calling workflow<\/li>\n<\/ol>\n\n\n<script type=\"module\" src=\"https:\/\/cdn.jsdelivr.net\/npm\/@n8n_io\/n8n-demo-component\/n8n-demo.bundled.js\"><\/script>\r\n    <script type=\"application\/json\" id=\"workflow-json-69f18305e3678\">\r\n{\n  \"nodes\": [\n    {\n      \"parameters\": {\n        \"jsCode\": \"\/\/ Get input from parent workflow\\nconst input = $input.first().json;\\n\\n\/\/ Initialize variables for pagination with input from parent\\nconst baseUrl = \\\"https:\/\/www.googleapis.com\/customsearch\/v1\\\";\\nconst cx = \\\"CxId\\\";\\nconst query = input.query ||  \\\"Google Search String\\\";\\n\\n\/\/ Use siteSearch from input, with fallback\\nconst siteSearch = input.siteSearch || \\\"ashbyhq.com\\\";\\n\\n\/\/ Set initial values\\nreturn [{\\n  json: {\\n    cx: cx,\\n    query: query,\\n    siteSearch: siteSearch,\\n    start: 1,\\n    allResults: [],\\n    hasMoreResults: true,\\n    totalResults: 0,\\n    currentPage: 1,\\n    inputData: input \/\/ Store original input for reference\\n  }\\n}];\"\n      },\n      \"type\": \"n8n-nodes-base.code\",\n      \"typeVersion\": 2,\n      \"position\": [\n        -464,\n        544\n      ],\n      \"id\": \"bc652353-c902-43cd-a936-16ec471e6afe\",\n      \"name\": \"Initialize with Input\"\n    },\n    {\n      \"parameters\": {\n        \"url\": \"https:\/\/www.googleapis.com\/customsearch\/v1\",\n        \"sendQuery\": true,\n        \"queryParameters\": {\n          \"parameters\": [\n            {\n              \"name\": \"key\",\n              \"value\": \"GoogleApiKey\"\n            },\n            {\n              \"name\": \"q\",\n              \"value\": \"={{ $('Initialize with Input').first().json.query }}\"\n            },\n            {\n              \"name\": \"cx\",\n              \"value\": \"={{ $('Initialize with Input').first().json.cx }}\"\n            },\n            {\n              \"name\": \"siteSearch\",\n              \"value\": \"={{ $('Initialize with Input').first().json.siteSearch }}\"\n            },\n            {\n              \"name\": \"siteSearchFilter\",\n              \"value\": \"i\"\n            },\n            {\n              \"name\": \"start\",\n              \"value\": \"={{ $json.start }}\"\n            }\n          ]\n        },\n        \"options\": {}\n      },\n      \"type\": \"n8n-nodes-base.httpRequest\",\n      \"typeVersion\": 4.2,\n      \"position\": [\n        -208,\n        544\n      ],\n      \"id\": \"6cd9e1e3-fbf0-49c5-ab3b-db5da3621d94\",\n      \"name\": \"Google Search Request\"\n    },\n    {\n      \"parameters\": {\n        \"jsCode\": \"\/\/ Get the current search response\\nconst currentData = $input.first().json;\\nconst items = currentData.items || [];\\nconst searchInfo = currentData.searchInformation || {};\\nconst totalResults = parseInt(searchInfo.totalResults) || 0;\\nconst resultsPerPage = 10;\\n\\n\\n\/\/ Get static values from Initialize (never change)\\nconst initData = $(\\\"Initialize with Input\\\").first().json;\\n\\n\/\/ Get dynamic state: try from previous Process Results, fallback to Initialize\\nlet allResults, currentStart, currentPage, inputData;\\n\\nif (($('Process Results').isExecuted)) {\\n  \\n    \/\/ Get accumulated state from previous Process Results iteration\\n    const lastResults = $(\\\"Process Results\\\").first().json;\\n  \\n    allResults = lastResults.allResults || [];\\n    currentStart = lastResults.start || 1;\\n    currentPage = lastResults.currentPage || 1;\\n} else {\\n    \/\/ First iteration - use initial values\\n    allResults = initData.allResults || [];\\n    currentStart = initData.start || 1;\\n    currentPage = initData.currentPage || 1;\\n}\\n\\n\/\/ \u2705 FIX: Get accumulated state from the data that was sent to HTTP request\\n\/\/const previousState = $(\\\"Google Search Request\\\").first().json;\\n\/\/\\n\/\/ Get the existing accumulated results\\n\/\/let allResults = previousState.allResults || [];\\n\/\/let currentStart = previousState.start || 1;\\n\/\/let currentPage = previousState.currentPage || 1;\\n\\n\/\/ Add NEW results to existing collection\\nallResults = allResults.concat(items);\\n\\n\/\/ Calculate next iteration\\nconst nextStart = currentStart + resultsPerPage;\\nconst hasMoreResults = nextStart <= Math.min(totalResults, 100) &#038;&#038; items.length === resultsPerPage;\\nconst shouldContinue = hasMoreResults &#038;&#038; allResults.length < 100;\\n\\nconsole.log(`Page ${currentPage}: Added ${items.length} results. Total: ${allResults.length}`);\\n\\nreturn [{\\n  json: {\\n    start: nextStart,\\n    allResults: allResults, \/\/ Now accumulates properly!\\n    hasMoreResults: shouldContinue,\\n    totalResults: totalResults,\\n    currentPage: currentPage + 1,\\n    currentBatchSize: items.length,\\n    totalCollected: allResults.length\\n  }\\n}];\"\n      },\n      \"type\": \"n8n-nodes-base.code\",\n      \"typeVersion\": 2,\n      \"position\": [\n        16,\n        544\n      ],\n      \"id\": \"4a6e9fcb-993e-45a6-b457-b3b5bbe2c337\",\n      \"name\": \"Process Results\"\n    },\n    {\n      \"parameters\": {\n        \"conditions\": {\n          \"options\": {\n            \"caseSensitive\": true,\n            \"leftValue\": \"\",\n            \"typeValidation\": \"strict\"\n          },\n          \"conditions\": [\n            {\n              \"id\": \"continue-condition\",\n              \"leftValue\": \"={{ $json.hasMoreResults }}\",\n              \"rightValue\": true,\n              \"operator\": {\n                \"type\": \"boolean\",\n                \"operation\": \"equals\"\n              }\n            }\n          ],\n          \"combinator\": \"and\"\n        },\n        \"options\": {}\n      },\n      \"type\": \"n8n-nodes-base.if\",\n      \"typeVersion\": 2,\n      \"position\": [\n        224,\n        544\n      ],\n      \"id\": \"c1684264-762c-453e-9d65-4af439687787\",\n      \"name\": \"Should Continue?\"\n    },\n    {\n      \"parameters\": {\n        \"jsCode\": \"\/\/ Prepare final output for parent workflow\\nconst finalData = $input.first().json;\\n\\n\/\/ Return the results in a format expected by parent workflow\\nreturn [{\\n  json: {\\n    success: true,\\n    siteSearch: finalData.siteSearch,\\n    searchSummary: {\\n      totalResultsFound: finalData.totalResults,\\n      totalResultsCollected: finalData.totalCollected,\\n      pagesProcessed: finalData.currentPage - 1,\\n      query: finalData.query,\\n      siteSearch: finalData.siteSearch\\n    },\\n    allResults: finalData.allResults,\\n    originalInput: finalData.inputData\\n  }\\n}];\"\n      },\n      \"type\": \"n8n-nodes-base.code\",\n      \"typeVersion\": 2,\n      \"position\": [\n        448,\n        544\n      ],\n      \"id\": \"bc653dfb-a375-446c-8580-cde7243eb1f6\",\n      \"name\": \"Prepare Output\"\n    },\n    {\n      \"parameters\": {\n        \"amount\": 1\n      },\n      \"type\": \"n8n-nodes-base.wait\",\n      \"typeVersion\": 1.1,\n      \"position\": [\n        -384,\n        400\n      ],\n      \"id\": \"cb170712-e536-45bf-8b50-ca54b5d64622\",\n      \"name\": \"Rate Limit Wait\",\n      \"webhookId\": \"176bd37b-6b03-4041-9ae2-2d2b118ec319\"\n    },\n    {\n      \"parameters\": {\n        \"workflowInputs\": {\n          \"values\": [\n            {\n              \"name\": \"siteSearch\"\n            },\n            {\n              \"name\": \"query\"\n            }\n          ]\n        }\n      },\n      \"type\": \"n8n-nodes-base.executeWorkflowTrigger\",\n      \"typeVersion\": 1.1,\n      \"position\": [\n        -720,\n        544\n      ],\n      \"id\": \"63400565-237c-455a-b605-786dcd7e90d1\",\n      \"name\": \"When Executed by Another Workflow\"\n    }\n  ],\n  \"connections\": {\n    \"Initialize with Input\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Google Search Request\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Google Search Request\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Process Results\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Process Results\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Should Continue?\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Should Continue?\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Rate Limit Wait\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ],\n        [\n          {\n            \"node\": \"Prepare Output\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Prepare Output\": {\n      \"main\": [\n        []\n      ]\n    },\n    \"Rate Limit Wait\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Google Search Request\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"When Executed by Another Workflow\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Initialize with Input\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    }\n  },\n  \"pinData\": {},\n  \"meta\": {\n    \"instanceId\": \"0bae1fab76f5b3d7d761d2213eecaaf39f2590bd0b5cd104d1482f6fd0bab96b\"\n  }\n}\r\n    <\/script>\r\n    \r\n    <n8n-demo id=\"workflow-demo-69f18305e3679\"><\/n8n-demo>\r\n    \r\n    <script>\r\n    document.addEventListener(\"DOMContentLoaded\", function() {\r\n        const jsonElement = document.getElementById(\"workflow-json-69f18305e3678\");\r\n        const workflowElement = document.getElementById(\"workflow-demo-69f18305e3679\");\r\n        \r\n        if (jsonElement && workflowElement) {\r\n            const workflowData = jsonElement.textContent.trim();\r\n            workflowElement.setAttribute(\"workflow\", workflowData);\r\n        }\r\n    });\r\n    <\/script>\n\n\n<p>In the parent workflow, this is what it looks like to call this workflow:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set the search parameters - This is optional; I do this as a separate step because I use the same search string for multiple site searches.<\/li>\n\n\n\n<li>I call the Google Search subworkflow and pass the domain name in the <code>siteSearch<\/code> input field.<\/li>\n\n\n\n<li>Process the search results, extracting relevant summary values that I use later. This node is optional.<\/li>\n\n\n\n<li>Split out the single result set into a collection of results that I can use in merge\/combine nodes later<\/li>\n<\/ol>\n\n\n\r\n    <script type=\"application\/json\" id=\"workflow-json-69f18305e3773\">\r\n{\n  \"nodes\": [\n    {\n      \"parameters\": {\n        \"assignments\": {\n          \"assignments\": [\n            {\n              \"id\": \"requestId\",\n              \"name\": \"query\",\n              \"value\": \"Your Google Search String\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"options\": {}\n      },\n      \"type\": \"n8n-nodes-base.set\",\n      \"typeVersion\": 3.4,\n      \"position\": [\n        -288,\n        -288\n      ],\n      \"id\": \"677fc943-7daf-48ca-95e5-632f3e311a78\",\n      \"name\": \"Set Search Parameters\"\n    },\n    {\n      \"parameters\": {\n        \"assignments\": {\n          \"assignments\": [\n            {\n              \"id\": \"searchResults\",\n              \"name\": \"searchResults\",\n              \"value\": \"={{ $json.allResults }}\",\n              \"type\": \"array\"\n            },\n            {\n              \"id\": \"resultCount\",\n              \"name\": \"resultCount\",\n              \"value\": \"={{ $json.allResults.length }}\",\n              \"type\": \"number\"\n            },\n            {\n              \"id\": \"searchSummary\",\n              \"name\": \"searchSummary\",\n              \"value\": \"={{ $json.searchSummary }}\",\n              \"type\": \"object\"\n            },\n            {\n              \"id\": \"siteSearched\",\n              \"name\": \"siteSearched\",\n              \"value\": \"={{ $json.siteSearch }}\",\n              \"type\": \"string\"\n            }\n          ]\n        },\n        \"options\": {}\n      },\n      \"type\": \"n8n-nodes-base.set\",\n      \"typeVersion\": 3.4,\n      \"position\": [\n        320,\n        -288\n      ],\n      \"id\": \"f7392454-5a98-4a65-a9d5-622247fcbb37\",\n      \"name\": \"Process Search Results\"\n    },\n    {\n      \"parameters\": {\n        \"fieldToSplitOut\": \"searchResults\",\n        \"options\": {}\n      },\n      \"type\": \"n8n-nodes-base.splitOut\",\n      \"typeVersion\": 1,\n      \"position\": [\n        544,\n        -288\n      ],\n      \"id\": \"6c7c0a11-b26d-4719-8ab7-29255c70b0ca\",\n      \"name\": \"Split Individual Results\"\n    },\n    {\n      \"parameters\": {\n        \"workflowId\": {\n          \"__rl\": true,\n          \"value\": \"aQ1WS84f3zOKjFUD\",\n          \"mode\": \"list\",\n          \"cachedResultUrl\": \"\/workflow\/aQ1WS84f3zOKjFUD\",\n          \"cachedResultName\": \"Sub WF - Run Google Search Query\"\n        },\n        \"workflowInputs\": {\n          \"mappingMode\": \"defineBelow\",\n          \"value\": {\n            \"siteSearch\": \"siteToSearch.com\",\n            \"query\": \"={{ $json.query }}\"\n          },\n          \"matchingColumns\": [],\n          \"schema\": [\n            {\n              \"id\": \"siteSearch\",\n              \"displayName\": \"siteSearch\",\n              \"required\": false,\n              \"defaultMatch\": false,\n              \"display\": true,\n              \"canBeUsedToMatch\": true,\n              \"type\": \"string\",\n              \"removed\": false\n            },\n            {\n              \"id\": \"query\",\n              \"displayName\": \"query\",\n              \"required\": false,\n              \"defaultMatch\": false,\n              \"display\": true,\n              \"canBeUsedToMatch\": true,\n              \"type\": \"string\",\n              \"removed\": false\n            }\n          ],\n          \"attemptToConvertTypes\": false,\n          \"convertFieldsToString\": true\n        },\n        \"options\": {\n          \"waitForSubWorkflow\": true\n        }\n      },\n      \"type\": \"n8n-nodes-base.executeWorkflow\",\n      \"typeVersion\": 1.3,\n      \"position\": [\n        96,\n        -288\n      ],\n      \"id\": \"69e3be04-514c-4721-a579-5a6ed4ad00fb\",\n      \"name\": \"Search - SiteName\"\n    }\n  ],\n  \"connections\": {\n    \"Set Search Parameters\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Search - SiteName\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Process Search Results\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Split Individual Results\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Split Individual Results\": {\n      \"main\": [\n        []\n      ]\n    },\n    \"Search - SiteName\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Process Search Results\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    }\n  },\n  \"pinData\": {},\n  \"meta\": {\n    \"instanceId\": \"0bae1fab76f5b3d7d761d2213eecaaf39f2590bd0b5cd104d1482f6fd0bab96b\"\n  }\n}\r\n    <\/script>\r\n    \r\n    <n8n-demo id=\"workflow-demo-69f18305e3774\"><\/n8n-demo>\r\n    \r\n    <script>\r\n    document.addEventListener(\"DOMContentLoaded\", function() {\r\n        const jsonElement = document.getElementById(\"workflow-json-69f18305e3773\");\r\n        const workflowElement = document.getElementById(\"workflow-demo-69f18305e3774\");\r\n        \r\n        if (jsonElement && workflowElement) {\r\n            const workflowData = jsonElement.textContent.trim();\r\n            workflowElement.setAttribute(\"workflow\", workflowData);\r\n        }\r\n    });\r\n    <\/script>\n\n\n<p>This approach works for me because I tightly scope my search string <em>and <\/em>the domain. As you experiment with it, consider capping the total number of results or pages that you retrieve from Google.<\/p>\n\n\n\n<p>I hope that this helps you do more with your n8n workflows. If you have questions on this approach or suggestions on how to do it better, let me know!<\/p>\n\n\n\n<p><em>Side Note: This is the first post to use a WordPress plugin I built to display n8n workflow JSON code visually using the <a href=\"https:\/\/www.jsdelivr.com\/package\/npm\/@n8n_io\/n8n-demo-component\">n8n-demo-component project<\/a> - I hope you enjoy it!<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To retrieve all of the Google search results for a given query string, you need to set up a do\/while loop within n8n. This approach expands my workflow&#8217;s Google Search&hellip;<\/p>\n","protected":false},"author":1,"featured_media":496,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12,29],"tags":[16,25],"class_list":["post-454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-funemployment","category-n8n","tag-learning","tag-tips-tricks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tip: Retrieving all Google search results in n8n - Cliff Simpkins<\/title>\n<meta name=\"description\" content=\"How I retrieve all Google search results in my n8n workflow - including approach, sample JSONs, and custom code nodes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tip: Retrieving all Google search results in n8n - Cliff Simpkins\" \/>\n<meta property=\"og:description\" content=\"How I retrieve all Google search results in my n8n workflow - including approach, sample JSONs, and custom code nodes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/\" \/>\n<meta property=\"og:site_name\" content=\"Cliff Simpkins\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-24T20:59:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-24T21:07:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1727\" \/>\n\t<meta property=\"og:image:height\" content=\"544\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"cliff.simpkins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cliff.simpkins\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/\"},\"author\":{\"name\":\"cliff.simpkins\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/#\\\/schema\\\/person\\\/bba546ac4d77da1fb51bc4030238e864\"},\"headline\":\"Tip: Retrieving all Google search results in n8n\",\"datePublished\":\"2025-10-24T20:59:16+00:00\",\"dateModified\":\"2025-10-24T21:07:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/\"},\"wordCount\":475,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/simpkins.social\\\/cliff\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1\",\"keywords\":[\"Learning\",\"Tips &amp; Tricks\"],\"articleSection\":[\"Funemployment\",\"N8n\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/\",\"url\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/\",\"name\":\"Tip: Retrieving all Google search results in n8n - Cliff Simpkins\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/simpkins.social\\\/cliff\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1\",\"datePublished\":\"2025-10-24T20:59:16+00:00\",\"dateModified\":\"2025-10-24T21:07:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/#\\\/schema\\\/person\\\/bba546ac4d77da1fb51bc4030238e864\"},\"description\":\"How I retrieve all Google search results in my n8n workflow - including approach, sample JSONs, and custom code nodes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/simpkins.social\\\/cliff\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/simpkins.social\\\/cliff\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1\",\"width\":1727,\"height\":544,\"caption\":\"n8n screenshot of workflow to iterate over Google search results\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/2025\\\/10\\\/24\\\/tip-retrieving-all-google-search-results-in-n8n\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tip: Retrieving all Google search results in n8n\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/#website\",\"url\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/\",\"name\":\"Cliff Simpkins\",\"description\":\"Personal site + blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/#\\\/schema\\\/person\\\/bba546ac4d77da1fb51bc4030238e864\",\"name\":\"cliff.simpkins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07b113647e819a448cfc8545b476db50a641b9d43808a2c399af84e724d078d2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07b113647e819a448cfc8545b476db50a641b9d43808a2c399af84e724d078d2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07b113647e819a448cfc8545b476db50a641b9d43808a2c399af84e724d078d2?s=96&d=mm&r=g\",\"caption\":\"cliff.simpkins\"},\"url\":\"https:\\\/\\\/simpkins.social\\\/cliff\\\/blog\\\/author\\\/cliff-simpkins\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tip: Retrieving all Google search results in n8n - Cliff Simpkins","description":"How I retrieve all Google search results in my n8n workflow - including approach, sample JSONs, and custom code nodes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/","og_locale":"en_US","og_type":"article","og_title":"Tip: Retrieving all Google search results in n8n - Cliff Simpkins","og_description":"How I retrieve all Google search results in my n8n workflow - including approach, sample JSONs, and custom code nodes.","og_url":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/","og_site_name":"Cliff Simpkins","article_published_time":"2025-10-24T20:59:16+00:00","article_modified_time":"2025-10-24T21:07:34+00:00","og_image":[{"width":1727,"height":544,"url":"https:\/\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png","type":"image\/png"}],"author":"cliff.simpkins","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cliff.simpkins","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#article","isPartOf":{"@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/"},"author":{"name":"cliff.simpkins","@id":"https:\/\/simpkins.social\/cliff\/#\/schema\/person\/bba546ac4d77da1fb51bc4030238e864"},"headline":"Tip: Retrieving all Google search results in n8n","datePublished":"2025-10-24T20:59:16+00:00","dateModified":"2025-10-24T21:07:34+00:00","mainEntityOfPage":{"@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/"},"wordCount":475,"commentCount":1,"image":{"@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1","keywords":["Learning","Tips &amp; Tricks"],"articleSection":["Funemployment","N8n"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/","url":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/","name":"Tip: Retrieving all Google search results in n8n - Cliff Simpkins","isPartOf":{"@id":"https:\/\/simpkins.social\/cliff\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#primaryimage"},"image":{"@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1","datePublished":"2025-10-24T20:59:16+00:00","dateModified":"2025-10-24T21:07:34+00:00","author":{"@id":"https:\/\/simpkins.social\/cliff\/#\/schema\/person\/bba546ac4d77da1fb51bc4030238e864"},"description":"How I retrieve all Google search results in my n8n workflow - including approach, sample JSONs, and custom code nodes.","breadcrumb":{"@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#primaryimage","url":"https:\/\/i0.wp.com\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1","contentUrl":"https:\/\/i0.wp.com\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1","width":1727,"height":544,"caption":"n8n screenshot of workflow to iterate over Google search results"},{"@type":"BreadcrumbList","@id":"https:\/\/simpkins.social\/cliff\/blog\/2025\/10\/24\/tip-retrieving-all-google-search-results-in-n8n\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpkins.social\/cliff\/"},{"@type":"ListItem","position":2,"name":"Tip: Retrieving all Google search results in n8n"}]},{"@type":"WebSite","@id":"https:\/\/simpkins.social\/cliff\/#website","url":"https:\/\/simpkins.social\/cliff\/","name":"Cliff Simpkins","description":"Personal site + blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpkins.social\/cliff\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/simpkins.social\/cliff\/#\/schema\/person\/bba546ac4d77da1fb51bc4030238e864","name":"cliff.simpkins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/07b113647e819a448cfc8545b476db50a641b9d43808a2c399af84e724d078d2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/07b113647e819a448cfc8545b476db50a641b9d43808a2c399af84e724d078d2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/07b113647e819a448cfc8545b476db50a641b9d43808a2c399af84e724d078d2?s=96&d=mm&r=g","caption":"cliff.simpkins"},"url":"https:\/\/simpkins.social\/cliff\/blog\/author\/cliff-simpkins\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/simpkins.social\/cliff\/wp-content\/uploads\/2025\/10\/2025-10-LI-Retrieving-all-Google-Search-Results.png?fit=1727%2C544&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":20,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":494,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/posts\/454\/revisions\/494"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/media\/496"}],"wp:attachment":[{"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpkins.social\/cliff\/wp-json\/wp\/v2\/tags?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}