---
title: "Executes search of records"
method: GET
path: "/search/records"
tags: ["SearchRecords"]
---

# Executes search of records

`GET /search/records`

## Query parameters

- `sps.recordSeries` string[]
- `sps.references` string[]
- `sps.recordCollections` string[]
- `sps.dateFrom` string, date-time
- `sps.dateTo` string, date-time
- `sps.timePeriods` string[]
- `sps.recordRepositories` string[]
- `sps.departments` string[]
- `sps.taxonomySubjects` string[]
- `sps.catalogueLevels` string[]
- `sps.closureStatuses` string[]
- `sps.corporateNames` string
- `sps.heldByCode` 'ALL' | 'TNA' | 'OTH'
- `sps.documentType` string
- `sps.titleName` string
- `sps.firstName` string
- `sps.lastName` string
- `sps.dateOfBirthFrom` string, date-time
- `sps.dateOfBirthTo` string, date-time
- `sps.number` string
- `sps.occupation` string
- `sps.recordPlace` string
- `sps.oldCountyName` string
- `sps.townName` string
- `sps.recordOpeningFromDate` string, date-time
- `sps.recordOpeningToDate` string, date-time
- `sps.referenceFirstLetter` string
- `sps.referenceQuery` string
- `sps.searchRestrictionFields` string[]
- `sps.searchQuery` string, required
- `sps.returnHighlighted` boolean
- `sps.sortByOption` 'RELEVANCE' | 'REFERENCE_ASCENDING' | 'DATE_ASCENDING' | 'DATE_DESCENDING' | 'TITLE_ASCENDING' | 'TITLE_DESCENDING'
- `sps.page` integer
- `sps.resultsPageSize` integer
- `sps.titleFirstLetter` string
- `sps.batchStartMark` string
- `sps.preferenceQueryStringParameter` string

## Response `200`

OK

- RecordSearchResultsViewModel — View model representing the search results for records, including facets and filters.
  - `Records` RecordSearchResultViewModels[] — Gets or sets the list of record search result view models.
    - `AltName` string — Gets or sets the alternative name for the record.
    - `Places` string[] — Gets or sets the list of places associated with the record.
    - `CorpBodies` string[] — Gets or sets the list of corporate bodies related to the record.
    - `Taxonomies` string[] — Gets or sets the list of taxonomies associated with the record.
    - `FormerReferenceDep` string — Gets or sets the former reference for the department.
    - `FormerReferencePro` string — Gets or sets the former reference for the PRO (Public Record Office).
    - `HeldBy` string[] — Gets or sets the list of repositories or institutions holding the record.
    - `Context` string — Gets or sets the context information for the record.
    - `Content` string — Gets or sets the content description of the record.
    - `URLParameters` string — Gets or sets the URL parameters for the record.
    - `Department` string — Gets or sets the department associated with the record.
    - `Note` string — Gets or sets any notes related to the record.
    - `AdminHistory` string — Gets or sets the administrative history of the record.
    - `Arrangement` string — Gets or sets the arrangement details of the record.
    - `MapDesignation` string — Gets or sets the map designation for the record, if applicable.
    - `MapScale` string — Gets or sets the map scale for the record, if applicable.
    - `PhysicalCondition` string — Gets or sets the physical condition of the record.
    - `CatalogueLevel` integer — Gets or sets the catalogue level of the record.
    - `OpeningDate` string — Gets or sets the opening date of the record.
    - `ClosureStatus` string — Gets or sets the closure status of the record.
    - `ClosureType` string — Gets or sets the closure type of the record.
    - `ClosureCode` string — Gets or sets the closure code of the record.
    - `DocumentType` string — Gets or sets the document type of the record.
    - `CoveringDates` string — Gets or sets the covering dates for the asset.
    - `Description` string — Gets or sets the description of the asset.
    - `EndDate` string — Gets or sets the end date of the asset.
    - `NumEndDate` integer — Gets or sets the numeric representation of the end date.
    - `NumStartDate` integer — Gets or sets the numeric representation of the start date.
    - `StartDate` string — Gets or sets the start date of the asset.
    - `Id` string — Gets or sets the unique identifier of the asset.
    - `Reference` string — Gets or sets the reference code of the asset.
    - `Score` number, float — Gets or sets the relevance score of the asset.
    - `Source` string — Gets or sets the source of the asset.
    - `Title` string — Gets or sets the title of the asset.
  - `TaxonomySubjects` FacetItemViewModel[] — Gets or sets the list of taxonomy subject facet items.
    - `Code` string
    - `Count` integer
  - `TimePeriods` FacetItemViewModel[] — Gets or sets the list of time period facet items.
    - `Code` string
    - `Count` integer
  - `Departments` FacetItemViewModel[] — Gets or sets the list of department facet items.
    - `Code` string
    - `Count` integer
  - `CatalogueLevels` FacetItemViewModel[] — Gets or sets the list of catalogue level facet items.
    - `Code` string
    - `Count` integer
  - `ClosureStatuses` FacetItemViewModel[] — Gets or sets the list of closure status facet items.
    - `Code` string
    - `Count` integer
  - `Sources` FacetItemViewModel[] — Gets or sets the list of source facet items.
    - `Code` string
    - `Count` integer
  - `Repositories` FacetItemViewModel[] — Gets or sets the list of repository facet items.
    - `Code` string
    - `Count` integer
  - `HeldByReps` FacetItemViewModel[] — Gets or sets the list of held by representative facet items.
    - `Code` string
    - `Count` integer
  - `ReferenceFirstLetters` FacetItemViewModel[] — Gets or sets the list of reference first letter facet items.
    - `Code` string
    - `Count` integer
  - `TitleFirstLetters` FacetItemViewModel[] — Gets or sets the list of title first letter facets.
    - `Code` string
    - `Count` integer
  - `Count` integer — Gets or sets the total count of search results.
  - `NextBatchMark` string — Gets or sets the marker for the next batch of results.

## Other responses

- `400` — Bad request
- `404` — Not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/the-national-archives/apis/discovery.md) · [All operations](https://skmtc.net/the-national-archives/apis/discovery/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/the-national-archives/discovery/revisions/1e8c76e26ab1/schema)
