{"id":25999552,"url":"https://github.com/nv7-github/googlesearch","last_synced_at":"2025-05-14T02:08:48.357Z","repository":{"id":36990951,"uuid":"277392592","full_name":"Nv7-GitHub/googlesearch","owner":"Nv7-GitHub","description":"A Python library for scraping the Google search engine.","archived":false,"fork":false,"pushed_at":"2025-02-03T08:13:41.000Z","size":57,"stargazers_count":654,"open_issues_count":26,"forks_count":146,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-05T07:40:27.100Z","etag":null,"topics":["python","python-library","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/googlesearch-python/","language":"Python","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/Nv7-GitHub.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-05T22:20:14.000Z","updated_at":"2025-04-29T04:55:17.000Z","dependencies_parsed_at":"2024-01-14T19:14:30.511Z","dependency_job_id":"1037bd92-720b-4fe5-b5a6-ba99ec206749","html_url":"https://github.com/Nv7-GitHub/googlesearch","commit_stats":{"total_commits":47,"total_committers":17,"mean_commits":2.764705882352941,"dds":0.851063829787234,"last_synced_commit":"fcafc8300e09e8f140a7216ede16aa022b754857"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nv7-GitHub%2Fgooglesearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nv7-GitHub%2Fgooglesearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nv7-GitHub%2Fgooglesearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nv7-GitHub%2Fgooglesearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nv7-GitHub","download_url":"https://codeload.github.com/Nv7-GitHub/googlesearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053202,"owners_count":22006717,"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":["python","python-library","python3"],"created_at":"2025-03-05T18:29:14.096Z","updated_at":"2025-05-14T02:08:43.338Z","avatar_url":"https://github.com/Nv7-GitHub.png","language":"Python","readme":"# googlesearch\ngooglesearch is a Python library for searching Google, easily. googlesearch uses requests and BeautifulSoup4 to scrape Google. \n\n## Installation\nTo install, run the following command:\n```bash\npython3 -m pip install googlesearch-python\n```\n\n## Usage\nTo get results for a search term, simply use the search function in googlesearch. For example, to get results for \"Google\" in Google, just run the following program:\n```python\nfrom googlesearch import search\nsearch(\"Google\")\n```\n\n## Additional options\ngooglesearch supports a few additional options. By default, googlesearch returns 10 results. This can be changed. To get a 100 results on Google for example, run the following program.\n```python\nfrom googlesearch import search\nsearch(\"Google\", num_results=100)\n```\nIf you want to have unique links in your search result, you can use the `unique` option as in the following program.\n```python\nfrom googlesearch import search\nsearch(\"Google\", num_results=100, unique=True)\n```\nIn addition, you can change the language google searches in. For example, to get results in French run the following program:\n```python\nfrom googlesearch import search\nsearch(\"Google\", lang=\"fr\")\n```\nYou can also specify the region ([Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)) for your search results. For example, to get results specifically from the US run the following program:\n```python\nfrom googlesearch import search\nsearch(\"Google\", region=\"us\")\n```\nIf you want to turn off the safe search function (this function is on by default), you can do this:\n```python\nfrom googlesearch import search\nsearch(\"Google\", safe=None)\n```\nTo extract more information, such as the description or the result URL, use an advanced search:\n```python\nfrom googlesearch import search\nsearch(\"Google\", advanced=True)\n# Returns a list of SearchResult\n# Properties:\n# - title\n# - url\n# - description\n```\nIf requesting more than 100 results, googlesearch will send multiple requests to go through the pages. To increase the time between these requests, use `sleep_interval`:\n```python\nfrom googlesearch import search\nsearch(\"Google\", sleep_interval=5, num_results=200)\n```\n\n```\nIf requesting more than 10 results, but want to manage the batching yourself? \nUse `start_num` to specify the start number of the results you want to get:\n```python\nfrom googlesearch import search\nsearch(\"Google\", sleep_interval=5, num_results=200, start_result=10)\n```\n\nIf you are using a HTTP Rotating Proxy which requires you to install their CA Certificate, you can simply add `ssl_verify=False` in the `search()` method to avoid SSL Verification.\n```python\nfrom googlesearch import search\n\n\nproxy = 'http://username:password@proxy.host.com:8080/'\n# or for socks5\n# proxy = 'socks5://username:password@proxy.host.com:1080/'\n\nj = search(\"proxy test\", num_results=100, lang=\"en\", proxy=proxy, ssl_verify=False)\nfor i in j:\n    print(i)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnv7-github%2Fgooglesearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnv7-github%2Fgooglesearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnv7-github%2Fgooglesearch/lists"}