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

# Search Bdc Portfolios

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

Search across all indexed BDC portfolios for a borrower, industry, or keyword.

Searches loan-level data from ~50 BDC quarterly filings covering $150B+ in direct loans.
Returns matching investments with terms (spread, seniority, maturity, fair value).

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

## Request

### Query parameters

- `q` (string, required) — Search query — borrower name, industry, or keyword
- `seniority` (string, optional, nullable) — Filter by seniority: first_lien, second_lien, unitranche, mezzanine, equity
- `non_accrual_only` (boolean, optional, default: false) — Only return defaulted (non-accrual) investments
- `limit` (integer, optional, default: 50)

## Response

### 200

Successful Response

- `query` (string, optional)
- `total_results` (integer, optional)
- `results` (list of OdysseyCreditAnalysisBdcSearchResponseResultsItems, optional)

## Errors

### 500 Internal Server Error

Internal server error

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

## Types

### OdysseyCreditAnalysisBdcSearchResponseResultsItems

- `company` (string, optional)
- `bdc_name` (string, optional)
- `filing_date` (string, optional)
- `source` (string, optional)
- `note` (string, optional)

## Examples

**Response**

```json
{
  "query": "credit",
  "total_results": 50,
  "results": [
    {
      "company": "credit",
      "bdc_name": "TOUSA INC",
      "filing_date": "2007-08-09",
      "source": "edgar_search",
      "note": "Found via EDGAR full-text search. Fetch the BDC portfolio for detailed loan terms."
    },
    {
      "company": "credit",
      "bdc_name": "DOLLAR THRIFTY AUTOMOTIVE GROUP INC",
      "filing_date": "2003-05-14",
      "source": "edgar_search",
      "note": "Found via EDGAR full-text search. Fetch the BDC portfolio for detailed loan terms."
    }
  ]
}
```

**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/bdc/search",
    headers=headers,
    params={"q": "credit"},
    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/bdc/search?q=credit`, {
    method: "GET",
    headers: { "Authorization": `Bearer ${API_KEY}` }
});
console.log(await response.json());
```