# Google Scholar

Search for academic papers, articles, and research results in JSON format.

## Endpoint

```
GET /v1/scholar/{query}
```

## Description

The Scholar Search endpoint allows you to search for academic papers, articles, and research across the scholarly literature. The query parameter should be a URL-encoded query string that follows Google's search parameter format — `q=` for the search terms, plus optional `num=` (results per page, up to 200) and `start=` (result offset for pagination).

Scholar results are drawn from a global scholarly index and are not geo-differentiated, so the `X-Proxy-Location` and `X-User-Agent` headers below are accepted but do not change the results.

## Authentication

All requests require authentication using the `X-Api-Key` header. See the [Authentication guide](/docs/guides/authentication) for more details.

## Path Parameters

### `query` (required)

**Type:** `string`

A URL-encoded query string. This should follow Google's search parameter format.

**Examples:**
- `q=high+frequency+trading`
- `q=machine+learning+neural+networks`

## Request Headers

### `X-Proxy-Location` (optional)

**Type:** `string`

Specify the proxy location for the search. Available options:

- `EU` - European Union
- `CA` - Canada
- `US` - United States
- `IE` - Ireland
- `GB` - United Kingdom
- `FR` - France
- `DE` - Germany
- `SE` - Sweden
- `IN` - India
- `JP` - Japan
- `KR` - South Korea
- `SG` - Singapore
- `AU` - Australia
- `BR` - Brazil

### `X-User-Agent` (optional)

**Type:** `string`

Specify the user agent type. Available options:

- `desktop` - Desktop user agent (default)
- `mobile` - Mobile user agent

## Request Example

### Using cURL

```bash
curl --request GET \
  --url 'https://api.serply.io/v1/scholar/q=high+frequency+trading' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

### Using JavaScript/Node.js

```javascript
const response = await fetch('https://api.serply.io/v1/scholar/q=high+frequency+trading', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY'
  }
});
const data = await response.json();
console.log(data);
```

### Using Python

```python
import requests

headers = {
    'X-Api-Key': 'YOUR_API_KEY'
}

response = requests.get(
    'https://api.serply.io/v1/scholar/q=high+frequency+trading',
    headers=headers
)
data = response.json()
print(data)
```

## Response

The API returns a JSON object with the articles under the `articles` key.

### Response Structure

```json
{
  "articles": [
    {
      "title": "Paper Title",
      "link": "https://doi.org/10.1000/example",
      "id": "W2238750598",
      "description": "Author One, Author Two - Journal Name, 2014",
      "author": {
        "names": "Author One, Author Two - Journal Name, 2014",
        "authors": [
          { "name": "Author One", "link": "https://openalex.org/A5004251974" }
        ]
      },
      "doc": { "link": "https://example.edu/paper.pdf", "type": "PDF" },
      "extras": {
        "citations": {
          "count": 1223,
          "link": "https://api.openalex.org/works?filter=cites:W2238750598"
        }
      }
    }
  ],
  "ts": 1234567890,
  "device_region": "US",
  "device_type": "desktop"
}
```

### Response Fields

- **`articles`** (array): An array of article objects
  - **`title`** (string): The title of the academic paper or article
  - **`link`** (string): The DOI or landing page URL of the paper
  - **`id`** (string): A stable identifier for the work
  - **`description`** (string): The byline — authors, venue, and year
  - **`author`** (object): `names` is the byline as one string; `authors` is an array of `{name, link}` objects, where `link` is the author's profile URL when available
  - **`doc`** (object, optional): An open-access full-text link when one exists, with `link` and `type` (e.g. `"PDF"`)
  - **`extras.citations`** (object, optional): `count` is how many works cite this one; `link` lists the citing works
- **`ts`** (number): Time taken to serve the search, in seconds
- **`device_region`** (string): The device region used for the search
- **`device_type`** (string): The device type used for the search

### Example Response

```json
{
  "articles": [
    {
      "title": "High-Frequency Trading and Price Discovery",
      "link": "https://doi.org/10.1093/rfs/hhu032",
      "id": "W2238750598",
      "description": "Jonathan Brogaard, Terrence Hendershott, Ryan Riordan - Review of Financial Studies, 2014",
      "author": {
        "names": "Jonathan Brogaard, Terrence Hendershott, Ryan Riordan - Review of Financial Studies, 2014",
        "authors": [
          { "name": "Jonathan Brogaard", "link": "https://openalex.org/A5004251974" },
          { "name": "Terrence Hendershott", "link": "https://openalex.org/A5059226754" },
          { "name": "Ryan Riordan", "link": "https://openalex.org/A5069996199" }
        ]
      },
      "doc": {
        "link": "https://www.econstor.eu/bitstream/10419/154035/1/ecbwp1602.pdf",
        "type": "PDF"
      },
      "extras": {
        "citations": {
          "count": 1223,
          "link": "https://api.openalex.org/works?filter=cites:W2238750598"
        }
      }
    },
    {
      "title": "High frequency trading and the new market makers",
      "link": "https://doi.org/10.1016/j.finmar.2013.06.006",
      "id": "W2060331219",
      "description": "Albert J. Menkveld - Journal of Financial Markets, 2013",
      "author": {
        "names": "Albert J. Menkveld - Journal of Financial Markets, 2013",
        "authors": [
          { "name": "Albert J. Menkveld", "link": "https://openalex.org/A5046473475" }
        ]
      },
      "doc": {
        "link": "http://papers.tinbergen.nl/11076.pdf",
        "type": "PDF"
      },
      "extras": {
        "citations": {
          "count": 781,
          "link": "https://api.openalex.org/works?filter=cites:W2060331219"
        }
      }
    }
  ],
  "ts": 0.42,
  "device_region": "US",
  "device_type": "desktop"
}
```

## Status Codes

- **200 OK** - Successful response
- **404 Not Found** - The requested resource was not found
- **422 Unprocessable Entity** - The request was well-formed but contains semantic errors
- **429 Too Many Requests** - Rate limit exceeded

## Error Responses

See the [Errors guide](/docs/guides/errors) for information on error response formats.
