# Google Scholar Author API

{% hint style="success" %}
To enable this engine, set the **`engine=google_scholar_author`** parameter.
{% endhint %}

The Google Scholar Author API is used to scrape author profiles and quickly retrieve data regarding published authors. Make use of [these parameters](#google-scholar-profiles-specific-parameters) in order to customise your request.

<figure><img src="https://1192456954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9wbsYOleiAqS785aMtPp%2Fuploads%2FIbUW81DYCDo6ZjtgEHeP%2Fgoogle-scholar-author-api.png?alt=media&#x26;token=41b005dc-4bab-49f6-85cc-354a116ce18e" alt=""><figcaption><p>Scrape Google Author Pages</p></figcaption></figure>

### Google Scholar Author API Integration Examples

We will use following URL as an example for this request:

```
https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=<YOUR_API_KEY>&author_id=LSsXyncAAAAJ
```

### Ready to Use Google Scholar Author Scraping Scripts

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

```bash
curl --request GET --url "https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ"
```

{% endtab %}

{% tab title="NodeJS" %}

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

const options = {
  "method": "GET",
  "hostname": "serpapi.webscrapingapi.com",
  "port": null,
  "path": "/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ",
  "headers": {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
```

{% endtab %}

{% tab title="Python" %}

```python
import http.client

conn = http.client.HTTPSConnection("serpapi.webscrapingapi.com")

conn.request("GET", "/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

{% endtab %}

{% tab title="Java" %}

```java
HttpResponse<String> response = Unirest.get("https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ")
  .asString();
```

{% endtab %}

{% tab title=".NET" %}

```csharp
var client = new RestClient("https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://serpapi.webscrapingapi.com/v1?engine=google_scholar_author&api_key=YOUR_API_KEY&author_id=LSsXyncAAAAJ")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

{% endtab %}
{% endtabs %}

### Google Scholar Profiles Parameters

#### #1: Query Parameter

<table><thead><tr><th width="187">Parameter</th><th width="107" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>author_id</code><br><mark style="color:red;background-color:red;">Required</mark></td><td align="center"><code>string</code></td><td>The ID of the author you want to scrape.</td></tr></tbody></table>

#### #2: Request Customisation Parameters

<table><thead><tr><th width="184">Parameter</th><th width="106" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>device</code></td><td align="center"><code>string</code></td><td>The device used for your search. Can be set to <code>desktop</code>, <code>mobile</code> or <code>tablet</code>.</td></tr><tr><td><code>view_op</code></td><td align="center"><code>string</code></td><td>Is used to view specific parts of the page. It can be set to <code>view_citation</code> or <code>list_colleagues</code>.</td></tr><tr><td><code>sort</code></td><td align="center"><code>string</code></td><td>Sorts the results. Can be set as <code>title</code> to sort by title or <code>pubdate</code> to sort by published date.</td></tr><tr><td><code>citation_id</code></td><td align="center"><code>string</code></td><td>It's used to retrieve a specific citation. It is required when <code>view_op</code> is set on <code>view_citation</code>.</td></tr></tbody></table>

#### #3: Localisation Parameters

<table><thead><tr><th width="184">Parameter</th><th width="106" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>hl</code></td><td align="center"><code>string</code></td><td>The language you want to use for your Google Search. <a href="https://developers.google.com/custom-search/docs/xml_results_appendices#interfaceLanguages">List of supported languages</a></td></tr></tbody></table>

#### #4: Pagination Parameters

<table><thead><tr><th width="184">Parameter</th><th width="106" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>start</code></td><td align="center"><code>int</code></td><td>The offset of the Google Search Results. Represents the number of results that you want to skip.</td></tr><tr><td><code>num</code></td><td align="center"><code>int</code></td><td>The number of results returned on each page.</td></tr></tbody></table>

<details>

<summary>Response Example</summary>

```javascript
{
  "search_parameters": {
    "google_url": "https://scholar.google.com/citations?user=LSsXyncAAAAJ&sourceid=chrome&ie=UTF-8",
    "engine": "google_scholar_author",
    "google_domain": "scholar.google.com",
    "device": "desktop",
    "query": "LSsXyncAAAAJ"
  },
  "author": {
    "name": "Cliff Meyer",
    "affiliations": "Dana-Farber Cancer Institute and Harvard T.H. Chan School of Public Health",
    "email": "Verified email at jimmy.harvard.edu",
    "interests": [
      {
        "link": "https://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=label:computational_biology",
        "title": "Computational Biology"
      },
      {
        "link": "https://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=label:epigenetics",
        "title": "Epigenetics"
      },
      {
        "link": "https://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=label:gene_regulation",
        "title": "Gene Regulation"
      },
      {
        "link": "https://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=label:genomics",
        "title": "Genomics"
      },
      {
        "link": "https://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=label:transcription_factors",
        "title": "Transcription Factors"
      }
    ]
  }
}
```

</details>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webscrapingapi.com/google-search-api/google-search-engines/google-scholar-author-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
