dataforseo/pythonclient/dataforseo-client
Claude Code and agent skill by dataforseo/pythonclient
- community
Checking that the SKILL.md file is still in the repository.
Use the DataForSEO Python client (pip package dataforseo-client, module dataforseo_client) to call DataForSEO API v3 (SERP, Keywords Data, DataForSEO Labs, Backlinks, OnPage, AI Optimization, etc.). Read this before exploring the code; it explains the layout, naming rules and how to find an endpoint without reading the huge generated files.
Install
npx vskill@latest install dataforseo/pythonclient/dataforseo-clientSKILL.md
DataForSEO Python client
Generated, typed (pydantic v2) Python client for DataForSEO API v3. Every API endpoint is one method; every request/response body is one model class.
- Package:
pip install dataforseo-client, import asdataforseo_client - HTTP:
urllib3, synchronous - Base URL:
https://api.dataforseo.com(sandbox with free dummy data:https://sandbox.dataforseo.com) - Auth: HTTP Basic with the DataForSEO API login and password (not the dashboard password)
Do not read generated code in full
The client is generated from an OpenAPI spec and is very large (thousands of model files, api/*_api.py files up to ~1 MB, very long field descriptions in every model). Never open files whole. Derive names with the rules below and use targeted search (grep) only to confirm them.
Knowledge base: start here
knowledge-base/ (next to this file) has one Markdown file per API section, i.e. per class in api/. Each file explains what data the section provides and when to use another section instead, gives ready-to-run examples and lists every endpoint with its method name. Open only the file of the section you need: it is much cheaper than searching the generated code.
| API class | Use it for | |
|---|---|---|
| `SerpApi` | Search engine results pages (SERP) collected on request: what a search engine shows for a query in a given location, language and device, from engines such as Google, Bing, YouTube, Yahoo and others, including search verticals such as maps, news, images, jobs and AI search modes. | |
| `DataforseoLabsApi` | Keyword research, competitor analysis and search analytics from DataForSEO's own databases of keywords, search results and rankings, for search engines and platforms such as Google, Amazon, Google Play and the App Store. | |
| `DomainAnalyticsApi` | Information about websites as such: the technologies a site is built with (CMS, analytics, frameworks, advertising and other tools), which sites use a given technology, statistics of technology usage, and domain registration (Whois) data enriched with search and backlink metrics. | |
| `KeywordsDataApi` | Keyword metrics from advertising platforms and trend services: search volume, cost per click, competition and their monthly dynamics, keyword ideas, ad traffic forecasts and keyword popularity trends, from sources such as Google Ads, Bing Ads, Google Trends, DataForSEO Trends and clickstream data. | |
| `BacklinksApi` | Backlink data for any domain, subdomain or web page from DataForSEO's continuously updated link index: inbound links, referring domains, pages and networks, anchor texts, link-based authority (rank) and spam score, how the link profile changes over time, and how it compares with other sites. | |
| `AiOptimizationApi` | Data for AI search optimization (GEO): answers of large language models such as ChatGPT, Claude, Gemini and Perplexity to your prompts, results scraped from the web interfaces of AI assistants, search volume of keywords in AI tools, and how often brands, domains and pages are mentioned in AI-generated answers. | |
| `OnPageApi` | Technical SEO audit of websites with a configurable crawler: crawl a site and get per-page checks, resources, internal and external links, duplicates, redirects, indexability issues, keyword density and page speed data; or analyze individual pages instantly, extract their content, take screenshots and run Google Lighthouse. | |
| `ContentAnalysisApi` | Brand monitoring and sentiment analysis across the web: pages that mention (cite) a keyword or brand, with the sentiment polarity and emotional connotations of each mention, content ratings and categories, and aggregated trends of mentions over time. | |
| `MerchantApi` | E-commerce data from marketplaces and shopping search engines such as Amazon and Google Shopping: product listings for a search query, product details, product variations, sellers and their offers, with prices, ratings, reviews count and paid placements. | |
| `AppDataApi` | Mobile application data from app stores such as Google Play and the App Store: app search results, top charts and collections, detailed app information and user reviews, plus a searchable database of app listings. | |
| `BusinessDataApi` | Publicly available data about businesses and local places: business profiles, reviews, questions and answers, hotel data and a database of business listings, from sources such as Google, Trustpilot and Tripadvisor. | |
| `AppendixApi` | Account and service information that applies to the whole DataForSEO API rather than to a data source: account balance, spending, limits and prices, the current status of the APIs, the list of error codes, and re-sending webhooks (pingbacks and postbacks) of completed tasks. |
Layout
Paths are relative to the dataforseo_client package (a top-level folder in the repository; after pip install it is site-packages/dataforseo_client/, where copies of this file and of knowledge-base/ also live):
Naming rules (derive names instead of searching)
Endpoint path /v3/<section>/<rest> maps to:
| What | Rule | Example for /v3/serp/google/organic/live/advanced | |
|---|---|---|---|
| API class / module | <Section>Api in api/<section>_api.py | SerpApi in dataforseo_client.api.serp_api | |
| Method | snake_case of <rest> (usually) | google_organic_live_advanced | |
| Request model | <Section><Rest>RequestInfo | SerpGoogleOrganicLiveAdvancedRequestInfo | |
| Response model | <Section><Rest>ResponseInfo | SerpGoogleOrganicLiveAdvancedResponseInfo | |
| Task item | <Section><Rest>TaskInfo | SerpGoogleOrganicLiveAdvancedTaskInfo | |
| Result item | <Section><Rest>ResultInfo | SerpGoogleOrganicLiveAdvancedResultInfo | |
| Model module | snake_case of class name | dataforseo_client.models.serp_google_organic_live_advanced_request_info |
Model names follow the rule strictly. Method names sometimes keep the section prefix (e.g. dataforseo_labs_id_list), so confirm the method with one search (the pattern also matches a prefixed name):
Model fields and their descriptions (required/optional, allowed values, limits) are in Field(description=...). The lines are very long, so list field names first and then grep only the fields you need:
Method shapes
POSTendpoints:x(list_optional_x_request_info: List[XRequestInfo]) -> XResponseInfo, the body is always a list of tasks. Pass it positionally.GETendpoints:x() -> XResponseInfoorx(id)(task id fortask_get_*,countryfor locations etc.).- Every method also has
x_with_http_info(...)(returnsApiResponsewithstatus_code,headers,data) andx_without_preload_content(...)(raw urllib3 response). - Every method accepts
_request_timeout(seconds or(connect, read)tuple) and_headers.
Setup
Create one ApiClient and reuse it for all section classes.
Live request (result in the same call)
Task-based request (post -> wait -> get)
Instead of polling you can set postback_url / pingback_url in the task request.
Response envelope (same for every endpoint)
status_code == 20000means OK (both top-level and per task);20100= task created;4xxxx/5xxxx= errors. Always check the per-taskstatus_code: the HTTP status is usually 200 even when a task failed.- All fields are
Optional; guard lists withor []. - Models are pydantic:
to_dict(),to_json(),from_dict(),from_json()are available.
Polymorphic items
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdataforseo_client/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dataforseo/pythonclient/dataforseo-client)