# Google Scholar | Research Papers, Citations & Author Profiles (`johnvc/google-scholar-api`) Actor

Scrape Google Scholar at scale. Search research papers, get citation formats (MLA, APA, Chicago, BibTeX), author profiles with h-index and i10-index, list an author's publications, view per-article citation history, & map co-author networks. Six modes in one for lit reviews, bibliometrics, & agents.

- **URL**: https://apify.com/johnvc/google-scholar-api.md
- **Developed by:** [John](https://apify.com/johnvc) (community)
- **Categories:** Integrations, Developer tools, Agents
- **Stats:** 55 total users, 23 monthly users, 100.0% runs succeeded, 8 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Scholar Scraper

Scrape Google Scholar at scale. One actor, six modes - search research papers, pull citation formats, fetch author profiles with h-index and i10-index, paginate an author's full publication list, view per-article citation history, and map an author's full co-author network. Built for literature reviews, bibliometrics, citation tracking, and academic AI agents. The Google Scholar API returns clean, structured JSON you can call from code, no-code tools, or an MCP client, with no quotas to manage.

### What this actor returns

- Research paper search results: title, link, snippet, authors, publication info, cited-by counts, and version links.
- Citation strings for any paper in MLA, APA, Chicago, Harvard, and Vancouver formats, plus BibTeX / EndNote / RefMan / RefWorks export links.
- Full author profiles with name, affiliations, email domain, interests, photo, and the standard h-index / i10-index / total-citations table (overall and recent window).
- Year-by-year citation history graphs for both authors and individual papers.
- Author publication list, paginated up to 100 results per page.
- Per-article bibliographic detail including journal, volume, issue, pages, publisher, and abstract.
- Full co-author list with profile URLs, affiliations, email domains, and photos.

### The six modes

Choose with the `mode` input parameter.

| mode value          | What it does                                              | Required fields                        |
|---------------------|-----------------------------------------------------------|----------------------------------------|
| `search`            | Search Google Scholar for papers                          | `q` (or `cites`, or `cluster`)         |
| `cite`              | Get citation formats and BibTeX export for one paper      | `result_id`                            |
| `author_profile`    | Fetch an author's profile + citation metrics + graph      | `author_id`                            |
| `author_articles`   | Paginate the author's full publication list               | `author_id`                            |
| `author_citation`   | Per-article bibliographic record with citation history    | `author_id`, `citation_id`             |
| `author_co_authors` | Full list of an author's co-authors                       | `author_id`                            |

#### Example: search

```json
{
  "mode": "search",
  "q": "transformer neural network",
  "as_ylo": 2020,
  "as_yhi": 2024,
  "num": 10,
  "max_pages": 3
}
```

#### Example: cite

```json
{
  "mode": "cite",
  "result_id": "K7uerNYAAAAJ:u5HHmVD_uO8C"
}
```

#### Example: author\_profile

```json
{
  "mode": "author_profile",
  "author_id": "LSsXyncAAAAJ"
}
```

#### Example: author\_articles

```json
{
  "mode": "author_articles",
  "author_id": "LSsXyncAAAAJ",
  "sort": "pubdate",
  "num": 20,
  "max_pages": 2
}
```

#### Example: author\_citation

```json
{
  "mode": "author_citation",
  "author_id": "LSsXyncAAAAJ",
  "citation_id": "u5HHmVD_uO8C"
}
```

#### Example: author\_co\_authors

```json
{
  "mode": "author_co_authors",
  "author_id": "LSsXyncAAAAJ"
}
```

### Input parameters

| Parameter      | Type    | Modes                                                                                         | Description |
|----------------|---------|-----------------------------------------------------------------------------------------------|-------------|
| `mode`         | string  | all (required)                                                                                | Which operation to run. |
| `q`            | string  | search                                                                                        | Free-text search. Supports `author:` and `source:` operators. |
| `cites`        | string  | search                                                                                        | Find papers that cite this article ID. |
| `cluster`      | string  | search                                                                                        | Fetch all versions of a paper by cluster ID. |
| `result_id`    | string  | cite                                                                                          | Result ID of a paper to fetch citation formats for. |
| `author_id`    | string  | author\_profile, author\_articles, author\_citation, author\_co\_authors                           | Google Scholar author identifier. |
| `citation_id`  | string  | author\_citation                                                                               | Per-article ID within an author's profile. |
| `hl`           | enum    | all                                                                                           | UI language (en, es, fr, de, ...). |
| `lr`           | string  | search                                                                                        | Restrict to languages, e.g. `lang_en\|lang_fr`. |
| `as_ylo`       | integer | search                                                                                        | Earliest publication year. |
| `as_yhi`       | integer | search                                                                                        | Latest publication year. |
| `scisbd`       | enum    | search                                                                                        | 0 relevance, 1 abstracts-only by date, 2 all by date. |
| `as_sdt`       | enum    | search                                                                                        | 0 exclude patents, 7 include patents, 4 case law. |
| `safe`         | enum    | search                                                                                        | active / off. |
| `filter`       | enum    | search                                                                                        | 1 enable similar-results filter (default), 0 disable. |
| `as_vis`       | enum    | search                                                                                        | 0 include citations (default), 1 exclude citations. |
| `as_rr`        | enum    | search                                                                                        | 1 review articles only, 0 all (default). |
| `sort`         | enum    | author\_profile, author\_articles                                                               | title / pubdate. Omit for default citation-count sort. |
| `max_pages`    | integer | search (1-20 per page), author\_articles (1-100 per page)                                      | Max pages to fetch. 0 = no limit. Default 1. |
| `num`          | integer | search, author\_articles                                                                       | Per-page size. |

### Example output (mode=search)

```json
{
  "_mode": "search",
  "_query_index": 1,
  "search_parameters": { "mode": "search", "q": "transformer", "as_ylo": 2020 },
  "search_metadata_status": "Success",
  "search_timestamp": "2026-05-13T20:00:00Z",
  "position": 0,
  "result_id": "K7uerNYAAAAJ:u5HHmVD_uO8C",
  "paper_title": "Attention Is All You Need",
  "link": "https://arxiv.org/abs/1706.03762",
  "snippet": "...",
  "publication_info": {
    "summary": "A Vaswani, N Shazeer, N Parmar - Advances in NIPS, 2017",
    "authors": [
      { "name": "Ashish Vaswani", "author_id": "..." }
    ]
  },
  "inline_links": {
    "cited_by_total": 120000,
    "cited_by_link": "https://scholar.google.com/...",
    "versions_total": 95,
    "versions_cluster_id": "13755340029141322000"
  }
}
```

### Example output (mode=author\_profile)

```json
{
  "_mode": "author_profile",
  "_query_index": 1,
  "author": {
    "name": "Geoffrey Hinton",
    "affiliations": "Emeritus Prof. Comp Sci, University of Toronto",
    "email": "Verified email at cs.toronto.edu",
    "interests": [
      { "title": "Machine Learning", "link": "..." }
    ]
  },
  "cited_by_summary": {
    "citations_all": 800000,
    "citations_recent": 500000,
    "h_index_all": 150,
    "i10_index_all": 380,
    "recent_since_year": 2020
  },
  "cited_by_graph": [
    { "year": 2018, "citations": 35000 },
    { "year": 2019, "citations": 45000 }
  ]
}
```

### Pricing

Pay-per-event. No subscription.

- **Setup**: $0.02 per run (charged once).
- **Query executed**: $0.02 per upstream call. For paginated modes (`search`, `author_articles`), that is once per page. For single-shot modes (`cite`, `author_profile`, `author_citation`, `author_co_authors`), that is once per run.

Worked examples:

- `mode=search` with `max_pages=5` -> $0.02 setup + 5 \* $0.02 = **$0.12**.
- `mode=author_profile` -> $0.02 setup + 1 \* $0.02 = **$0.04**.
- `mode=author_articles` with `max_pages=3`, `num=100` (full author bibliography) -> $0.02 + 3 \* $0.02 = **$0.08**.

### Use cases

- Build a literature review: search for a topic, then loop through `organic_results[].result_id` to pull citation strings via `mode=cite`.
- Track citation growth: run `mode=author_profile` on a watchlist of researchers and store the `cited_by_graph` over time.
- Map a research community: take any `author_id` and run `mode=author_co_authors` to harvest the full collaborator network.
- Bibliometric analysis: page through an author's entire publication list with `mode=author_articles` and `max_pages=0` for unlimited.
- AI agents and RAG pipelines: feed structured Google Scholar JSON straight into a knowledge graph or vector store.

### 🔌 Integrations: Automate Google Scholar API Pipelines

A single run answers one question. The real value of the Google Scholar API comes from running it on a schedule and piping the structured results into the tools you already use, so citation counts, author metrics, and new-paper alerts accumulate over time. See the [Apify platform integrations](https://docs.apify.com/platform/integrations) for the full list of destinations.

#### Tasks and schedules (citation and literature monitoring)

Save one [task](https://docs.apify.com/platform/actors/running/tasks) per thing you track: a task with `mode=search` for a topic query, and a task with `mode=author_profile` for each researcher on a watchlist. Then attach a [schedule](https://docs.apify.com/platform/schedules) from the actor's Actions, then Schedule menu. Useful cron strings:

- `0 7 * * *` runs every day at 7 AM, for fresh papers on your topic.
- `0 */6 * * *` runs every six hours, for fast-moving fields.
- `0 9 * * 1` runs every Monday at 9 AM, for a weekly citation-count snapshot.

One schedule can trigger many tasks at once, so a single Monday run can refresh your whole researcher watchlist. The [citation-counts task](https://apify.com/johnvc/google-scholar-api/examples/get-citation-counts-for-every-paper-by-an-author?fpr=9n7kx3) is a ready-made starting point.

#### n8n

The actor ships as an n8n community node, [n8n-nodes-google-scholar-api](https://www.npmjs.com/package/n8n-nodes-google-scholar-api) (see the n8n section further down). A typical workflow is four nodes: Schedule Trigger, then the Google Scholar node, then a Filter (for example only papers whose `cited_by_total` clears a threshold), then Slack or email.

#### Make and Zapier

The same pattern works no-code in [Make](https://docs.apify.com/platform/integrations/make) and [Zapier](https://docs.apify.com/platform/integrations/zapier): trigger on a schedule, run the actor, then route the results to a sheet, a database, or a chat channel.

#### Store the data in Supabase

Send the accumulating output to storage so you can chart citation growth over time. No-code: use the n8n Apify node, then a Supabase node. In code, run the actor and bulk-insert the flat rows with `apify-client` and `supabase`:

```python
from apify_client import ApifyClient
from supabase import create_client

apify = ApifyClient("YOUR_APIFY_TOKEN")
supabase = create_client("YOUR_SUPABASE_URL", "YOUR_SUPABASE_KEY")

run = apify.actor("johnvc/google-scholar-api").call(run_input={
    "mode": "search",
    "q": "retrieval augmented generation",
    "as_ylo": 2022,
    "max_pages": 3,
})

rows = []
for item in apify.dataset(run.default_dataset_id).iterate_items():
    rows.append({
        "result_id": item.get("result_id"),
        "paper_title": item.get("paper_title"),
        "link": item.get("link"),
        "cited_by_total": item.get("inline_links", {}).get("cited_by_total"),
    })

supabase.table("scholar_papers").upsert(rows, on_conflict="result_id").execute()
```

#### MCP and AI agents

Add the actor to any MCP client and let the agent pick the right mode for a plain-language question. The exact server URL is in the MCP section right below, and the FAQ covers it in more detail.

#### Webhooks

For anything custom, attach an [Apify webhook](https://docs.apify.com/platform/integrations/webhooks) on the `ACTOR.RUN.SUCCEEDED` event to POST the dataset to your own endpoint the moment a run finishes.

### 🔌 Use this Google Scholar API from Claude (MCP)

Add this actor as a tool in any MCP client (Claude, Cursor, and other agents) through the hosted [Apify MCP server](https://mcp.apify.com/). Point your client at:

`https://mcp.apify.com/?tools=actors,docs,johnvc/google-scholar-api`

Then ask in plain language, for example "find the 20 most-cited papers on retrieval augmented generation since 2022" or "pull Geoffrey Hinton's h-index and citation history", and the agent runs the right mode for you. If you work in [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial) or Claude Cowork, the same MCP URL plugs straight in.

Prefer code, or want a full setup walkthrough? The [Google Scholar API example repo](https://github.com/johnisanerd/Apify-Google-Scholar-API) has a Python quick-start plus MCP install steps for Claude, Cursor, and ChatGPT.

### 💸 Pay per run with crypto (x402)

The Google Scholar Actor supports agentic payments via the [x402 protocol](https://docs.apify.com/platform/integrations/x402).
AI agents and MCP clients can pay for runs in USDC (on Base) with no Apify account or API token needed:
point your agent at the [Apify MCP server](https://mcp.apify.com/?tools=actors,docs,johnvc/google-scholar-api) and it can
discover, pay for, and run this Actor autonomously. Read the
[Apify x402 announcement](https://apify.com/change-log/pay-for-apify-actors-with-x402?fpr=9n7kx3) for details.

### How to get started

1. Open the actor in the Apify console and click **Try for free**.
2. Pick a `mode` and fill in the required fields shown above.
3. Click **Run**.
4. Results land in the default dataset. Download as JSON, CSV, or Excel from the Storage tab, or use the Apify API.

You can also call this actor from your code via the Apify SDK (Python, JavaScript, or curl) or as a tool in any MCP-aware AI agent.

### 🔗 Related Tools

Building an academic research pipeline usually means combining sources. These related tools from the same publisher pair well with the Google Scholar API:

- [Google Scholar Lite API](https://apify.com/johnvc/google-scholar-lite-api?fpr=9n7kx3): a stripped-down, lower-cost sibling for high-volume paper search when you do not need author profiles or citation exports.
- [Google Scholar Case Law API](https://apify.com/johnvc/google-scholar-case-law?fpr=9n7kx3): search U.S. court opinions and case law indexed by Google Scholar, for legal research alongside academic papers.
- [Google Patents API](https://apify.com/johnvc/google-patents-api?fpr=9n7kx3): pull patent records so you can pair prior-art and intellectual-property data with the literature you collect here.

For contrast, an older single-purpose alternative such as the [easyapi Google Scholar Scraper](https://apify.com/easyapi/google-scholar-scraper?fpr=9n7kx3) runs only one search mode. It returns a flat list of papers but cannot fetch author profiles with h-index, citation-format exports, per-article citation history, or co-author networks; it was last updated in May 2026; and it charges a higher per-result fee. This actor covers all six of those modes in one place and is actively maintained.

### FAQ

#### Can I schedule this Google Scholar scraper?

Yes. Any run can be automated on a [schedule](https://docs.apify.com/platform/schedules). First save a [task](https://docs.apify.com/platform/actors/running/tasks) with your input (your query or an `author_id`), then open the actor's Actions menu, then Schedule, and pick a cadence. Cron examples: `0 7 * * *` for daily at 7 AM, `0 */6 * * *` for every six hours, and `0 9 * * 1` for Mondays at 9 AM. One schedule can trigger many tasks at once, so a single run can refresh a whole watchlist of topics and authors. See the Integrations section above for the full monitoring recipe.

#### Should I use an API or a web scraper for Google Scholar?

Google Scholar has no official public API, so both routes come down to scraping done well. This actor gives you both faces of the same tool: a no-code web scraper you run from the console, and a clean [API](https://en.wikipedia.org/wiki/API) endpoint you call from your own code, with no quotas or key management on your side. If you have hit the limits of do-it-yourself [web scraping](https://en.wikipedia.org/wiki/Web_scraping), this handles pagination, parsing, and the six modes for you.

#### Can I integrate this Google Scholar scraper with other apps?

Yes. The actor connects to almost any cloud service through [Apify integrations](https://docs.apify.com/platform/integrations): [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), Google Sheets, and more. For custom actions, attach a [webhook](https://docs.apify.com/platform/integrations/webhooks) on `ACTOR.RUN.SUCCEEDED`. The Integrations section above has copy-paste recipes.

#### Can I use the Google Scholar API with the Apify API?

Yes. The [Apify API](https://apify.com/johnvc/google-scholar-api/api?fpr=9n7kx3) lets you run this actor, schedule it, and fetch datasets programmatically, and the `apify-client` package is available for both Node.js and Python. Pass the same input JSON you would use in the console, then read the results from the run's default dataset.

#### Can I use this scraper through an MCP server?

Yes. Add the actor as a tool in any MCP client (Claude, Cursor, and others) through the hosted [Apify MCP server](https://mcp.apify.com/), using the URL `https://mcp.apify.com/?tools=actors,docs,johnvc/google-scholar-api`. If you use [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial) or Claude Cowork, the same MCP endpoint works there. See the [Apify MCP docs](https://docs.apify.com/platform/integrations/mcp) for setup.

#### How can I collect other academic and research data?

Combine this actor with the related tools from the same publisher: the [Google Scholar Lite API](https://apify.com/johnvc/google-scholar-lite-api?fpr=9n7kx3) for cheaper high-volume paper search, the [Google Scholar Case Law API](https://apify.com/johnvc/google-scholar-case-law?fpr=9n7kx3) for U.S. court opinions, and the [Google Patents API](https://apify.com/johnvc/google-patents-api?fpr=9n7kx3) for patents and prior art. Run them on the same schedule to keep a research dataset current.

#### Does Google Scholar use AI?

[Google Scholar](https://scholar.google.com/) has long used machine learning to rank results and match citations, and it keeps adding AI-assisted features. That does not change how this actor works: it reads the same public result pages a browser sees and returns them as structured JSON, so you can feed papers, citations, and author metrics into your own AI or [bibliometrics](https://en.wikipedia.org/wiki/Bibliometrics) workflow.

#### What is bibliometric analysis?

Bibliometric analysis is the quantitative study of publications: counting citations, tracking an author's h-index and i10-index over time, and mapping how research topics and co-author networks evolve. This actor supplies the raw inputs for it, via `mode=author_profile`, `mode=author_articles`, `mode=author_citation`, and `mode=author_co_authors`.

#### Why is my run charged for setup even when there are no results?

The $0.02 setup fee covers the run's instance provisioning. If you only want results, set tight inputs (`max_pages=1`, narrow query) so the setup is the only charge.

#### How do I find a `result_id` or `author_id`?

Run `mode=search` first. Each item in the output contains `result_id` (use it for `mode=cite` or as a `cites` / `cluster` value) and `publication_info.authors[].author_id` (use it for any author mode).

#### What languages are supported?

The `hl` enum exposes the most common 29 languages. The upstream API supports more; if you need one that is not in the list, open an issue and we will add it.

#### Why doesn't pagination always reach `max_pages`?

Google Scholar stops returning results when it runs out of matches. Pagination ends early when the upstream API returns fewer items than `num` or signals no next page.

#### My run failed with an authentication error.

The actor needs an API key configured by the publisher. If you see a "Missing key" error, the deployment is misconfigured, so please report it.

### Links

- Example code on GitHub: https://github.com/johnisanerd/Apify-Google-Scholar-API
- More scrapers from this publisher: https://apify.com/johnvc?fpr=9n7kx3

***

### n8n integration

Available as an n8n community node, **[n8n-nodes-google-scholar-api](https://www.npmjs.com/package/n8n-nodes-google-scholar-api)**. In n8n: Settings, Community Nodes, install `n8n-nodes-google-scholar-api`, then use it in any workflow (it also works as an AI Agent tool).

***

### Featured Tasks

Ready-to-run examples that show this API solving a specific problem. Each opens its own setup so you can
run it on your account in one click.

- [Find papers citing Attention Is All You Need](https://apify.com/johnvc/google-scholar-api/examples/find-papers-citing-attention-is-all-you-need?fpr=9n7kx3) - every paper citing a landmark work, with authors, year, and citations.
- [Get citation counts for every paper by an author](https://apify.com/johnvc/google-scholar-api/examples/get-citation-counts-for-every-paper-by-an-author?fpr=9n7kx3) - an author's full paper list with citation counts, years, and links.
- [Search Google Scholar from Claude via MCP](https://apify.com/johnvc/google-scholar-api/examples/search-google-scholar-from-claude-via-mcp?fpr=9n7kx3) - Google Scholar search inside Claude chat via MCP, with citations.
- [Export Google Scholar Results to CSV](https://apify.com/johnvc/google-scholar-api/examples/export-google-scholar-results-to-csv?fpr=9n7kx3)
- [Google Scholar API: Papers, Authors and Citations](https://apify.com/johnvc/google-scholar-api/examples/google-scholar-api-for-papers-authors-and-citations?fpr=9n7kx3)

***

### 🌐 About Alpha OSINT

This Actor is part of [Alpha OSINT](https://www.alphaosint.com), toolset of financial and operations data sources and APIs.
See the [Google Scholar source page](https://www.alphaosint.com/sources/google-scholar/) for related tools and use cases.
For support or requests for this actor, please start a ticket [directly on our support page](https://apify.com/johnvc/google-scholar-api/issues/open?fpr=9n7kx3).

Last Updated: 2026.08.01

# Actor input Schema

## `mode` (type: `string`):

Which Google Scholar operation to run. Each mode uses different required fields. Defaults to 'search'.

## `q` (type: `string`):

Free-text query for mode=search. Supports advanced operators like author:smith or source:nature. Required for mode=search unless 'cites' or 'cluster' is provided.

## `cites` (type: `string`):

For mode=search only. Article identifier used to look up papers that cite this article. Combine with 'q' to search within citing papers. Mutually exclusive with 'cluster'.

## `cluster` (type: `string`):

For mode=search only. Article cluster identifier used to fetch all versions of a paper. Mutually exclusive with 'q' and 'cites'.

## `result_id` (type: `string`):

For mode=cite only. The result\_id (cluster id) of the Google Scholar paper to fetch citation formats for. Obtain from an organic\_results entry of mode=search.

## `author_id` (type: `string`):

For mode=author\_profile, author\_articles, author\_citation, and author\_co\_authors. The Google Scholar author identifier (e.g., 'LSsXyncAAAAJ'). Obtain from a publication\_info.authors entry of mode=search or from a Google Scholar profile URL.

## `citation_id` (type: `string`):

For mode=author\_citation only. The citation\_id of the specific article in the author's profile (obtain from articles\[].citation\_id of mode=author\_articles).

## `hl` (type: `string`):

Language for the user interface and result display. Applies to all modes. Optional.

## `lr` (type: `string`):

For mode=search only. Restrict results to specific languages. Use 'lang\_xx' codes separated by '|', e.g. 'lang\_en' or 'lang\_en|lang\_fr'.

## `as_ylo` (type: `integer`):

For mode=search only. Earliest publication year to include (e.g., 2010).

## `as_yhi` (type: `integer`):

For mode=search only. Latest publication year to include (e.g., 2024).

## `scisbd` (type: `string`):

For mode=search only. Recency sort: 0 = relevance (default), 1 = abstracts only from the last year sorted by date, 2 = everything from the last year sorted by date.

## `as_sdt` (type: `string`):

For mode=search only. Controls what types of results to include. Common values: '0' exclude patents (default), '7' include patents, '4' case law (US courts).

## `safe` (type: `string`):

For mode=search only. Safe search filter. Use 'active' to enable or 'off' to disable.

## `filter` (type: `string`):

For mode=search only. 1 = enable the similar/omitted-results filter (default), 0 = disable it.

## `as_vis` (type: `string`):

For mode=search only. 0 = include citations in results (default), 1 = exclude citations.

## `as_rr` (type: `string`):

For mode=search only. 1 = restrict to review articles, 0 = all article types (default).

## `sort` (type: `string`):

For mode=author\_profile and author\_articles. 'title' sorts alphabetically, 'pubdate' sorts by publication date (newest first). Omit for the default citation-count sort.

## `max_pages` (type: `integer`):

For mode=search and author\_articles only. Maximum number of result pages to fetch. Use 0 for no limit. Defaults to 1.

## `num` (type: `integer`):

For mode=search (1-20) and mode=author\_articles (1-100). Page size for paginated modes. Defaults to 10 for search, 20 for author\_articles.

## Actor input object example

```json
{
  "mode": "search",
  "q": "machine learning",
  "hl": "en",
  "scisbd": "0",
  "as_sdt": "0",
  "filter": "1",
  "as_vis": "0",
  "as_rr": "0",
  "max_pages": 1
}
```

# Actor output Schema

## `results` (type: `string`):

All dataset items from this run. Inspect the \_mode field on each item to know which Google Scholar endpoint produced it.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "q": "machine learning"
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnvc/google-scholar-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "q": "machine learning" }

# Run the Actor and wait for it to finish
run = client.actor("johnvc/google-scholar-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "q": "machine learning"
}' |
apify call johnvc/google-scholar-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=johnvc/google-scholar-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/m22qEjpnfxa4H1ijE/builds/pgyXZiOb44AGGTZR0/openapi.json
