> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Research Sources

> Search case law and legislation across several public sources in one call.

> [!NOTE]
>
> **Preview.** This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive `403 mcp_not_enabled`. See the [preview overview](/preview).

Searches case law and legislation across several sources at once and returns the matches in one list. Read a full judgment or statute with [Get Research Document](/api-reference/research/get-document). For a researched answer or memo, ask an agent with [Create Question](/api-reference/agents/create-question).

The call is synchronous. The sources run in parallel and each has an 8-second limit, so the call returns within about 10 seconds. A source that is slow or down does not fail the request. The `sources` list in the response reports each source's `status` and how many results it gave.

Results interleave the sources: each source's best match, then each one's second, and so on. Each source ranks its own matches. `limit` caps the whole list, not each source.

You search the sources your organisation's Wordsmith chat can use. A source that is off for your organisation, or not set up, is skipped. If you name it in `sources`, it is listed with `status: "unavailable"`. Sources that cover none of the requested `jurisdictions` are not searched and do not appear in `sources`.

## Sources

| `source` | Covers | Jurisdictions | Searches |
| - | - | - | - |
| `moonlit` | Legislation, case law, policy and commentary in more than 25 jurisdictions, strongest in continental Europe and other civil-law systems. | `gb`, `eu`, `at`, `be`, `hr`, `cz`, `dk`, `ee`, `fi`, `fr`, `de`, `ie`, `it`, `lu`, `nl`, `no`, `pl`, `pt`, `sk`, `si`, `es`, `se`, `ch`, `br`, `ae`, `sa` | Full text |
| `courtlistener` | US federal and state case law. | `us` | Full text |
| `uk_case_law` | Judgments from the courts and tribunals of England and Wales and the UK (The National Archives). | `gb` | Full text |
| `uk_legislation` | UK primary and secondary legislation (legislation.gov.uk). | `gb` | Titles |
| `nz_legislation` | New Zealand Acts, bills and legislative instruments. | `nz` | Full text |
| `eur_lex` | EU regulations, directives and decisions, and CJEU case law. | `eu` | English titles |
| `federal_register` | US federal rules, proposed rules and notices. | `us` | Full text |
| `regulations_gov` | US federal rulemaking documents. | `us` | Full text |
| `sec_edgar` | US SEC filings. Search only: a filing cannot be read with Get Research Document. | `us` | Full text |

`date_from` and `date_to` go to the source where it can filter by date. For `uk_case_law`, `regulations_gov` and `eur_lex` the results are filtered after the search, so fewer may come back. `uk_legislation` filters by year. `nz_legislation` results carry no date and are not filtered.

## Authentication

Send an API key, or an OAuth access token with the `research:read` scope, as a bearer token in the `Authorization` header. A token without the scope gets `403` with `"error": "insufficient_scope"`.

## Body parameters

**query** `string` *required*

What to search for, in plain language or as a citation, such as `implied term of good faith in commercial contracts` or `[2015] UKSC 72`. 1 to 1,000 characters.

**sources** `string[]`

The sources to search. Defaults to every source you can use. See [Sources](#sources).

**jurisdictions** `string[]`

Lower-case ISO 3166-1 country codes, plus `eu`, such as `["gb", "eu"]`. Only sources that cover one of them are searched, and `moonlit` searches only these. Defaults to every jurisdiction the chosen sources cover.

**date\_from** `string`

Only results dated on or after this ISO 8601 date, such as `"2015-01-01"`.

**date\_to** `string`

Only results dated on or before this ISO 8601 date. Must not be before `date_from`.

**limit** `integer` (default: 20)

The most results to return in all, from `1` to `50`.

## Response

The response is not paged. To see more, narrow the query, the sources or the date range.

**items** `object[]`

The matches.

**properties**

**source** `string`

The source id.

**document\_id** `string`

The document's id at the source. Pass it with `source` to [Get Research Document](/api-reference/research/get-document).

**title** `string`

The case name or the instrument's title.

**citation** `string | null`

The neutral or reporter citation, CELEX number, or filing number.

**court\_or\_issuer** `string | null`

The court, agency or company.

**jurisdiction** `string | null`

The jurisdiction code, when the source gives one.

**date** `string | null`

ISO 8601: a full date where the source gives one, else the year.

**snippet** `string | null`

A summary or matching passage, when the source returns one. `uk_case_law` results have none.

**url** `string | null`

The document's public page at the source.

**sources** `object[]`

One entry for each source searched, and for each named source you cannot use.

**properties**

**source** `string`

The source id.

**status** `string`

`ok`, `partial`, `timeout`, `error` or `unavailable`. `partial` means part of the source's search failed, so its results may be missing some matches; for EUR-Lex, one of legislation and case law did not answer. Only `ok` and `partial` sources gave results.

**count** `integer`

How many of its results are in `items`.

```bash cURL theme={null}
curl -X POST "https://api.wordsmith.ai/api/v1/research/search" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "implied term of good faith in long-term commercial contracts",
    "jurisdictions": ["gb"],
    "date_from": "2013-01-01",
    "limit": 10
  }'
```

```json Response theme={null}
{
  "items": [
    {
      "source": "uk_case_law",
      "document_id": "ewhc/qb/2013/111",
      "title": "Yam Seng Pte Ltd v International Trade Corporation Ltd",
      "citation": "[2013] EWHC 111 (QB)",
      "court_or_issuer": "High Court (Queen's Bench Division)",
      "jurisdiction": "gb",
      "date": "2013-02-01",
      "snippet": null,
      "url": "https://caselaw.nationalarchives.gov.uk/ewhc/qb/2013/111"
    },
    {
      "source": "moonlit",
      "document_id": "GB-UKSC-2015-72",
      "title": "Marks and Spencer plc v BNP Paribas Securities Services Trust Company (Jersey) Ltd",
      "citation": null,
      "court_or_issuer": "Supreme Court",
      "jurisdiction": "gb",
      "date": "2015",
      "snippet": "…a term will only be implied if it satisfies the test of business necessity…",
      "url": "https://www.supremecourt.uk/cases/uksc-2013-0189.html"
    }
  ],
  "sources": [
    { "source": "uk_case_law", "status": "ok", "count": 1 },
    { "source": "uk_legislation", "status": "ok", "count": 0 },
    { "source": "moonlit", "status": "ok", "count": 1 }
  ]
}
```

## Errors

See [Errors](/errors) for the error format.

| HTTP Status | Error Code | When |
| - | - | - |
| 400 | `invalid_request_body` | `query` is missing or empty, a `source` or jurisdiction code is not recognised, a date is not ISO 8601, `date_to` is before `date_from`, or `limit` is outside `1`–`50`. |
| 401 | `unauthorized` | The API key or token is missing or invalid. |
| 403 | `insufficient_scope` | The OAuth token does not have `research:read`. |
| 403 | `mcp_not_enabled` | Your organisation is not in the preview. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.