{"id":22195228,"url":"https://github.com/utkarsh914/serp-extended","last_synced_at":"2025-07-26T23:32:27.648Z","repository":{"id":42744698,"uuid":"271052187","full_name":"utkarsh914/serp-extended","owner":"utkarsh914","description":"This npm module allows to execute search on Google with or without proxies. It provides different options for scraping the google results (either the list of the referenced sites or the number of results)","archived":false,"fork":false,"pushed_at":"2023-03-05T07:02:38.000Z","size":569,"stargazers_count":5,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-27T20:27:12.797Z","etag":null,"topics":["google","googlescraper","scrape","scrapegoogle","scraper","seo","serp","serps"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/serp-extended","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/utkarsh914.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-09T16:21:46.000Z","updated_at":"2024-03-21T23:33:04.000Z","dependencies_parsed_at":"2023-02-08T00:32:02.262Z","dependency_job_id":null,"html_url":"https://github.com/utkarsh914/serp-extended","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh914%2Fserp-extended","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh914%2Fserp-extended/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh914%2Fserp-extended/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh914%2Fserp-extended/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utkarsh914","download_url":"https://codeload.github.com/utkarsh914/serp-extended/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227732244,"owners_count":17811372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","googlescraper","scrape","scrapegoogle","scraper","seo","serp","serps"],"created_at":"2024-12-02T13:17:21.599Z","updated_at":"2024-12-02T13:17:22.243Z","avatar_url":"https://github.com/utkarsh914.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serp-extended\nThis module is an extention to 'serp' module.\nIt adds an option to exclude whichever websites you want from your search results.\nIt allows to execute search on Google with or without proxies.\nIt provides different options for scraping the google results (either the list of the referenced sites or the number of results).\n\n\n# Installation\n\n``` bash\n$ npm install serp-extended\n```\n\n\n# Simple usage\n\n``` javascript\nconst serp = require(\"serp-extended\");\n\nvar options = {\n  host : \"google.be\",\n  ignore: ['youtube.com', 'twitter.com'],\n  qs : {\n    q : \"test\",\n    filter : 0,\n    pws : 0,\n    nfpr: 1\n  },\n  num : 10\n};\n\nconst links = await serp.search(options);\n```\n\n*Understanding the options structure :*\n- For google.com, the param host is not necessary.\n- ignore contains an array of websites you want to exclude from your search results\n- qs can contain the usual Google search parameters : https://moz.com/ugc/the-ultimate-guide-to-the-google-search-parameters.\n- options.qs.q is the keyword\n- nfpr for exclusion of results from an auto-corrected query: 1 is disabled (default is 0)\n- num is the number of desired results (defaut is 10).\n- The options object can also contain all request options like http headers, ... . SERP is using the request module :  https://github.com/request/request\n- The user agent is not mandatory. Default value will be : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'\n\n\n## With proxy\n\nYou can add the proxy reference in the options\n\n``` javascript\nconst serp = require(\"serp-extended\");\n\nvar options = {\n  qs : {\n    q : \"test\",\n  },\n  proxy : \"http://username:password@host:port\"  \n};\n\n\nconst links = await serp.search(options);\n```\n\nYou can also use the module simple proxy if you have several proxies (see : https://github.com/christophebe/simple-proxies).\n\n``` javascript\nconst  serp = require(\"serp-extended\");\n\nvar options = {\n  qs : {\n    q : \"test\",\n  },\n  proxyList : proxyList\n};\n\nconst links = await serp.search(options);\n```\n\n## Delay between requests\n\nIt is possible to add a delay between each request made on Google with the option *delay* (value in ms).\nThe delay is also applied when the tool read the next result page on Google.\n\n\n``` javascript\nconst serp = require(\"serp-extended\");\n\nvar options = {\n\n  qs : {\n    q : \"test\"\n  },\n  num : 100,\n  delay : 2000 // in ms\n};\n\nconst links = await serp.search(options);\n```\n\n## Retry if error\n\nIf an error occurs (timeout, network issue, invalid HTTP status, ...), it is possible to retry the same request on Google. If a proxyList is set into the options, another proxy will be used.\n\n``` javascript\nconst serp = require(\"serp-extended\");\n\nvar options = {\n\n  qs : {\n    q : \"test\"\n  },\n  num : 100,\n  retry : 3,\n  proxyList : proxyList\n};\n\nconst links = serp.search(options);\n```\n\n## Get the number of results\n\nYou can get the number of indexed pages in Google by using the following code.\n\n\n``` javascript\nconst serp = require(\"serp-extended\");\n\nvar options = {\n  host : \"google.fr\",\n  numberOfResults : true,\n  qs : {\n    q   : \"site:yoursite.com\"\n  },\n  proxyList : proxyList\n};\n\nconst numberOfResults = await serp.search(options);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh914%2Fserp-extended","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futkarsh914%2Fserp-extended","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh914%2Fserp-extended/lists"}