# Search aggregates and optionally single securities

Comprehensive search across aggregates, their constituents and optionally single securities.
When include_single_security=False (default):
- Searches aggregate fields: vanda_id, type, subtype
- Searches constituent securities: vanda_id, figi, symbol, name, sector, industry
- Returns only aggregate results

When include_single_security=True:
- Each search returns up to 'limit' results (total max 2*limit)
- Results include 'result_type' field to distinguish aggregate vs single_security

Returns aggregates/securities matching any criteria (cached 5 minutes).

Endpoint: GET /aggregates/reference/search
Version: 1.0.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer

## Query parameters:

  - `query` (string, required)
    Search query

  - `types` (any)
    Comma-separated aggregate types to filter

  - `active_only` (boolean)
    Only search active aggregates/securities

  - `limit` (integer)
    Maximum results per search type

  - `include_single_security` (boolean)
    Include single security search results

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 200 fields (application/json):

  - `id` (integer, required)
    Aggregate ID

  - `vanda_id` (string, required)
    Vanda identifier

  - `type` (string, required)
    Aggregate type

  - `subtype` (any)
    Aggregate subtype

  - `active` (boolean, required)
    Active status

  - `result_type` (string)
    Result type discriminator

  - `ticker` (any)
    Trading symbol

  - `name` (any)
    Security name

  - `figi` (any)
    FIGI

  - `exchange` (any)
    Exchange

  - `sector` (any)
    Sector

  - `industry` (any)
    Industry

  - `asset_type` (any)
    Asset type

  - `is_active` (any)
    Active status

## Response 422:

  - `422` (unknown)
    Validation Error

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)

  - `detail.input` (any)

  - `detail.ctx` (object)

