> For a complete page index of the Captain API documentation, fetch https://docs.filesearch.dev/llms.txt?excludeSpec=true

# Search Credit Relationships

GET https://api.filesearch.dev/v2/datasets/odyssey/credit-analysis/relationships/search

Search lender-borrower relationships across BDC portfolios and UCC filing data.

Provide either `lender` (to find their borrowers) or `borrower` (to find their lenders).
Cross-references BDC SEC filings with state UCC portal links for deeper research.

Reference: https://docs.filesearch.dev/reference/datasets/odyssey/credit-analysis/relationships/credit-analysis-relationships-search

## Request

### Query parameters

- `lender` (string, optional, nullable) — Lender name — find their borrowers
- `borrower` (string, optional, nullable) — Borrower name — find their lenders

## Response

### 200

Successful Response

- `error` (string, optional)
- `known_lenders` (list of string, optional)

## Errors

### 500 Internal Server Error

Internal server error

- `error` (string, required) — `INTERNAL_ERROR`.
- `message` (string, required)
- `path` (string, required)

## Examples

**Response**

```json
{
  "error": "Provide either 'lender' or 'borrower' parameter",
  "known_lenders": [
    "Ares Capital",
    "Blue Owl Capital"
  ]
}
```

**SDK Code**

```python Python REST
import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"

headers = {"Authorization": f"Bearer {API_KEY}"}

response = requests.get(
    f"{BASE_URL}/v2/datasets/odyssey/credit-analysis/relationships/search",
    headers=headers,
    timeout=60.0
)
print(response.json())
```

```typescript TypeScript REST
const BASE_URL = "https://api.filesearch.dev";
const API_KEY = "your_api_key";

const response = await fetch(`${BASE_URL}/v2/datasets/odyssey/credit-analysis/relationships/search`, {
    method: "GET",
    headers: { "Authorization": `Bearer ${API_KEY}` }
});
console.log(await response.json());
```