---
title: "Search Stocks"
method: GET
path: "/api/stock/search"
tags: ["US Securities"]
---

# Search Stocks

`GET /api/stock/search`

## Request

- Base URL: `https://powered-by-bamboo-sandbox.investbamboo.com`
- URL: `https://powered-by-bamboo-sandbox.investbamboo.com/api/stock/search`
- Auth: none declared. Required headers: `content-type`, `accept-language`, `x-user-id`, `x-subject-type`, `x-client-token`

This endpoint searches for a stock by a given query phrase or set of phrases, supporting advanced search capabilities with multiple filtering and sorting options.

The search functionality supports complex queries like filtering stocks between specific price ranges, performance thresholds, or market cap sizes, with predefined filters for top gainers, top losers, and user-owned stocks.

##### Advanced search capabilities include:

**Query Options:**
- **Text Search:** Query by company names, stock symbols, ticker matching
- **Theme Filtering:** Filter by investment themes and categories
- **Multi-Parameter:** Combine text search with theme filters

**Sorting Options:**
- **Alphabetical:** `alphabetical:asc` or `alphabetical:desc`
- **Price-Based:** `price:asc`, `percent_change:asc`
- **Fundamentals:** `market_cap:asc`, `pe_ratio:asc`, `eps:asc`
- **Trading Metrics:** `volume:asc`, `div_yield:asc`

**Advanced Filtering:**
- **Price Ranges:** `price;a:10,price;b:50` (between $10-$50)
- **Performance:** `percent_change;a:5` (gaining above 5%)
- **Market Cap:** `market_cap;b:1000000000` (under $1B market cap)
- **Fundamentals:** `pe_ratio;a:15` (P/E ratio above 15)
- **Predefined Filters:** `top_gainers`, `top_losers`, `my_stocks`

**Example Usage:**

    GET /api/stock/search?query=apple&sorting=market_cap:desc&filters=price;a:100,my_stocks

## Query parameters

- `query` string, required
- `theme_id` string
- `sorting` string
- `filters` string

## Headers

- `content-type` string, required
- `accept-language` string, required
- `x-user-id` string, required
- `x-subject-type` string, required
- `x-client-token` string, required

## Response `200`

Stock list

- StocksSearchResponse: List of all active stocks
  - `currency_symbol` string: Currency Symbol
  - `result` object[]: Stock search response
    - `value_change` number: Stock value change
    - `user_equity` number: Stock user equity
    - `total_return` number: Stock total return
    - `symbol` string: Stock symbol
    - `quantity` number: Stock quantity
    - `name` string: Stock name
    - `logo` string: Stock logo with a background colour
    - `favourite` string: Stock favourite
    - `background_color` string: Stock background color
    - `avatar` string: Stock logo without background colour

## Other responses

- `401`: Token have expired or invalid token

---

[API](https://skmtc.dev/investbamboo/apis/investbamboo-bamboo-api.md) - [All operations](https://skmtc.dev/investbamboo/apis/investbamboo-bamboo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/investbamboo/apis/investbamboo-bamboo-api/revisions/063521e8d924?raw)
