---
title: "POST /search"
method: POST
path: "/search"
tags: ["Search"]
---

# POST /search

`POST /search`

This service can be used to query the GovInfo search engine and return results that are the equivalent to what is returned by the main user interface. You can use field operators, such as congress, publishdate, branch, and others to construct complex queries that will return only matching documents. For additional information, please see our <a href='https://www.govinfo.gov/features/search-service-overview' target='blank' style='text-decoration:underline'>search service overview</a>.

## Request body

- SearchRequest
  - `query` string
  - `pageSize` integer
  - `offsetMark` string
  - `sorts` Sort[]
    - `field` string
    - `sortOrder` 'ASC' | 'DESC'
  - `historical` boolean
  - `resultLevel` string

## Response `200`

OK

- SearchResponse
  - `results` SearchResult[]
    - `title` string
    - `packageId` string
    - `granuleId` string
    - `lastModified` string
    - `governmentAuthor` string[]
    - `dateIssued` string
    - `collectionCode` string
    - `resultLink` string
    - `dateIngested` string
    - `download` object
    - `relatedLink` string
  - `offsetMark` string
  - `count` integer

## Other responses

- `400` — When the input request criteria is not following the spec
- `404` — No Content found for a given search criteria
- `500` — Any system failure while processing the search request /query

---

[API](https://skmtc.net/govinfo/apis/govinfo-api.md) · [All operations](https://skmtc.net/govinfo/apis/govinfo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/govinfo/govinfo-api/versions/eb9f8f5a0819/schema)
