> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/web-scraper-api/mu-biao/sou-suo-yin-qing/gu-ge/xue-shu-sou-suo.md).

# 学术搜索

Google Scholar 抓取器允许你提交搜索查询，并接收结构化、已解析的数据，包括文章、书籍、引用和相关链接。

该 `google_scholar` 数据源旨在检索 Google Scholar 搜索结果，包括学术论文、书籍、引文和相关链接。

## 请求示例

在这个示例中，我们发出请求以检索查询的 Google Scholar 结果 `best novels`.

{% tabs %}
{% tab title="cURL" %}

```shell
curl 'https://data.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_scholar",
        "query": "best novels",
        "render": "html",
        "parse": true
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
  "source": "google_scholar",
  "query": "best novels",
  "render": "html",
  "parse": True
}

# Get response.
response = requests.request(
    'POST',
    'https://data.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# 将格式化后的响应打印到标准输出。
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "google_scholar",
    query: "best novels",
    render: "html",
    parse: true,
};

const options = {
    hostname: "data.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'google_scholar',
    'query' => 'best novels',
    'render' => 'html',
    'parse' => true
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://data.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");


$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    const Username = "USERNAME"
    const Password = "PASSWORD"

    payload := map[string]interface{}{
        "source": "google_scholar",
        "query":  "best novels",
        "render": "html",
        "parse":  true,
    }

    jsonValue, _ := json.Marshal(payload)

    client := &http.Client{}
    request, _ := http.NewRequest("POST",
        "https://data.oxylabs.io/v1/queries",
        bytes.NewBuffer(jsonValue),
    )

    request.SetBasicAuth(Username, Password)
    response, _ := client.Do(request)

    responseText, _ := ioutil.ReadAll(response.Body)
    fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

            var parameters = new {
                source = "google_scholar",
                query = "best novels",
                render = "html",
                parse = true
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://data.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";

    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "google_scholar");
        jsonObject.put("query", "best novels");
        jsonObject.put("render", "html");
        jsonObject.put("parse", true);

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://data.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "google_scholar",
    "query": "best novels",
    "render": "html",
    "parse": true
}
```

{% endtab %}
{% endtabs %}

我们使用 [**Push-Pull**](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md) 集成方式在示例中。提交任务后会立即返回任务 ID，而不是结果。一旦任务状态为 `完成`，请使用以下方式获取结果： `GET https://data.oxylabs.io/v1/queries/{job_id}/results`。请参阅 [**Push-Pull**](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md) 以了解如何检查任务状态、回调和批量查询。

### 请求参数

<table><thead><tr><th width="157.5">参数</th><th width="452">说明</th><th>默认值</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>设置抓取器。使用 <code>google_scholar</code>.</td><td>–</td></tr><tr><td><mark style="background-color:green;"><strong><code>query</code></strong></mark></td><td>该请求的搜索词。</td><td>–</td></tr><tr><td><mark style="background-color:green;"><strong><code>render</code></strong></mark></td><td>设置为时启用 JavaScript 渲染 <code>html</code>. <a href="https://developers.oxylabs.io/products/cn/web-scraper-api/features/js-rendering-and-browser-control.md#javascript-rendering"><strong>更多信息</strong></a><strong>.</strong></td><td>–</td></tr><tr><td><code>parse</code></td><td>设置为时返回解析后的数据 <code>true</code>. 详情见 <a href="#output-dictionary"><strong>输出字典</strong></a>.</td><td><code>false</code></td></tr><tr><td><code>callback_url</code></td><td>回调端点的 URL。 <a href="https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md"><strong>更多信息</strong></a><strong>.</strong></td><td>–</td></tr><tr><td><code>user_agent_type</code></td><td>设备类型和浏览器。完整列表可见 <a href="https://developers.oxylabs.io/products/cn/web-scraper-api/features/http-context-and-job-management/user-agent-type.md"><strong>这里</strong></a>.</td><td><code>桌面端</code></td></tr></tbody></table>

– 必填参数

## 结构化数据

网页爬虫API 可以提取结果的 HTML 或 JSON 响应，其中包含结果页面各个元素的结构化数据。

<details>

<summary>结构化 google_scholar 输出</summary>

```json
{
    "results": [
        {
            "content": {
                "organic": [
                    {
                        "description": "……对小说来说和其他任何东西一样重要且令人兴奋。大众市场平装本进入了……书籍。它的目的，是表彰我们最喜爱的作家，并为他们的小说……进行宣传。",
                        "inline_links": {
                            "cite_url": "https://scholar.google.com/scholar?q=info:Av0ZOt0npBEJ:scholar.google.com/&output=cite&scirp=0&hl=en",
                            "cited_by": {
                                "cites_id": "1271184825941359874",
                                "total": 15,
                                "url": "https://scholar.google.com/scholar?cites=1271184825941359874&as_sdt=2005&sciodt=0,5&hl=en"
                            },
                            "related_pages_url": "https://scholar.google.com/scholar?q=related:Av0ZOt0npBEJ:scholar.google.com/&scioq=best+novels&hl=en&as_sdt=0,5",
                            "versions": {
                                "cluster_id": "1271184825941359874",
                                "total": 5,
                                "url": "https://scholar.google.com/scholar?cluster=1271184825941359874&hl=en&as_sdt=0,5"
                            }
                        },
                        "pos": 1,
                        "publication_info": {
                            "summary": "C Callil, C Tóibín - 2011 - books.google.com"
                        },
                        "result_id": "Av0ZOt0npBEJ",
                        "result_type": "book",
                        "title": "现代图书馆：1950年以来英语世界200部最佳小说",
                        "url": "https://books.google.com/books?hl=en&lr=&id=EwlNDwAAQBAJ&oi=fnd&pg=PA1903&dq=best+novels&ots=Uiru4xYAcj&sig=exuKH7sr8Y4rAx7cvn15h8lA39Y"
                    },
                    {
                        "description": "……预测小说和电影的成功：据我们所知，我们的工作是第一个就写作风格之间尚未被研究的关联提供定量见解的研究……",
                        "inline_links": {
                            "cite_url": "https://scholar.google.com/scholar?q=info:r_g8gsmjLJgJ:scholar.google.com/&output=cite&scirp=4&hl=en",
                            "cited_by": {
                                "cites_id": "10965319278609103023",
                                "total": 182,
                                "url": "https://scholar.google.com/scholar?cites=10965319278609103023&as_sdt=2005&sciodt=0,5&hl=en"
                            },
                            "related_pages_url": "https://scholar.google.com/scholar?q=related:r_g8gsmjLJgJ:scholar.google.com/&scioq=best+novels&hl=en&as_sdt=0,5",
                            "versions": {
                                "cluster_id": "10965319278609103023",
                                "total": 10,
                                "url": "https://scholar.google.com/scholar?cluster=10965319278609103023&hl=en&as_sdt=0,5"
                            }
                        },
                        "pos": 5,
                        "publication_info": {
                            "authors": [
                                {
                                    "author_id": "Of8dNP0AAAAJ",
                                    "name": "VG Ashok",
                                    "url": "https://scholar.google.com/citations?user=Of8dNP0AAAAJ&hl=en&oi=sra"
                                },
                                {
                                    "author_id": "aWmHP7IAAAAJ",
                                    "name": "S Feng",
                                    "url": "https://scholar.google.com/citations?user=aWmHP7IAAAAJ&hl=en&oi=sra"
                                },
                                {
                                    "author_id": "vhP-tlcAAAAJ",
                                    "name": "Y Choi",
                                    "url": "https://scholar.google.com/citations?user=vhP-tlcAAAAJ&hl=en&oi=sra"
                                }
                            ],
                            "summary": "VG Ashok, S Feng, Y Choi - … of the 2013 conference on empirical …, 2013 - aclanthology.org"
                        },
                        "resources": [
                            {
                                "file_format": "PDF",
                                "title": "aclanthology.org",
                                "url": "https://aclanthology.org/D13-1181.pdf"
                            }
                        ],
                        "result_id": "r_g8gsmjLJgJ",
                        "result_type": "pdf",
                        "title": "凭风格取胜：利用写作风格预测小说的成功",
                        "url": "https://aclanthology.org/D13-1181.pdf"
                    }
                    // ... up to 8 more organic results
                ],
                "pagination": {
                    "current_page": 1,
                    "next_page": "https://scholar.google.com/scholar?start=10&q=best+novels&hl=en&as_sdt=0,5",
                    "other_pages": {
                        "2": "https://scholar.google.com/scholar?start=10&q=best+novels&hl=en&as_sdt=0,5",
                        "3": "https://scholar.google.com/scholar?start=20&q=best+novels&hl=en&as_sdt=0,5"
                        // ... more page links
                    }
                },
                "parse_status_code": 12000,
                "related_searches": [
                    {
                        "query": "best novels modern library",
                        "url": "https://scholar.google.com/scholar?hl=en&as_sdt=0,5&qsp=1&q=best+novels+modern+library&qst=ib"
                    },
                    {
                        "query": "best novels short stories",
                        "url": "https://scholar.google.com/scholar?hl=en&as_sdt=0,5&qsp=2&q=best+novels+short+stories&qst=ib"
                    }
                    // ... more related searches
                ],
                "search_information": {
                    "query_displayed": "best novels",
                    "time_taken_displayed": 0.15,
                    "total_results_count": 3580000
                }
            },
            "created_at": "2026-07-18 14:00:27",
            "job_id": "7484245708602621953",
            "page": 1,
            "status_code": 200,
            "updated_at": "2026-07-18 14:00:40",
            "url": "https://scholar.google.com/scholar?q=best+novels&hl=en&gl=us"
        }
    ]
}
```

</details>

### 输出字典

下表列出了我们解析的每个顶层元素的详细列表，以及其说明和数据类型。

{% hint style="info" %}
自然搜索结果的数量和某些字段可能会因搜索查询和结果类型而异。
{% endhint %}

<table><thead><tr><th width="189.5">键</th><th width="459.5">说明</th><th width="95">类型</th></tr></thead><tbody><tr><td><code>url</code></td><td>Google Scholar 搜索结果页面的 URL。</td><td>字符串</td></tr><tr><td><code>page</code></td><td>搜索结果的当前页码。</td><td>整数</td></tr><tr><td><code>parse_status_code</code></td><td>解析任务的状态码。了解更多 <a href="https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md#parsers"><strong>这里</strong></a>.</td><td>整数</td></tr><tr><td><code>自然搜索</code></td><td>自然搜索结果列表。包括 <code>pos</code>, <code>title</code>, <code>url</code>, <code>description</code>, <code>result_id</code>, <code>result_type</code>, <code>publication_info</code>, <code>inline_links</code>, <code>resources</code>.</td><td>数组</td></tr><tr><td><code>organic.result_type</code></td><td>标识结果的格式（<code>book</code>, <code>pdf</code>，等等）。当结果是标准文章时省略。</td><td>字符串</td></tr><tr><td><code>organic.publication_info</code></td><td>出版物摘要。包括 <code>summary</code> （作者、年份、出版商/来源，作为一个字符串）以及（如可用）一个结构化的 <code>authors</code> 列表，包含 <code>author_id</code>, <code>name</code>，以及资料页 <code>url</code>.</td><td>对象</td></tr><tr><td><code>organic.inline_links</code></td><td>附加到结果的学术元数据。包括 <code>cite_url</code>, <code>cited_by</code>, <code>related_pages_url</code>, <code>versions</code>.</td><td>对象</td></tr><tr><td><code>organic.inline_links.cited_by</code></td><td>该结果的引文数据。包括 <code>cites_id</code>, <code>total</code> （总引用次数），以及 <code>url</code> （指向引用该文献的作品的链接）。</td><td>对象</td></tr><tr><td><code>organic.inline_links.related_pages_url</code></td><td>查找与该结果相关论文的 URL。</td><td>字符串</td></tr><tr><td><code>organic.inline_links.versions</code></td><td>同一文档的其他版本/链接。包括 <code>cluster_id</code>, <code>total</code>，以及 <code>url</code>.</td><td>对象</td></tr><tr><td><code>organic.resources</code></td><td>可访问媒体的直接下载链接，例如 PDF。包括 <code>file_format</code>, <code>title</code>, <code>url</code>.</td><td>数组</td></tr><tr><td><code>pagination</code></td><td>当前和可用结果页的详细信息。包括 <code>current_page</code>, <code>next_page</code>, <code>other_pages</code>.</td><td>对象</td></tr><tr><td><code>related_searches</code></td><td>Google 推荐的相关搜索字符串。包括 <code>query</code> 和 <code>url</code> 每个建议项。</td><td>数组</td></tr><tr><td><code>search_information</code></td><td>搜索的常规详细信息。包括 <code>query_displayed</code>, <code>time_taken_displayed</code>, <code>total_results_count</code>.</td><td>对象</td></tr><tr><td><code>created_at</code></td><td>爬取任务创建时的时间戳。</td><td>时间戳</td></tr><tr><td><code>updated_at</code></td><td>爬取任务完成时的时间戳。</td><td>时间戳</td></tr><tr><td><code>job_id</code></td><td>与爬取任务关联的任务 ID。</td><td>字符串</td></tr><tr><td><code>status_code</code></td><td>爬取任务的状态码。了解更多 <a href="https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md"><strong>这里</strong></a>.</td><td>整数</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/cn/web-scraper-api/mu-biao/sou-suo-yin-qing/gu-ge/xue-shu-sou-suo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
