{"id":403,"date":"2017-02-15T23:22:40","date_gmt":"2017-02-15T22:22:40","guid":{"rendered":"https:\/\/ppc-scripts.eu\/?p=403\/"},"modified":"2017-02-16T08:48:22","modified_gmt":"2017-02-16T07:48:22","slug":"script-for-getting-more-suggestions","status":"publish","type":"post","link":"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/","title":{"rendered":"Script for getting more keyword suggestions"},"content":{"rendered":"<p>This script is useful for getting more search suggestions. It will generate a CSV with many keywords for you to use.<\/p>\n<p>To begin, you will need a simple spreadsheet with only one column called Keywords.<\/p>\n<p>In the settings of the script, input your source spreadsheet URL and the sheet name, which will be used in the final CSV name.<\/p>\n<p>Paste the code into this column and run the script.<\/p>\n<p><!--more--><\/p>\n<pre class=\"lang:js decode:true\">\/* SETTINGS *\/\r\n\r\n\/\/Your own copy of our template - \r\nvar SPREADSHEET_URL = \"\";\r\nvar SHEET_NAME = \"Keywords\";\r\nvar LANG = \"de\";\r\n\/* ------ *\/\r\n\r\nfunction main(){\r\n\r\nvar output = [];  \r\nvar spreadSheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);\r\nvar sheet = spreadSheet.getSheetByName(SHEET_NAME);\r\n\r\nvar numRows = sheet.getDataRange().getLastRow();\r\n\r\n  for (var i = 2; i &lt;= numRows; i++ ) {\r\n  keyword = sheet.getRange(i, 1).getValue();\r\n  var response = UrlFetchApp.fetch(\"http:\/\/suggestqueries.google.com\/complete\/search?&amp;client=chrome&amp;hl=\"+LANG+\"&amp;q=\"+keyword);\r\n  var json = response.getContentText();  \r\n  var data = JSON.parse(json);\r\n    for (var j = 0; j&lt; data[1].length; j++){\r\n      output.push([data[0],data[1][j]]);\r\n    }\r\n  Utilities.sleep(20);  \r\n  }\r\n \r\ndoCSV(output,\"Suggestions - \"+SHEET_NAME+\".csv\");\r\n\r\n}\r\n\r\nfunction doCSV(input,name) {\r\n var data = input.join(\"\\n\");\r\n var file = DriveApp.createFile(name, data);\r\n Logger.log(file.getUrl());\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This script is useful for getting more search suggestions. It will generate a CSV with many keywords for you to use. To begin, you will need a simple spreadsheet with only one column called Keywords. In the settings of the script, input your source spreadsheet URL and the sheet name, which will be used in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Script for getting more keyword suggestions - PPC Scripts<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Script for getting more keyword suggestions - PPC Scripts\" \/>\n<meta property=\"og:description\" content=\"This script is useful for getting more search suggestions. It will generate a CSV with many keywords for you to use. To begin, you will need a simple spreadsheet with only one column called Keywords. In the settings of the script, input your source spreadsheet URL and the sheet name, which will be used in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/\" \/>\n<meta property=\"og:site_name\" content=\"PPC Scripts\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/LyntServices\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-15T22:22:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-02-16T07:48:22+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@JKasparu\" \/>\n<meta name=\"twitter:site\" content=\"@JKasparu\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jakub Ka\u0161par\u016f\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ppc-scripts.eu\/#website\",\"url\":\"https:\/\/ppc-scripts.eu\/\",\"name\":\"PPC Scripts\",\"description\":\"by Lynt services\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ppc-scripts.eu\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/#webpage\",\"url\":\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/\",\"name\":\"Script for getting more keyword suggestions - PPC Scripts\",\"isPartOf\":{\"@id\":\"https:\/\/ppc-scripts.eu\/#website\"},\"datePublished\":\"2017-02-15T22:22:40+00:00\",\"dateModified\":\"2017-02-16T07:48:22+00:00\",\"author\":{\"@id\":\"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d\"},\"breadcrumb\":{\"@id\":\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ppc-scripts.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Script for getting more keyword suggestions\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d\",\"name\":\"Jakub Ka\\u0161par\\u016f\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ppc-scripts.eu\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g\",\"caption\":\"Jakub Ka\\u0161par\\u016f\"},\"description\":\"\\u010c\\u00edm v\\u00edc dat v Excelu m\\u00e1\\u0161, tolikr\\u00e1t si Linkbuilder\",\"sameAs\":[\"http:\/\/lynt.cz\",\"https:\/\/twitter.com\/JKasparu\"],\"url\":\"https:\/\/ppc-scripts.eu\/en\/author\/jakub\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Script for getting more keyword suggestions - PPC Scripts","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:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/","og_locale":"en_US","og_type":"article","og_title":"Script for getting more keyword suggestions - PPC Scripts","og_description":"This script is useful for getting more search suggestions. It will generate a CSV with many keywords for you to use. To begin, you will need a simple spreadsheet with only one column called Keywords. In the settings of the script, input your source spreadsheet URL and the sheet name, which will be used in [&hellip;]","og_url":"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/","og_site_name":"PPC Scripts","article_publisher":"https:\/\/www.facebook.com\/LyntServices","article_published_time":"2017-02-15T22:22:40+00:00","article_modified_time":"2017-02-16T07:48:22+00:00","twitter_card":"summary","twitter_creator":"@JKasparu","twitter_site":"@JKasparu","twitter_misc":{"Written by":"Jakub Ka\u0161par\u016f","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/ppc-scripts.eu\/#website","url":"https:\/\/ppc-scripts.eu\/","name":"PPC Scripts","description":"by Lynt services","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ppc-scripts.eu\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/#webpage","url":"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/","name":"Script for getting more keyword suggestions - PPC Scripts","isPartOf":{"@id":"https:\/\/ppc-scripts.eu\/#website"},"datePublished":"2017-02-15T22:22:40+00:00","dateModified":"2017-02-16T07:48:22+00:00","author":{"@id":"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d"},"breadcrumb":{"@id":"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ppc-scripts.eu\/en\/script-for-getting-more-suggestions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ppc-scripts.eu\/"},{"@type":"ListItem","position":2,"name":"Script for getting more keyword suggestions"}]},{"@type":"Person","@id":"https:\/\/ppc-scripts.eu\/#\/schema\/person\/9ea7ad2ac6d3dbecb6e5510875f97e1d","name":"Jakub Ka\u0161par\u016f","image":{"@type":"ImageObject","@id":"https:\/\/ppc-scripts.eu\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36e28826d2e1787626a73ae42c796dca?s=96&d=mm&r=g","caption":"Jakub Ka\u0161par\u016f"},"description":"\u010c\u00edm v\u00edc dat v Excelu m\u00e1\u0161, tolikr\u00e1t si Linkbuilder","sameAs":["http:\/\/lynt.cz","https:\/\/twitter.com\/JKasparu"],"url":"https:\/\/ppc-scripts.eu\/en\/author\/jakub\/"}]}},"_links":{"self":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts\/403"}],"collection":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":5,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"predecessor-version":[{"id":439,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/posts\/403\/revisions\/439"}],"wp:attachment":[{"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ppc-scripts.eu\/en\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}