# GET /papers/search: $0.003 per call

Search academic papers across Europe PMC (PubMed, PMC, preprints) and Crossref (all disciplines), merged by DOI: title, authors, year, journal, DOI, abstract, citation count and a free full-text link when open access. Pass ?q=retrieval augmented generation&limit=10; sort=relevance|recent|cited, from_year=, open_access=true.

- **Price:** $0.003 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Answers cached for:** 6 hour(s)
- **Data sources:** Europe PMC REST API (free); Crossref REST API (free)
- **Lane:** Academic papers ([OpenAPI](/openapi/scholar.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/papers-search](/sample/papers-search). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/papers-search"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/papers/search?q=retrieval+augmented+generation&limit=5"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/papers/search?q=retrieval+augmented+generation&limit=5");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("papers-search", {"q":"retrieval augmented generation","limit":5});
```

## Inputs

- `q` **(required)** (string): Topic, title words or keywords.
- `limit` (integer; default `10`): How many papers.
- `sort` (string; one of `relevance`, `recent`, `cited`; default `relevance`): Order.
- `from_year` (integer): Only papers published in or after this year.
- `open_access` (boolean; default `false`): Only papers with free full text (Europe PMC's open-access flag; Crossref results are then left out).

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

Example only: the shape of an answer, with placeholder addresses and made-up figures. It is not data about any real token or wallet; call the service (or its free sample) for real results.

```json
{
  "query": "retrieval augmented generation",
  "count": 1,
  "papers": [
    {
      "title": "Curated retrieval-augmented generation for dental traumatology.",
      "authors": "Espona J, Roig E, Garcia M, Durán-Sindreu F, Abella F, Dummer PMH, González JA, Elmsmari F, Pineda K, Figueras O, Roig M.",
      "year": 2026,
      "venue": "Journal of dentistry",
      "type": "research-article",
      "doi": "10.1016/j.jdent.2026.106947",
      "url": "https://doi.org/10.1016/j.jdent.2026.106947",
      "openAccessUrl": null,
      "citations": 0,
      "abstract": "Objectives To validate DT-RAG, a curated retrieval-augmented generation system for dental traumatology decision support…",
      "ids": {
        "pmid": "42546813",
        "pmcid": null
      },
      "sources": [
        "Europe PMC",
        "Crossref"
      ]
    }
  ],
  "sourcesAnswered": [
    "Europe PMC",
    "Crossref"
  ],
  "note": "Merged by DOI; each source ranks its own results, interleaved. Authors are shown as published."
}
```

## Related

- [GET /papers/get](/services/papers-get) ($0.002): One academic paper by DOI: title, authors, year, journal, publisher, type, licence, citation count, abstract, PubMed/PMC ids and a free full-text link when open

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).