Loading...
Loading...
Compare original and translation side by side
import sys, os
sys.path.insert(0, os.path.expanduser('~/.agents/skills/dataforseo/scripts'))
from dataforseo_client import save_credentials, verify_credentialsimport sys, os
sys.path.insert(0, os.path.expanduser('~/.agents/skills/dataforseo/scripts'))
from dataforseo_client import save_credentials, verify_credentials
Credentials stored at `~/.dataforseo_config.json`. To update, run setup again.
凭证将存储在`~/.dataforseo_config.json`文件中。如需更新,重新运行上述设置步骤即可。import sys, os
sys.path.insert(0, os.path.expanduser('~/.agents/skills/dataforseo/scripts'))
from dataforseo_client import *import sys, os
sys.path.insert(0, os.path.expanduser('~/.agents/skills/dataforseo/scripts'))
from dataforseo_client import *undefinedundefined| User Request | Function to Use |
|---|---|
| Search volume, CPC, competition | |
| Keyword ideas/suggestions | |
| Keywords a site ranks for | |
| SERP results for keyword | |
| Local/Maps rankings | |
| YouTube rankings | |
| Backlink profile | |
| List of backlinks | |
| Referring domains | |
| Domain authority/rank | |
| Competing domains | |
| Keyword gap analysis | |
| Link gap analysis | |
| Technical page audit | |
| Lighthouse scores | |
| Technology stack | |
| Brand mentions | |
| Google Trends | |
| 用户需求 | 调用函数 |
|---|---|
| 搜索量、CPC、竞争度 | |
| 关键词灵感/建议 | |
| 网站排名关键词 | |
| 关键词SERP结果 | |
| 本地/地图排名 | |
| YouTube排名 | |
| 反向链接概况 | |
| 反向链接列表 | |
| 引荐域名 | |
| 域名权重/排名 | |
| 竞品域名 | |
| 关键词差距分析 | |
| 链接差距分析 | |
| 页面技术审计 | |
| Lighthouse评分 | |
| 技术栈分析 | |
| 品牌提及监测 | |
| Google Trends数据 | |
extract_results(response)to_csv(results, "filename")import sys, os
sys.path.insert(0, os.path.expanduser('~/.agents/skills/dataforseo/scripts'))
from dataforseo_client import labs_ranked_keywords, extract_results, to_csv
response = labs_ranked_keywords(
target="competitor.com",
location_name="United States",
language_name="English",
limit=500
)
results = extract_results(response)
csv_path = to_csv(results, "ranked_keywords")extract_results(response)to_csv(results, "filename")import sys, os
sys.path.insert(0, os.path.expanduser('~/.agents/skills/dataforseo/scripts'))
from dataforseo_client import labs_ranked_keywords, extract_results, to_csv
response = labs_ranked_keywords(
target="competitor.com",
location_name="United States",
language_name="English",
limit=500
)
results = extract_results(response)
csv_path = to_csv(results, "ranked_keywords")location_namelanguage_namelimitdevicelocation_namelanguage_namelimitdevice~/dataforseo_outputs/~/dataforseo_outputs/references/api_reference.mdreferences/use_cases.mdreferences/api_reference.mdreferences/use_cases.mdresponse = some_api_function(...)
if response.get("status_code") == 20000:
results = extract_results(response)
# Process results
else:
print(f"Error: {response.get('status_message')}")response = some_api_function(...)
if response.get("status_code") == 20000:
results = extract_results(response)
# 处理结果
else:
print(f"错误信息: {response.get('status_message')}")get_user_data()costget_user_data()costlimitkeywords=["kw1", "kw2", "kw3"]limitkeywords=["kw1", "kw2", "kw3"]