Google Services API
Access Google services including Scholar profiles, author information, citation data, Google Trends, News, and Images through a unified API powered by ScrapingDog.
POST
/v1/google/*学者档案搜索
POST
/v1/google/scholar/profiles按作者姓名或标签搜索 Google Scholar 学者档案。返回档案信息,包括所属机构、引用数和研究兴趣。
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 必填 | 作者姓名或研究标签 |
country | string | 可选 | 国家过滤 |
Google Trends
POST
/v1/google/trends获取最多 5 个搜索词的 Google Trends 数据,支持地理、时间和类别过滤。返回时间趋势和地理分布数据。
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
queries | string[] | 必填 | 搜索词列表(最多 5 个) |
geo | string | 可选 | 地理定位(如 'US'、'GB') |
timeframe | string | 可选 | 时间段过滤 |
category | integer | 可选 | 类别过滤(整数 ID) |
Google 新闻
POST
/v1/google/news搜索 Google 新闻,支持地理定位、时间过滤、语言限制和分页。
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
q | string | 必填 | 搜索关键词 |
location | string | 可选 | 地理位置过滤 |
language | string | 可选 | 语言过滤 |
page | integer | 可选 (默认: 0) | 分页页码 |
Google 图片
POST
/v1/google/images搜索 Google 图片,支持丰富的过滤条件,包括尺寸、颜色、类型、宽高比、版权、日期范围和地理定位。
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
q | string | 必填 | 搜索关键词 |
size | string | 可选 | 图片尺寸:'icon'、'small'、'medium'、'large'、'xlarge'、'xxlarge' |
color | string | 可选 | 颜色过滤 |
type | string | 可选 | 图片类型过滤 |
license | string | 可选 | 版权许可过滤 |
aspect_ratio | string | 可选 | 宽高比过滤 |
location | string | 可选 | 地理定位 |
响应字段说明
/v1/google/scholar/profiles响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.profiles[] | object[] | 学者主页列表。 |
data.profiles[].title | string | 学者姓名。 |
data.profiles[].author_id | string | Google Scholar 作者标识。 |
data.profiles[].affiliations | string | 机构信息。 |
data.profiles[].cited_by | integer | 总引用次数。 |
data.profiles[].interests[] | object[] | 研究兴趣标签。 |
/v1/google/scholar/author响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.author | object | 姓名、机构、邮箱、头像及研究兴趣等作者资料。 |
data.articles[] | object[] | 论文列表及各论文引用数据。 |
data.cited_by | object | 总引用数、h-index、i10-index 及年度统计。 |
data.co_authors[] | object[] | 共同作者列表。 |
data.public_access | object | 公开访问统计。 |
/v1/google/scholar/author-citation响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.citations | object | 指定论文的引用详情。 |
data.citations.title | string | 论文标题。 |
data.citations.authors | string | 作者信息。 |
data.citations.publication_date | string | 发表日期。 |
data.citations.total_citations | object | 总引用数及引用链接。 |
data.citations.articles[] | object[] | 引用该论文的文献。 |
/v1/google/trends响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.interest_over_time.timeline_data[] | object[] | 各时间段的关键词热度值。 |
data.interest_over_time.averages[] | object[] | 各关键词在时间范围内的平均热度。 |
data.interest_by_region[] | object[] | 国家、地区或城市维度的热度。 |
/v1/google/news响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.news_results[] | object[] | 新闻结果列表。 |
data.news_results[].title | string | 新闻标题。 |
data.news_results[].snippet | string | 新闻摘要。 |
data.news_results[].source | string | 发布来源。 |
data.news_results[].url | string | 新闻页面链接。 |
data.news_results[].lastUpdated | string | 上游返回的相对或绝对发布时间。 |
/v1/google/images响应格式: JSON| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 请求是否成功。 |
message | string | 本次处理结果的摘要信息。 |
data | object | null | 上游服务返回的数据;失败时通常为 null。 |
error.code | string | 失败时的机器可读错误码。 |
error.details | string | 失败原因详情。 |
data.images_results[] | object[] | 图片搜索结果。 |
data.images_results[].title | string | 图片标题。 |
data.images_results[].image | string | 缩略图 URL。 |
data.images_results[].original | string | 原图 URL。 |
data.images_results[].source | string | 来源站点。 |
data.images_results[].link | string | 图片所在页面。 |
data.images_results[].original_width / original_height | integer | 原图宽度和高度(像素)。 |
响应
Response
{
"success": true,
"message": "Google Scholar profiles search completed",
"data": {
"profiles": [
{
"name": "Geoffrey Hinton",
"affiliation": "University of Toronto",
"cited_by": 740000,
"interests": [
"machine learning",
"neural networks",
"deep learning"
],
"author_id": "JicYPdAAAAAJ"
}
]
}
}示例
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.qinyanai.com"
# Search scholar profiles
response = requests.post(
f"{BASE_URL}/v1/google/scholar/profiles",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"query": "Geoffrey Hinton"}
)
# Get author details
response = requests.post(
f"{BASE_URL}/v1/google/scholar/author",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"author_id": "JicYPdAAAAAJ"}
)
# Google Trends
response = requests.post(
f"{BASE_URL}/v1/google/trends",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"queries": ["ChatGPT", "Claude", "Gemini"], "geo": "US"}
)
# Google News
response = requests.post(
f"{BASE_URL}/v1/google/news",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"q": "artificial intelligence breakthroughs"}
)
# Google Images
response = requests.post(
f"{BASE_URL}/v1/google/images",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"q": "neural network architecture diagram", "size": "large"}
)