# searchJobMatches

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

Read the matches a background search found — the last step’s records newest first, the whole match count, how many records were examined, and whether the set is partial or has expired.

Read ONE background search's result set: the matches of the plan's LAST family as six-field summaries — newest first (updatedAt desc, id tiebreak), up to the plan's `limit` — with the EXACT matchCount, the records examined, and `partial` (true when the job halted before finishing — a refused plan, the 300 s clock, or a cancel — the partials it had survive). The result set lives 7 days from the finish (`expiresAt`); afterwards `expired` is true and the matches are gone (the job record stays readable). A job still running answers no matches yet with partial true. AS YOU: the matches are gated by YOUR OWN right to list the plan's last family — refused AUTHZ/FORBIDDEN naming it; a job outside your tenant, or none at all, is NOT_FOUND. Requires authentication.

## What happens

Read-only: the matches are records you could list yourself — if you may not list that kind of record, the read is refused. A result set is kept for seven days after the search finishes; a search still running answers an empty, partial set.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows `api:searchJobMatches`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | yes | The id of the record. |

## Returns

[SearchJobMatches](/types/SearchJobMatches/) `SearchJobMatches!` — One background search's result set: the matches of the plan's LAST family newest first up to the plan's limit, the EXACT matchCount, the records examined, `partial` (the job halted before finishing — refused, expired, or cancelled; the partials survive), `expired` (the 7-day result set is gone; the job record stays), and the instant it expires (absent while the job still runs).

## Example request

```graphql
query ExampleSearchJobMatches($id: ID!) {
  searchJobMatches(id: $id) {
    matchCount
    examined
    partial
    expired
    expiresAt
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000"
}
```

## Example response

```json
{
  "data": {
    "searchJobMatches": {
      "matchCount": 1,
      "examined": 1,
      "partial": true,
      "expired": true,
      "expiresAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
