# Search Funds, ETFs and Stocks

Search by name, ticker or ISIN. One lookup covers stocks, funds and ETFs. Rows carry the PerformanceId, a secId, ticker, name, star rating and last close. Use PerformanceId for stock and price. Use secId for fund routes. ETF rows carry searchOnly true because no detail route serves them.

- **Documentation:** [https://scrappa.co/docs/morningstar-api/morningstar_search](https://scrappa.co/docs/morningstar-api/morningstar_search)
- **API group:** Morningstar API
- **Endpoint:** `GET https://scrappa.co/api/morningstar/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | Name, ticker or ISIN. Required. |
| `page` | integer | No | One-based page. Defaults to 1. |
| `pageSize` | integer | No | Rows per page, 1 to 100. Defaults to 20. |
| `universe` | string | No | One of all, nasdaq, nyse, funds or etfs. Defaults to all. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/morningstar/search?q=Vanguard+500&page=1&pageSize=5"
```

## Example response

```json
{
    "total": 8,
    "page": 1,
    "pageSize": 5,
    "rows": [
        {
            "performanceId": "0P00002YHQ",
            "secId": "FOUSA00L8W",
            "fundId": "FSUSA002QH",
            "ticker": "VFIAX",
            "name": "Vanguard 500 Index Admiral",
            "starRating": 5,
            "closePrice": 512.34
        }
    ],
    "source": "morningstar"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Not found | No row matched the query. |
|  | Service error | The upstream request failed. No credit is charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
