## OVERVIEW
This is a Python client providing you, as a developer, with a tool for obtaining the necessary data from DataForSEO APIs. You don't have to figure out how to make a request and process a response - all that is readily available in this client.
[](https://github.com/dataforseo/PythonClient/issues)
[](https://github.com/dataforseo/PythonClient)
DataForSEO API uses REST technology for interchanging data between your application and our service. The data exchange is made through the widely used HTTP protocol, which allows using our API with almost any programming language.
Client contains 12 sections (aka APIs):
- SERP ([source docs](./docs/SerpApi.md) | [api docs](https://docs.dataforseo.com/v3/serp/overview/?bash))
- Keywords Data ([source docs](./docs/KeywordsDataApi.md) | [api docs](https://docs.dataforseo.com/v3/keywords_data/overview/?bash))
- Domain Analytics ([source docs](./docs/DomainAnalyticsApi.md) | [api docs](https://docs.dataforseo.com/v3/domain_analytics/overview/?bash))
- DataForSEO Labs ([source docs](./docs/DataforseoLabsApi.md) | [api docs](https://docs.dataforseo.com/v3/dataforseo_labs/overview/?bash))
- Backlinks ([source docs](./docs/BacklinksApi.md) | [api docs](https://docs.dataforseo.com/v3/backlinks/overview/?bash))
- OnPage ([source docs](./docs/OnPageApi.md) | [api docs](https://docs.dataforseo.com/v3/on_page/overview/?bash))
- Content Analysis ([source docs](./docs/ContentAnalysisApi.md) | [api docs](https://docs.dataforseo.com/v3/content_analysis/overview/?bash))
- Content Generation ([source docs](./docs/ContentGenerationApi.md) | [api docs](https://docs.dataforseo.com/v3/content_generation/overview/?bash))
- Merchant ([source docs](./docs/MerchantApi.md) | [api docs](https://docs.dataforseo.com/v3/merchant/overview/?bash))
- AppData ([source docs](./docs/AppDataApi.md) | [api docs](https://docs.dataforseo.com/v3/app_data/overview/?bash))
- Business Data ([source docs](./docs/BusinessDataApi.md) | [api docs](https://docs.dataforseo.com/v3/business_data/overview/?bash))
- Appendix ([source docs](./docs/AppendixApi.md) | [api docs](https://docs.dataforseo.com/v3/appendix/user_data/?bash))
API Contains 2 types of requests:
1) Live (Simple HTTP request/response message)
2) Task-based (Requires sending a 'Task' entity to execute, waiting until the 'Task' status is ready, and getting the 'Task' result in a special endpoint. Usually, it is represented by 3 types of endpoints: 'TaskPost', 'TaskReady', and 'TaskGet')
For more details - please follow [here](https://docs.dataforseo.com/v3/?bash)
## YAML Spec
Our API description is based on the OpenAPI [syntax](https://spec.openapis.org/oas/v3.1.0) in YAML format. The YAML file attached to the project [here](./openapi_specification.yaml)
## Documentation
The documentation for code objects, formatted in Markdown (.md) is available [here](./docs/). Official documentation for DataForSEO API is available [here](https://docs.dataforseo.com/v3/?bash).
## Code generation
Code generated using the [openapi generator cli](https://openapi-generator.tech/docs/installation/)
## Install package from nuget.org
```bash
pip install dataforseo-client
```
## Examples of usage
Example of live request
```python
from dataforseo_client import configuration as dfs_config, api_client as dfs_api_provider
from dataforseo_client.api.serp_api import SerpApi
from dataforseo_client.rest import ApiException
from dataforseo_client.models.serp_google_organic_live_advanced_request_info import SerpGoogleOrganicLiveAdvancedRequestInfo
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
configuration = dfs_config.Configuration(username='USERNAME',password='PASSWORD')
with dfs_api_provider.ApiClient(configuration) as api_client:
# Create an instance of the API class
serp_api = SerpApi(api_client)
try:
api_response = serp_api.google_organic_live_advanced([SerpGoogleOrganicLiveAdvancedRequestInfo(
language_name="English",
location_name="United States",
keyword="albert einstein"
)])
pprint(api_response)
except ApiException as e:
print("Exception: %s\n" % e)
```
Example of Task-Based request
```python
from dataforseo_client import configuration as dfs_config, api_client as dfs_api_provider
from dataforseo_client.api.serp_api import SerpApi
from dataforseo_client.rest import ApiException
from dataforseo_client.models.serp_google_organic_task_post_request_info import SerpGoogleOrganicTaskPostRequestInfo
from pprint import pprint
import asyncio
import time
# Configure HTTP basic authorization: basicAuth
configuration = dfs_config.Configuration(username='USERNAME',password='PASSWORD')
def GoogleOrganicTaskReady(id):
result = serp_api.google_organic_tasks_ready()
return any(any(xx.id == id for xx in x.result) for x in result.tasks)
with dfs_api_provider.ApiClient(configuration) as api_client:
# Create an instance of the API class
serp_api = SerpApi(api_client)
try:
task_post = serp_api.google_organic_task_post([SerpGoogleOrganicTaskPostRequestInfo(
language_name="English",
location_name="United States",
keyword="albert einstein"
)])
task_id = task_post.tasks[0].id
start_time = time.time()
while GoogleOrganicTaskReady(task_id) is not True and (time.time() - start_time) < 60:
time.sleep(1)
api_response = serp_api.google_organic_task_get_advanced(id=task_id)
pprint(api_response)
except ApiException as e:
print("Exception: %s\n" % e)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/dataforseo/PythonClient",
"name": "dataforseo-client",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "OpenAPI, DataForSEO, DataForSEO API documentation",
"author": "DataForSeo",
"author_email": "info@dataforseo.com",
"download_url": "https://files.pythonhosted.org/packages/2f/7b/806307c9df1fb4138c394c59f6cbf0167ce8640c6ff7a3d1fc074e57316e/dataforseo_client-2.0.3.tar.gz",
"platform": null,
"description": "## OVERVIEW\r\n\r\nThis is a Python client providing you, as a developer, with a tool for obtaining the necessary data from DataForSEO APIs. You don't have to figure out how to make a request and process a response - all that is readily available in this client.\r\n\r\n[](https://github.com/dataforseo/PythonClient/issues)\r\n[](https://github.com/dataforseo/PythonClient)\r\n\r\nDataForSEO API uses REST technology for interchanging data between your application and our service. The data exchange is made through the widely used HTTP protocol, which allows using our API with almost any programming language.\r\n\r\nClient contains 12 sections (aka APIs):\r\n\r\n- SERP ([source docs](./docs/SerpApi.md) | [api docs](https://docs.dataforseo.com/v3/serp/overview/?bash))\r\n- Keywords Data ([source docs](./docs/KeywordsDataApi.md) | [api docs](https://docs.dataforseo.com/v3/keywords_data/overview/?bash))\r\n- Domain Analytics ([source docs](./docs/DomainAnalyticsApi.md) | [api docs](https://docs.dataforseo.com/v3/domain_analytics/overview/?bash))\r\n- DataForSEO Labs ([source docs](./docs/DataforseoLabsApi.md) | [api docs](https://docs.dataforseo.com/v3/dataforseo_labs/overview/?bash))\r\n- Backlinks ([source docs](./docs/BacklinksApi.md) | [api docs](https://docs.dataforseo.com/v3/backlinks/overview/?bash))\r\n- OnPage ([source docs](./docs/OnPageApi.md) | [api docs](https://docs.dataforseo.com/v3/on_page/overview/?bash))\r\n- Content Analysis ([source docs](./docs/ContentAnalysisApi.md) | [api docs](https://docs.dataforseo.com/v3/content_analysis/overview/?bash))\r\n- Content Generation ([source docs](./docs/ContentGenerationApi.md) | [api docs](https://docs.dataforseo.com/v3/content_generation/overview/?bash))\r\n- Merchant ([source docs](./docs/MerchantApi.md) | [api docs](https://docs.dataforseo.com/v3/merchant/overview/?bash))\r\n- AppData ([source docs](./docs/AppDataApi.md) | [api docs](https://docs.dataforseo.com/v3/app_data/overview/?bash))\r\n- Business Data ([source docs](./docs/BusinessDataApi.md) | [api docs](https://docs.dataforseo.com/v3/business_data/overview/?bash))\r\n- Appendix ([source docs](./docs/AppendixApi.md) | [api docs](https://docs.dataforseo.com/v3/appendix/user_data/?bash))\r\n\r\nAPI Contains 2 types of requests:\r\n\r\n1) Live (Simple HTTP request/response message)\r\n2) Task-based (Requires sending a 'Task' entity to execute, waiting until the 'Task' status is ready, and getting the 'Task' result in a special endpoint. Usually, it is represented by 3 types of endpoints: 'TaskPost', 'TaskReady', and 'TaskGet')\r\nFor more details - please follow [here](https://docs.dataforseo.com/v3/?bash)\r\n\r\n## YAML Spec\r\n\r\nOur API description is based on the OpenAPI [syntax](https://spec.openapis.org/oas/v3.1.0) in YAML format. The YAML file attached to the project [here](./openapi_specification.yaml)\r\n\r\n## Documentation\r\nThe documentation for code objects, formatted in Markdown (.md) is available [here](./docs/). Official documentation for DataForSEO API is available [here](https://docs.dataforseo.com/v3/?bash).\r\n\r\n## Code generation\r\n\r\nCode generated using the [openapi generator cli](https://openapi-generator.tech/docs/installation/)\r\n\r\n## Install package from nuget.org\r\n\r\n```bash\r\npip install dataforseo-client \r\n```\r\n\r\n## Examples of usage\r\n\r\nExample of live request\r\n```python\r\nfrom dataforseo_client import configuration as dfs_config, api_client as dfs_api_provider\r\nfrom dataforseo_client.api.serp_api import SerpApi\r\nfrom dataforseo_client.rest import ApiException\r\nfrom dataforseo_client.models.serp_google_organic_live_advanced_request_info import SerpGoogleOrganicLiveAdvancedRequestInfo\r\nfrom pprint import pprint\r\n\r\n# Configure HTTP basic authorization: basicAuth\r\nconfiguration = dfs_config.Configuration(username='USERNAME',password='PASSWORD')\r\nwith dfs_api_provider.ApiClient(configuration) as api_client:\r\n # Create an instance of the API class\r\n serp_api = SerpApi(api_client)\r\n\r\n try:\r\n\r\n api_response = serp_api.google_organic_live_advanced([SerpGoogleOrganicLiveAdvancedRequestInfo(\r\n language_name=\"English\",\r\n location_name=\"United States\",\r\n keyword=\"albert einstein\"\r\n )])\r\n \r\n pprint(api_response)\r\n \r\n except ApiException as e:\r\n print(\"Exception: %s\\n\" % e)\r\n```\r\n\r\nExample of Task-Based request\r\n\r\n```python\r\nfrom dataforseo_client import configuration as dfs_config, api_client as dfs_api_provider\r\nfrom dataforseo_client.api.serp_api import SerpApi\r\nfrom dataforseo_client.rest import ApiException\r\nfrom dataforseo_client.models.serp_google_organic_task_post_request_info import SerpGoogleOrganicTaskPostRequestInfo\r\nfrom pprint import pprint\r\nimport asyncio\r\nimport time\r\n\r\n# Configure HTTP basic authorization: basicAuth\r\nconfiguration = dfs_config.Configuration(username='USERNAME',password='PASSWORD')\r\n\r\ndef GoogleOrganicTaskReady(id):\r\n result = serp_api.google_organic_tasks_ready()\r\n return any(any(xx.id == id for xx in x.result) for x in result.tasks)\r\n\r\nwith dfs_api_provider.ApiClient(configuration) as api_client:\r\n # Create an instance of the API class\r\n serp_api = SerpApi(api_client)\r\n\r\n try:\r\n\r\n task_post = serp_api.google_organic_task_post([SerpGoogleOrganicTaskPostRequestInfo(\r\n language_name=\"English\",\r\n location_name=\"United States\",\r\n keyword=\"albert einstein\"\r\n )])\r\n\r\n task_id = task_post.tasks[0].id\r\n\r\n start_time = time.time()\r\n\r\n while GoogleOrganicTaskReady(task_id) is not True and (time.time() - start_time) < 60:\r\n time.sleep(1) \r\n\r\n api_response = serp_api.google_organic_task_get_advanced(id=task_id)\r\n \r\n pprint(api_response)\r\n \r\n except ApiException as e:\r\n print(\"Exception: %s\\n\" % e)\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "DataForSEO API documentation",
"version": "2.0.3",
"project_urls": {
"Homepage": "https://github.com/dataforseo/PythonClient"
},
"split_keywords": [
"openapi",
" dataforseo",
" dataforseo api documentation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bbfa54470100ef8204118b7d9a61cd5c4fb01d83afcc6355c8b48df2baa5f415",
"md5": "674f9471041072ed721b76244f70ec5d",
"sha256": "567270a5e5c42f01394a99fa716562a49eb59832a43920fd785e53550abf5735"
},
"downloads": -1,
"filename": "dataforseo_client-2.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "674f9471041072ed721b76244f70ec5d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5750484,
"upload_time": "2025-07-09T14:51:11",
"upload_time_iso_8601": "2025-07-09T14:51:11.373344Z",
"url": "https://files.pythonhosted.org/packages/bb/fa/54470100ef8204118b7d9a61cd5c4fb01d83afcc6355c8b48df2baa5f415/dataforseo_client-2.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2f7b806307c9df1fb4138c394c59f6cbf0167ce8640c6ff7a3d1fc074e57316e",
"md5": "942294f0c21eff36a4bb1d836daf11c0",
"sha256": "7d366d11e3121c97ff33359856ab425a932b420e97e7f3d4f8a50397a3f5115e"
},
"downloads": -1,
"filename": "dataforseo_client-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "942294f0c21eff36a4bb1d836daf11c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1386777,
"upload_time": "2025-07-09T14:51:13",
"upload_time_iso_8601": "2025-07-09T14:51:13.328216Z",
"url": "https://files.pythonhosted.org/packages/2f/7b/806307c9df1fb4138c394c59f6cbf0167ce8640c6ff7a3d1fc074e57316e/dataforseo_client-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 14:51:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dataforseo",
"github_project": "PythonClient",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dataforseo-client"
}