---
title: "Search Papers"
method: GET
path: "/papers/search"
tags: ["papers"]
---

# Search Papers

`GET /papers/search`

## Request

- Base URL: `https://api.codeofpaper.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.codeofpaper.com/papers/search`
- Auth: HTTP bearer

Search papers using PostgreSQL full-text search on cached papers.

Returns papers from cache that match the query.
Uses PostgreSQL ts_rank for relevance scoring.

Example:
    GET /papers/search?query=face+detection&limit=20

Returns:
    {
        "query": "face detection",
        "count": 20,
        "papers": [
            {
                "id": "2301.12345",
                "title": "...",
                "authors": ["..."],
                "summary": "...",
                "published_date": "2023-01-25T00:00:00",
                "categories": ["cs.CV", "cs.AI"],
                "url": "https://arxiv.org/abs/2301.12345",
                "similarity_score": 0.85,
                "has_repos": true,
                "repo_count": 3,
                "has_official_repo": true
            },
            ...
        ],
        "source": "cache"
    }

## Query parameters

- `query` string, required: Search query (keywords or phrase). Use quotes for exact phrases: "face recognition"
- `limit` integer: Maximum number of results
- `offset` integer: Offset for pagination
- `sort_by` 'relevant' | 'recent' | 'has_code' | 'trending': Sort order: relevant, recent, has_code, trending
- `year` integer, nullable: Restrict to a single publication year (inclusive).
- `after` string, date, nullable: Only papers published on/after this date (YYYY-MM-DD).
- `before` string, date, nullable: Only papers published on/before this date (YYYY-MM-DD).
- `venue` string, nullable: Restrict to a conference. Accepts a series (e.g. 'neurips'), a specific conference id (e.g. 'neurips2024'), or a substring of the conference name. Case-insensitive.

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api.md) · [All operations](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api/revisions/94ea47fd4aa1?raw)
