<div align="center">
<p>Special thanks to:</p>
<div>
<img src="https://user-images.githubusercontent.com/81998012/231172985-81515e8b-bc41-46b4-83fa-d129d5f3e718.svg" width="100" alt="SerpApi">
</div>
<a href="https://serpapi.com">
<b>API to get search engine results with ease.</b>
</a>
</div>
<h1 align="center">SEO Keyword Research Tool 🔎</h1>
<p align="center">
Python SEO keywords suggestion tool that pulls data from Google Autocomplete, People Also Ask and Related Searches.
</p>
<div align="center">
<img src="https://user-images.githubusercontent.com/78694043/231768966-187e9ab2-fc8f-460b-bf9f-bcb39cc5a968.svg" width="700" alt="SerpApi">
</div>
<div align="center">
<a href="https://pepy.tech/project/seo-keyword-research-tool">![Downloads](https://static.pepy.tech/personalized-badge/seo-keyword-research-tool?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)</a>
<a href="">![licence](https://img.shields.io/github/license/chukhraiartur/seo-keyword-research-tool?color=blue)</a>
</div>
![seo-keywords-research-tool](https://user-images.githubusercontent.com/78694043/221098691-5ad4d2b9-0ebd-4c65-ab1e-47a599955e9c.gif)
This tool uses [SerpApi](https://serpapi.com/) as a tool to parse data from Google search results. You can use provided API key that will be available after installation, however, it's purely for testing purposes to see if the tool fits your needs. If you'll be using it for your own purpose (personal or commercial), you have to use [your own SerpApi key](https://serpapi.com/manage-api-key).
## ⚙️Installation
```bash
$ pip install seo-keyword-research-tool
```
## 🤹♂️Usage
#### Available CLI arugments:
```bash
$ seo -h
```
```lang-none
SerpApi SEO Keyword Research Tool [-h] -q [-e [...]] [-dl] [-st] [-ak] [-gd] [-gl] [-hl]
Extract keywrods from: Google Autocomplete, People Also Ask, and People Also Search and saves data to CSV/JSON/TXT.
optional arguments:
-h, --help show this help message and exit
-q , --query Search query (required).
-e [ ...], --engines [ ...]
Choices of engines to extract: Autocomplete (ac), Related Searches (rs), People Also Ask (rq). You can select multiple engines. All engines are selected by default.
-dl , --depth-limit Depth limit for People Also Ask. Default is 0, first 2-4 results.
-st , --save-to Saves the results in the current directory in the selected format (CSV, JSON, TXT). Default CSV.
-ak , --api-key Your SerpApi API key: https://serpapi.com/manage-api-key. Default is a test API key to test CLI.
-gd , --domain Google domain: https://serpapi.com/google-domains. Default google.com.
-gl , --country Country of the search: https://serpapi.com/google-countries. Default us.
-hl , --lang Language of the search: https://serpapi.com/google-languages. Default en.
Found a bug? Open issue: https://github.com/chukhraiartur/seo-keyword-research-tool/issues
```
The `--depth-limit` argument for People Also Ask can be set from `0` to `4`. For each depth limit value, the number of results returned grows exponentially. Below is a table showing how the depth limit argument is affected:
| Depth limit | Number of results | Explanation |
|-------------|-------------------|-------------|
| 0 | 4 | Standard results |
| 1 | 12 | 4*2 = 8 + 4 = 12 |
| 2 | 36 | 8*3 = 24 + 12 = 36 |
| 3 | 108 | 24*3 = 72 + 36 = 108 |
| 4 | 324 | 72*3 = 216 + 108 = 324 |
📌Note: This is how the logic works for the `google.com` domain, on other domains the results may differ.
#### Simple example:
```bash
$ seo -q "starbucks coffee"
```
```json
{
"auto_complete": [
"starbucks coffee menu",
"starbucks coffee cups",
"starbucks coffee sizes",
"starbucks coffee mugs",
"starbucks coffee gear",
"starbucks coffee beans",
"starbucks coffee near me",
"starbucks coffee traveler"
],
"related_searches": [
"starbucks near me",
"starbucks coffee price",
"starbucks coffee beans",
"starbucks company",
"starbucks coffee menu",
"starbucks merchandise",
"starbucks coffee bags"
],
"related_questions": [
"What is the most popular Starbucks coffee?",
"What is the number 1 Starbucks drink?",
"What is the Tiktok coffee from Starbucks?",
"Why is Starbucks coffee so famous?"
]
}
```
#### Advanced example:
This example will use [related questions API](https://serpapi.com/related-questions) engine with a depth limit value of 2, and saves data to JSON:
```bash
$ seo --api-key "<your_serpapi_api_key>" \
> -q "starbucks coffee" \
> -e rq \
> -dl 2 \
> -gd google.co.uk \
> -gl uk \
> -hl en \
> -st json \
```
```json
{
"related_questions": [
"What is the best coffee in Starbucks?",
"What is a popular Starbucks coffee?",
"What is the number 1 Starbucks drink?",
"Is Starbucks expensive?",
"What should I try at Starbucks for the first time?",
"Which Starbucks coffee is best and sweet?",
"What is famous in Starbucks in India?",
"Which Starbucks drink is the best in India?",
"Why is Starbucks famous?",
"What should I order in Starbucks?",
"What is the least bitter coffee at Starbucks?",
"What's the creamiest coffee?",
"Which Starbucks coffee is best in taste?",
"Which Starbucks coffee is best and sweet?",
"Which Starbucks coffee is best in India?",
"Which Starbucks coffee is best for first time?",
"Why is Starbucks famous?",
"What should I order at Starbucks for the first time?",
"What is the best Starbucks drink for a first time coffee drinker?",
"What should I order in Starbucks?",
"What should I try at Starbucks for the first time?",
"What is the most famous Starbucks drink?",
"Which Starbucks coffee is best in taste?",
"What coffee orders for beginners?",
"What is the best thing to get at Starbucks?",
"Which Starbucks drink is best?",
"Which coffee is best in Starbucks India?",
"Which Starbucks coffee is best in taste?",
"Is Dunkin or Starbucks better?",
"What are the negatives of Starbucks?",
"Who has stronger coffee Starbucks or Dunkin?",
"Why do people prefer Starbucks?",
"Why is Starbucks so much better than Dunkin?",
"Is Starbucks coffee high quality?",
"Why is Starbucks coffee so good?",
"Do Starbucks employees get free food?"
]
}
```
#### Example of manual data extraction (without CLI):
```python
from SeoKeywordResearch import SeoKeywordResearch
keyword_research = SeoKeywordResearch(
query='starbucks coffee',
api_key='<your_serpapi_api_key>',
lang='en',
country='us',
domain='google.com'
)
auto_complete_results = keyword_research.get_auto_complete()
related_searches_results = keyword_research.get_related_searches()
related_questions_results = keyword_research.get_related_questions()
data = {
'auto_complete': auto_complete_results,
'related_searches': related_searches_results,
'related_questions': related_questions_results
}
keyword_research.save_to_json(data)
keyword_research.print_data(data)
```
### ✍Contributing
Feel free to open bug issue, something isn't working, what feature to add, or anything else related to Google autocomplete, related searches or people also ask.
Raw data
{
"_id": null,
"home_page": "https://github.com/chukhraiartur/seo-keyword-research-tool",
"name": "seo-keyword-research-tool",
"maintainer": "Artur Chukhrai, Dmitiry Zub",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "chukhraiartur@gmail.com, dimitryzub@gmail.com",
"keywords": "google scholar,serpapi,scraper,python,python google scholar,python google scholar api,web scraping,python web scraping,research,google-search-results,cli",
"author": "Artur Chukhrai",
"author_email": "chukhraiartur@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c0/0d/5d77b33ee2c5f8d550f0cd628a74b1e28e3ff5d0b1e8ecbcead4f10263ed/seo-keyword-research-tool-0.1.9.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n<p>Special thanks to:</p>\n<div>\n <img src=\"https://user-images.githubusercontent.com/81998012/231172985-81515e8b-bc41-46b4-83fa-d129d5f3e718.svg\" width=\"100\" alt=\"SerpApi\">\n</div>\n<a href=\"https://serpapi.com\">\n <b>API to get search engine results with ease.</b>\n</a>\n</div>\n\n<h1 align=\"center\">SEO Keyword Research Tool \ud83d\udd0e</h1>\n\n<p align=\"center\">\n Python SEO keywords suggestion tool that pulls data from Google Autocomplete, People Also Ask and Related Searches.\n</p>\n\n<div align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/78694043/231768966-187e9ab2-fc8f-460b-bf9f-bcb39cc5a968.svg\" width=\"700\" alt=\"SerpApi\">\n</div>\n\n<div align=\"center\">\n\n <a href=\"https://pepy.tech/project/seo-keyword-research-tool\">![Downloads](https://static.pepy.tech/personalized-badge/seo-keyword-research-tool?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)</a>\n <a href=\"\">![licence](https://img.shields.io/github/license/chukhraiartur/seo-keyword-research-tool?color=blue)</a>\n\n</div>\n\n![seo-keywords-research-tool](https://user-images.githubusercontent.com/78694043/221098691-5ad4d2b9-0ebd-4c65-ab1e-47a599955e9c.gif)\n\nThis tool uses [SerpApi](https://serpapi.com/) as a tool to parse data from Google search results. You can use provided API key that will be available after installation, however, it's purely for testing purposes to see if the tool fits your needs. If you'll be using it for your own purpose (personal or commercial), you have to use [your own SerpApi key](https://serpapi.com/manage-api-key).\n\n\n## \u2699\ufe0fInstallation\n\n```bash\n$ pip install seo-keyword-research-tool\n```\n\n\n## \ud83e\udd39\u200d\u2642\ufe0fUsage\n\n#### Available CLI arugments:\n\n```bash\n$ seo -h\n```\n\n```lang-none\nSerpApi SEO Keyword Research Tool [-h] -q [-e [...]] [-dl] [-st] [-ak] [-gd] [-gl] [-hl]\n\nExtract keywrods from: Google Autocomplete, People Also Ask, and People Also Search and saves data to CSV/JSON/TXT.\n\noptional arguments:\n -h, --help show this help message and exit\n -q , --query Search query (required).\n -e [ ...], --engines [ ...]\n Choices of engines to extract: Autocomplete (ac), Related Searches (rs), People Also Ask (rq). You can select multiple engines. All engines are selected by default.\n -dl , --depth-limit Depth limit for People Also Ask. Default is 0, first 2-4 results.\n -st , --save-to Saves the results in the current directory in the selected format (CSV, JSON, TXT). Default CSV.\n -ak , --api-key Your SerpApi API key: https://serpapi.com/manage-api-key. Default is a test API key to test CLI.\n -gd , --domain Google domain: https://serpapi.com/google-domains. Default google.com.\n -gl , --country Country of the search: https://serpapi.com/google-countries. Default us.\n -hl , --lang Language of the search: https://serpapi.com/google-languages. Default en.\n\nFound a bug? Open issue: https://github.com/chukhraiartur/seo-keyword-research-tool/issues\n```\n\nThe `--depth-limit` argument for People Also Ask can be set from `0` to `4`. For each depth limit value, the number of results returned grows exponentially. Below is a table showing how the depth limit argument is affected:\n\n| Depth limit | Number of results | Explanation |\n|-------------|-------------------|-------------|\n| 0 | 4 | Standard results |\n| 1 | 12 | 4*2 = 8 + 4 = 12 |\n| 2 | 36 | 8*3 = 24 + 12 = 36 |\n| 3 | 108 | 24*3 = 72 + 36 = 108 |\n| 4 | 324 | 72*3 = 216 + 108 = 324 |\n\n\ud83d\udcccNote: This is how the logic works for the `google.com` domain, on other domains the results may differ.\n\n#### Simple example:\n\n```bash\n$ seo -q \"starbucks coffee\"\n```\n\n```json\n{\n \"auto_complete\": [\n \"starbucks coffee menu\",\n \"starbucks coffee cups\",\n \"starbucks coffee sizes\",\n \"starbucks coffee mugs\",\n \"starbucks coffee gear\",\n \"starbucks coffee beans\",\n \"starbucks coffee near me\",\n \"starbucks coffee traveler\"\n ],\n \"related_searches\": [\n \"starbucks near me\",\n \"starbucks coffee price\",\n \"starbucks coffee beans\",\n \"starbucks company\",\n \"starbucks coffee menu\",\n \"starbucks merchandise\",\n \"starbucks coffee bags\"\n ],\n \"related_questions\": [\n \"What is the most popular Starbucks coffee?\",\n \"What is the number 1 Starbucks drink?\",\n \"What is the Tiktok coffee from Starbucks?\",\n \"Why is Starbucks coffee so famous?\"\n ]\n}\n```\n\n#### Advanced example:\n\nThis example will use [related questions API](https://serpapi.com/related-questions) engine with a depth limit value of 2, and saves data to JSON:\n\n```bash\n$ seo --api-key \"<your_serpapi_api_key>\" \\\n> -q \"starbucks coffee\" \\\n> -e rq \\\n> -dl 2 \\\n> -gd google.co.uk \\\n> -gl uk \\\n> -hl en \\\n> -st json \\\n```\n\n```json\n{\n \"related_questions\": [\n \"What is the best coffee in Starbucks?\",\n \"What is a popular Starbucks coffee?\",\n \"What is the number 1 Starbucks drink?\",\n \"Is Starbucks expensive?\",\n \"What should I try at Starbucks for the first time?\",\n \"Which Starbucks coffee is best and sweet?\",\n \"What is famous in Starbucks in India?\",\n \"Which Starbucks drink is the best in India?\",\n \"Why is Starbucks famous?\",\n \"What should I order in Starbucks?\",\n \"What is the least bitter coffee at Starbucks?\",\n \"What's the creamiest coffee?\",\n \"Which Starbucks coffee is best in taste?\",\n \"Which Starbucks coffee is best and sweet?\",\n \"Which Starbucks coffee is best in India?\",\n \"Which Starbucks coffee is best for first time?\",\n \"Why is Starbucks famous?\",\n \"What should I order at Starbucks for the first time?\",\n \"What is the best Starbucks drink for a first time coffee drinker?\",\n \"What should I order in Starbucks?\",\n \"What should I try at Starbucks for the first time?\",\n \"What is the most famous Starbucks drink?\",\n \"Which Starbucks coffee is best in taste?\",\n \"What coffee orders for beginners?\",\n \"What is the best thing to get at Starbucks?\",\n \"Which Starbucks drink is best?\",\n \"Which coffee is best in Starbucks India?\",\n \"Which Starbucks coffee is best in taste?\",\n \"Is Dunkin or Starbucks better?\",\n \"What are the negatives of Starbucks?\",\n \"Who has stronger coffee Starbucks or Dunkin?\",\n \"Why do people prefer Starbucks?\",\n \"Why is Starbucks so much better than Dunkin?\",\n \"Is Starbucks coffee high quality?\",\n \"Why is Starbucks coffee so good?\",\n \"Do Starbucks employees get free food?\"\n ]\n}\n```\n\n#### Example of manual data extraction (without CLI):\n\n```python\nfrom SeoKeywordResearch import SeoKeywordResearch\n\nkeyword_research = SeoKeywordResearch(\n query='starbucks coffee',\n api_key='<your_serpapi_api_key>',\n lang='en',\n country='us',\n domain='google.com'\n)\n\nauto_complete_results = keyword_research.get_auto_complete()\nrelated_searches_results = keyword_research.get_related_searches()\nrelated_questions_results = keyword_research.get_related_questions()\n\ndata = {\n 'auto_complete': auto_complete_results,\n 'related_searches': related_searches_results,\n 'related_questions': related_questions_results\n}\n\nkeyword_research.save_to_json(data)\nkeyword_research.print_data(data)\n```\n\n### \u270dContributing\n\nFeel free to open bug issue, something isn't working, what feature to add, or anything else related to Google autocomplete, related searches or people also ask.",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python SEO keywords suggestion tool. Google Autocomplete, Related Questions and Related Searches.",
"version": "0.1.9",
"split_keywords": [
"google scholar",
"serpapi",
"scraper",
"python",
"python google scholar",
"python google scholar api",
"web scraping",
"python web scraping",
"research",
"google-search-results",
"cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c00d5d77b33ee2c5f8d550f0cd628a74b1e28e3ff5d0b1e8ecbcead4f10263ed",
"md5": "f01e92e05c18eb74e7b67419c90ac010",
"sha256": "54db8bf0a766cd59941147c383244d5586c29f36b08d96c5b47b8ff5df976a30"
},
"downloads": -1,
"filename": "seo-keyword-research-tool-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "f01e92e05c18eb74e7b67419c90ac010",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 8969,
"upload_time": "2023-04-19T11:16:33",
"upload_time_iso_8601": "2023-04-19T11:16:33.225651Z",
"url": "https://files.pythonhosted.org/packages/c0/0d/5d77b33ee2c5f8d550f0cd628a74b1e28e3ff5d0b1e8ecbcead4f10263ed/seo-keyword-research-tool-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-19 11:16:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "chukhraiartur",
"github_project": "seo-keyword-research-tool",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "seo-keyword-research-tool"
}