# /openalex/works/search

`POST /api/openalex/works/search`

Price: 5 credits

Search OpenAlex works (papers) by query and filters

## How to use it

Search academic works on OpenAlex. Combine a free-text query (full-text, title-only, abstract-only or fulltext-only) with rich filters: publication year or date range, work type, open-access status, presence of DOI/abstract/full text, retraction status, language, and relationships to a specific author, institution, country, source/venue, ISSN, publisher, funder, topic, concept, keyword or Sustainable Development Goal. Filter by citation count and by citation relationships (cites, cited_by, related_to), and sort by relevance, citation count or publication date. Returns the same rich work objects as the get-by-id endpoint.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `search` (string, nullable) — Full-text search query across title, abstract and fulltext
- `title_search` (string, nullable) — Search only within work titles
- `abstract_search` (string, nullable) — Search only within work abstracts
- `fulltext_search` (string, nullable) — Search only within work full text
- `publication_year` (integer, nullable) — Exact publication year
- `from_publication_date` (string, nullable) — Earliest publication date, YYYY-MM-DD (examples: "2020-01-01")
- `to_publication_date` (string, nullable) — Latest publication date, YYYY-MM-DD (examples: "2023-12-31")
- `type` (string, nullable) — Work type (one of: "article", "book", "book-chapter", "dataset", "dissertation", "editorial", "erratum", "grant", "letter", "other", "paratext", "peer-review", "preprint", "reference-entry", "report", "retraction", "review", "standard", "supplementary-materials")
- `is_oa` (boolean, nullable) — Only open-access works when true
- `oa_status` (string, nullable) — Open-access status (one of: "gold", "green", "hybrid", "bronze", "closed", "diamond")
- `has_doi` (boolean, nullable) — Only works that have a DOI
- `has_abstract` (boolean, nullable) — Only works that have an abstract
- `has_fulltext` (boolean, nullable) — Only works with indexed full text
- `is_retracted` (boolean, nullable) — Filter by retraction status
- `language` (string, nullable) — ISO 639-1 language code (examples: "en", "de")
- `author_id` (string, nullable) — OpenAlex author id of an author of the work (examples: "A5023888391")
- `institution_id` (string, nullable) — OpenAlex institution id affiliated with the work (examples: "I27837315")
- `institution_country_code` (string, nullable) — ISO country code of an affiliated institution (examples: "US")
- `source_id` (string, nullable) — OpenAlex source (venue) id of the work (examples: "S137773608")
- `source_issn` (string, nullable) — ISSN of the work source (venue) (examples: "0028-0836")
- `publisher` (string, nullable) — OpenAlex publisher id (examples: "P4310319908")
- `funder_id` (string, nullable) — OpenAlex funder id (examples: "F4320332161")
- `topic_id` (string, nullable) — OpenAlex topic id (examples: "T10102")
- `primary_topic_id` (string, nullable) — OpenAlex id of the work's primary topic
- `concept_id` (string, nullable) — OpenAlex concept id (examples: "C41008148")
- `keyword_id` (string, nullable) — OpenAlex keyword id (examples: "citation")
- `sdg_id` (string, nullable) — Sustainable Development Goal id
- `cited_by_count` (string, nullable) — Citation-count filter, supports range operators (examples: "100", ">100", "100-500")
- `cites` (string, nullable) — Works that cite this work id (examples: "W2741809807")
- `cited_by` (string, nullable) — Works cited by this work id (examples: "W2741809807")
- `related_to` (string, nullable) — Works related to this work id (examples: "W2741809807")
- `sort` (string, nullable) — Result ordering (one of: "relevance_score:desc", "cited_by_count:desc", "cited_by_count:asc", "publication_date:desc", "publication_date:asc")
- `count` (integer, required) — Number of works to return (min: 1)

## Response

### 200 — Successful Response

- `@type` (string) (default: "OpenalexWork")
- `id` (string, required)
- `doi` (string, nullable)
- `publication_year` (integer, nullable)
- `publication_date` (string, nullable)
- `language` (string, nullable)
- `type` (string, nullable)
- `pmid` (string, nullable)
- `mag_id` (string, nullable)
- `cited_by_count` (integer) (default: 0)
- `fwci` (number, nullable)
- `referenced_works_count` (integer) (default: 0)
- `is_retracted` (boolean) (default: false)
- `is_oa` (boolean, nullable)
- `oa_status` (string, nullable)
- `oa_url` (string, nullable)
- `indexed_in` (array) (default: [])
- `citation_normalized_percentile` (object, nullable)
  - `@type` (string) (default: "OpenalexCitationPercentile")
  - `value` (number, nullable)
  - `is_in_top_1_percent` (boolean, nullable)
  - `is_in_top_10_percent` (boolean, nullable)
- `abstract` (string, nullable)
- `primary_location` (object, nullable)
  - `@type` (string) (default: "OpenalexWorkLocation")
  - `is_oa` (boolean, nullable)
  - `landing_page_url` (string, nullable)
  - `pdf_url` (string, nullable)
  - `license` (string, nullable)
  - `version` (string, nullable)
  - `source` (object, nullable)
    - `@type` (string) (default: "OpenalexWorkSource")
    - `id` (string, nullable)
    - `display_name` (string, nullable)
    - `issn_l` (string, nullable)
    - `type` (string, nullable)
    - `is_oa` (boolean, nullable)
    - `is_in_doaj` (boolean, nullable)
    - `host_organization_name` (string, nullable)
- `best_oa_location` (object, nullable)
  - `@type` (string) (default: "OpenalexWorkLocation")
  - `is_oa` (boolean, nullable)
  - `landing_page_url` (string, nullable)
  - `pdf_url` (string, nullable)
  - `license` (string, nullable)
  - `version` (string, nullable)
  - `source` (object, nullable)
    - `@type` (string) (default: "OpenalexWorkSource")
    - `id` (string, nullable)
    - `display_name` (string, nullable)
    - `issn_l` (string, nullable)
    - `type` (string, nullable)
    - `is_oa` (boolean, nullable)
    - `is_in_doaj` (boolean, nullable)
    - `host_organization_name` (string, nullable)
- `biblio` (object, nullable)
  - `@type` (string) (default: "OpenalexBiblio")
  - `volume` (string, nullable)
  - `issue` (string, nullable)
  - `first_page` (string, nullable)
  - `last_page` (string, nullable)
- `primary_topic` (object, nullable)
  - `@type` (string) (default: "OpenalexTopic")
  - `id` (string, required)
  - `display_name` (string) (default: "")
  - `score` (number, nullable)
  - `works_count` (integer, nullable)
  - `topic_share` (number, nullable)
  - `subfield` (string, nullable)
  - `field` (string, nullable)
  - `domain` (string, nullable)
- `authorships` (array) (default: [])
  - `@type` (string) (default: "OpenalexAuthorship")
  - `id` (string, required)
  - `display_name` (string) (default: "")
  - `orcid` (string, nullable)
  - `author_position` (string, nullable)
  - `is_corresponding` (boolean, nullable)
  - `raw_author_name` (string, nullable)
  - `countries` (array) (default: [])
  - `institutions` (array) (default: [])
    - `@type` (string) (default: "OpenalexWorkInstitution")
    - `id` (string, required)
    - `display_name` (string) (default: "")
    - `ror` (string, nullable)
    - `country_code` (string, nullable)
    - `type` (string, nullable)
- `corresponding_author_ids` (array) (default: [])
- `topics` (array) (default: [])
  - `@type` (string) (default: "OpenalexTopic")
  - `id` (string, required)
  - `display_name` (string) (default: "")
  - `score` (number, nullable)
  - `works_count` (integer, nullable)
  - `topic_share` (number, nullable)
  - `subfield` (string, nullable)
  - `field` (string, nullable)
  - `domain` (string, nullable)
- `keywords` (array) (default: [])
  - `@type` (string) (default: "OpenalexKeyword")
  - `id` (string, required)
  - `display_name` (string) (default: "")
  - `score` (number, nullable)
- `concepts` (array) (default: [])
  - `@type` (string) (default: "OpenalexConcept")
  - `id` (string, required)
  - `display_name` (string) (default: "")
  - `level` (integer, nullable)
  - `score` (number, nullable)
  - `wikidata` (string, nullable)
- `mesh` (array) (default: [])
  - `@type` (string) (default: "OpenalexMeshTerm")
  - `descriptor_ui` (string, nullable)
  - `descriptor_name` (string) (default: "")
  - `qualifier_ui` (string, nullable)
  - `qualifier_name` (string, nullable)
  - `is_major_topic` (boolean, nullable)
- `funders` (array) (default: [])
  - `@type` (string) (default: "service__parsers__openalex__works__works__OpenalexFunder")
  - `id` (string, required)
  - `display_name` (string) (default: "")
  - `ror` (string, nullable)
  - `award_ids` (array) (default: [])
- `sustainable_development_goals` (array) (default: [])
  - `@type` (string) (default: "OpenalexSdg")
  - `id` (string, nullable)
  - `display_name` (string) (default: "")
  - `score` (number, nullable)
- `referenced_works` (array) (default: [])
- `related_works` (array) (default: [])
- `counts_by_year` (array) (default: [])
  - `@type` (string) (default: "OpenalexCountByYear")
  - `year` (integer, required)
  - `works_count` (integer, nullable)
  - `cited_by_count` (integer, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

