---
title: "Search a relation’s target rows"
method: GET
path: "/v1/tables/{tableId}/relations/{fieldKey}/targets"
tags: ["Tables"]
---

# Search a relation’s target rows

`GET /v1/tables/{tableId}/relations/{fieldKey}/targets`

## Request

- Base URL: `https://api.banksync.io`
- URL: `https://api.banksync.io/v1/tables/{tableId}/relations/{fieldKey}/targets`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Rows of the target table a link may point at, matched on primary text. Searches a maintained projection, never raw row JSON, so it stays usable on a large table.

## Path parameters

- `tableId` string, required: Table ID
- `fieldKey` string, required: Relation field key

## Query parameters

- `q` string
- `limit` integer

## Response `200`

Candidate target rows

- object
  - `success` true, required
  - `items` object[], required
    - `rowId` string, required
    - `tableId` string, required
    - `primary` string, nullable, required
    - `preview` object[], required
      - `key` string, required
      - `text` string, required
  - `hasMore` boolean, required

## Other responses

- `400`: Validation failed, or a read-only field was written — `code` names the refusal and `details[]` the offending field or cell
- `401`: Unauthorized
- `403`: Forbidden — missing scope, insufficient role, or plan limit reached
- `404`: Not found

---

[API](https://skmtc.dev/banksync/apis/banksync-api.md) · [All operations](https://skmtc.dev/banksync/apis/banksync-api/llms.txt) · [OpenAPI document](https://skmtc.dev/banksync/apis/banksync-api/revisions/94465f5ee922?raw)
