> For the complete documentation index, see [llms.txt](https://helpcenter.paperguide.ai/llms.txt).
> Use it to discover all available pages before exploring further.

# Search Papers

Paperguide Search API for finding research papers and filtering results for apps, workflows, and integrations.



<PlaygroundComponent />

<AuthParams schemes={["ApiKeyAuth"]}>
<AuthType scheme="ApiKeyAuth">
<ParamField header="x-api-key" param-type="string" required="true">
API Key for authentication. Provide your API key in the header.
</ParamField>
</AuthType>
</AuthParams>

### Query Parameters

<ParamField showLocation="false" query="query" param-type="string" required="true">
Search query used to find relevant academic papers.
</ParamField>

<ParamField showLocation="false" query="source" param-type="string" required="false" enum="arxiv,pubmed,semantic_scholar">
Filter results by source.
</ParamField>

<ParamField showLocation="false" query="field_of_study" param-type="string" required="false" enum="computer_science,medicine,biology,physics,chemistry,mathematics,engineering,economics,psychology,environmental_science">
Filter results by field of study.
</ParamField>

<ParamField showLocation="false" query="year" param-type="integer" required="false">
Filter results by publication year.
</ParamField>

<ParamField showLocation="false" query="limit" param-type="integer" required="false">
Maximum number of papers to return.
</ParamField>

<ParamField showLocation="false" query="format" param-type="string" required="false">
Response format. Use `bibtex` to receive BibTeX text output.
</ParamField>

<Request tabs="curl,python,javascript,go,ruby">

```bash
curl -X GET "https://api.paperguide.ai/v1/search?query=large language models for scientific literature review&source=arxiv&field_of_study=computer_science&year=2024&limit=10&format=bibtex" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY"
```

```python
import requests
import json

url = "https://api.paperguide.ai/v1/search?query=large language models for scientific literature review&source=arxiv&field_of_study=computer_science&year=2024&limit=10&format=bibtex"
headers = {
  "Content-Type": "application/json",
  "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
```

```javascript
const response = await fetch("https://api.paperguide.ai/v1/search?query=large language models for scientific literature review&source=arxiv&field_of_study=computer_science&year=2024&limit=10&format=bibtex", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "x-api-key": "YOUR_API_KEY"
}
});

const data = await response.json();
console.log(data);
```

```go
package main

import (
    "fmt"
    "net/http"
)

func main() {

    req, err := http.NewRequest("GET", "https://api.paperguide.ai/v1/search?query=large language models for scientific literature review&source=arxiv&field_of_study=computer_science&year=2024&limit=10&format=bibtex", nil)
    if err != nil {
        panic(err)
    }

    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("x-api-key", "YOUR_API_KEY")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Println("Response Status:", resp.Status)
}
```

```ruby
require 'net/http'
require 'json'

uri = URI('https://api.paperguide.ai/v1/search?query=large language models for scientific literature review&source=arxiv&field_of_study=computer_science&year=2024&limit=10&format=bibtex')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['x-api-key'] = 'YOUR_API_KEY'

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

</Request>

### Responses

<div data-component="ResponsesCollection"><Expandable title="200 - Search results returned successfully." default-open="true">

<ResponseField name="results" field-type="array" required="true">
List of matching papers.

<Expandable title="Array Items" default-open="false">

<ResponseField name="id" field-type="string" required="true">
Unique identifier for the paper in the source system.
</ResponseField>

<ResponseField name="title" field-type="string" required="true">
Paper title.
</ResponseField>

<ResponseField name="authors" field-type="string[]" required="true">
List of author names.
</ResponseField>

<ResponseField name="year" field-type="integer" required="true">
Publication year.
</ResponseField>

<ResponseField name="source" field-type="string" required="true" enum="arxiv,pubmed,semantic_scholar">
Source where the paper was found.
</ResponseField>

<ResponseField name="field_of_study" field-type="string" required="true" enum="computer_science,medicine,biology,physics,chemistry,mathematics,engineering,economics,psychology,environmental_science">
Field of study associated with the paper.
</ResponseField>

<ResponseField name="abstract" field-type="string" required="true">
Paper abstract.
</ResponseField>

<ResponseField name="url" field-type="string" required="true">
Canonical URL for the paper.
</ResponseField>

</Expandable>
</ResponseField>

</Expandable>

<Expandable title="400 - Bad Request. The request was invalid or missing required parameters." default-open="false">

<ResponseField name="error" field-type="string" required="true">
Short machine-readable error code.
</ResponseField>

<ResponseField name="message" field-type="string" required="true">
Human-readable error message.
</ResponseField>

</Expandable>

<Expandable title="401 - Unauthorized. The API key is missing or invalid." default-open="false">

<ResponseField name="error" field-type="string" required="true">
Short machine-readable error code.
</ResponseField>

<ResponseField name="message" field-type="string" required="true">
Human-readable error message.
</ResponseField>

</Expandable>

<Expandable title="429 - Too Many Requests. The rate limit has been exceeded." default-open="false">

<ResponseField name="error" field-type="string" required="true">
Short machine-readable error code.
</ResponseField>

<ResponseField name="message" field-type="string" required="true">
Human-readable error message.
</ResponseField>

</Expandable>

<Expandable title="500 - Internal Server Error. An unexpected error occurred." default-open="false">

<ResponseField name="error" field-type="string" required="true">
Short machine-readable error code.
</ResponseField>

<ResponseField name="message" field-type="string" required="true">
Human-readable error message.
</ResponseField>

</Expandable>

</div>

<Response tabs={["200","400","401","429","500"]} dropdown="true">

```json
{
  "results": [
    {
      "id": "arxiv:2401.12345",
      "title": "Large Language Models for Scientific Literature Review",
      "authors": [
        "Jane Doe",
        "John Smith"
      ],
      "year": 2024,
      "source": "arxiv",
      "field_of_study": "computer_science",
      "abstract": "This paper explores how large language models can assist with scientific literature review through semantic retrieval and synthesis workflows.",
      "url": "https://arxiv.org/abs/2401.12345"
    },
    {
      "id": "s2:987654321",
      "title": "Semantic Search Methods for Scholarly Discovery",
      "authors": [
        "Alice Brown",
        "David Lee"
      ],
      "year": 2023,
      "source": "semantic_scholar",
      "field_of_study": "computer_science",
      "abstract": "We present semantic search techniques for discovering and ranking relevant scholarly papers across large academic corpora.",
      "url": "https://www.semanticscholar.org/paper/987654321"
    }
  ]
}
```

```json
{
  "error": "invalid_request",
  "message": "The request was invalid or missing required parameters."
}
```

```json
{
  "error": "unauthorized",
  "message": "Missing or invalid API key."
}
```

```json
{
  "error": "rate_limited",
  "message": "Rate limit exceeded. Please try again later."
}
```

```json
{
  "error": "internal_error",
  "message": "An unexpected server error occurred."
}
```

</Response>

## Endpoint overview

Search academic papers with keyword and semantic matching by sending a `GET` request to the search endpoint. Use query parameters to narrow results by source, field of study, year, and output format.

<Callout kind="info">

Add your API key to the `x-api-key` header on every request.

```bash
x-api-key: pg_api_example_9xmk7q2r
```

Create API keys in **Settings > API Keys** in the Paperguide dashboard.

</Callout>

## Method and path

Send requests to the Paperguide API base URL with the `/search` path.

```bash
GET https://api.paperguide.ai/v1/search
```

The endpoint returns JSON search results unless you request BibTeX output.

## Query parameters

Use these query parameters to control the search request.

<ParamField query="query" param-type="string" required="true">

Search text used for keyword and semantic matching.

</ParamField>

<ParamField query="source" param-type="string" required="false">

Filters results to a supported content source.

</ParamField>

<ParamField query="field_of_study" param-type="string" required="false">

Filters results to a supported field of study.

</ParamField>

<ParamField query="year" param-type="integer" required="false">

Filters results to a publication year.

</ParamField>

<ParamField query="limit" param-type="integer" required="false">

Limits the number of results returned.

</ParamField>

Enterprise plans support up to 50 papers per request. Contact us for Enterprise access and usage-based pricing.

<ParamField query="format" param-type="string" required="false">

Controls the response format. Use `bibtex` to return BibTeX output.

</ParamField>

## Allowed source values

Use one of these values for the `source` parameter.

| Value | Description |
| ----- | ----------- |
| `arxiv` | Search papers from arXiv |
| `pubmed` | Search papers from PubMed |
| `semantic_scholar` | Search papers indexed through Semantic Scholar |

## Allowed field-of-study values

Use one of these values for the `field_of_study` parameter.

| Value | Description |
| ----- | ----------- |
| `computer_science` | Computer science papers |
| `medicine` | Medicine and clinical research |
| `biology` | Biology and life sciences |
| `physics` | Physics papers |
| `chemistry` | Chemistry papers |
| `mathematics` | Mathematics papers |
| `engineering` | Engineering papers |
| `economics` | Economics papers |
| `psychology` | Psychology papers |
| `environmental_science` | Environmental science papers |

## Request example

This example searches for recent papers about retrieval-augmented generation in computer science.

<Request>
```bash
curl --request GET \
  --url "https://api.paperguide.ai/v1/search?query=retrieval%20augmented%20generation&field_of_study=computer_science&year=2024&limit=3" \
  --header "x-api-key: pg_api_example_9xmk7q2r"
```
</Request>

The API returns matching papers as JSON. Each item includes core metadata such as title, authors, source, and abstract when available.

## Response example

<Response>
```json
{
  "results": [
    {
      "id": "649f2b7c1a2d4e8f9c0a1234",
      "title": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks",
      "authors": [
        "Patrick Lewis",
        "Ethan Perez",
        "Aleksandara Piktus"
      ],
      "year": 2024,
      "source": "semantic_scholar",
      "field_of_study": "computer_science",
      "abstract": "This paper studies retrieval-augmented generation methods for knowledge-intensive natural language processing tasks.",
      "url": "https://api.paperguide.ai/papers/649f2b7c1a2d4e8f9c0a1234"
    },
    {
      "id": "649f2b7c1a2d4e8f9c0a5678",
      "title": "Efficient Indexing Strategies for Retrieval-Augmented Systems",
      "authors": [
        "Jane Chen",
        "Marcus Hill"
      ],
      "year": 2024,
      "source": "arxiv",
      "field_of_study": "computer_science",
      "abstract": "The paper evaluates indexing strategies that improve retrieval quality and latency in large-scale retrieval-augmented systems.",
      "url": "https://api.paperguide.ai/papers/649f2b7c1a2d4e8f9c0a5678"
    },
    {
      "id": "649f2b7c1a2d4e8f9c0a9012",
      "title": "Grounding Language Models with External Research Corpora",
      "authors": [
        "Sara Ahmed",
        "David Park"
      ],
      "year": 2024,
      "source": "pubmed",
      "field_of_study": "computer_science",
      "abstract": "This work explores retrieval pipelines that ground language model outputs in external research corpora.",
      "url": "https://api.paperguide.ai/papers/649f2b7c1a2d4e8f9c0a9012"
    }
  ]
}
```
</Response>

## Response fields

<ResponseField name="results" field-type="array" required="true">

List of matching papers.

</ResponseField>

<ResponseField name="id" field-type="string" required="true">

Unique identifier for the paper.

</ResponseField>

<ResponseField name="title" field-type="string" required="true">

Paper title.

</ResponseField>

<ResponseField name="authors" field-type="array" required="true">

List of author names.

</ResponseField>

<ResponseField name="year" field-type="integer" required="false">

Publication year.

</ResponseField>

<ResponseField name="source" field-type="string" required="false">

Source where Paperguide found the paper.

</ResponseField>

<ResponseField name="field_of_study" field-type="string" required="false">

Field of study assigned to the paper.

</ResponseField>

<ResponseField name="abstract" field-type="string" required="false">

Paper abstract when available.

</ResponseField>

<ResponseField name="url" field-type="string" required="false">

Paper URL.

</ResponseField>

## BibTeX output notes

Set `format=bibtex` to return BibTeX instead of JSON. Use this when you want to import citations directly into a reference manager or manuscript workflow.

If you request BibTeX output, the response body is plain BibTeX text rather than a JSON object. Response fields described above do not apply to BibTeX responses.

## Search quality explanation

The search endpoint uses keyword and semantic matching together. Keyword matching helps when you know exact terms, while semantic matching helps when relevant papers use different wording.

Results depend on the quality and specificity of your `query` value. Short or broad queries usually return more varied results, while focused queries with a field of study or year filter usually return more precise matches.

## Documented error responses

The API returns JSON errors when a request fails. These are the documented error responses for the search endpoint.

| Status | Meaning |
| ------ | ------- |
| `400` | Invalid request parameters |
| `401` | Missing or invalid API key |
| `429` | Rate limit or monthly quota exceeded |
| `500` | Internal server error |
