mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-03 07:51:49 +00:00
* add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
63 lines
2.0 KiB
Markdown
Vendored
63 lines
2.0 KiB
Markdown
Vendored
---
|
|
title: search
|
|
description: The documentation page details the 'search' function of the OpenBB python
|
|
library used for querying stocks information. The function allows queries based
|
|
on parameters like country, sector, industry and exchange country. The search results
|
|
are returned as a pandas DataFrame.
|
|
keywords:
|
|
- search
|
|
- query
|
|
- tickers
|
|
- stocks
|
|
- country
|
|
- sector
|
|
- industry
|
|
- exchange_country
|
|
- limit
|
|
---
|
|
|
|
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
|
|
|
|
<HeadTitle title="stocks.search - Reference | OpenBB SDK Docs" />
|
|
|
|
Search selected query for tickers.
|
|
|
|
Source Code: [[link](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/stocks/stocks_helper.py#L98)]
|
|
|
|
```python
|
|
openbb.stocks.search(query: str = "", country: str = "", sector: str = "", industry: str = "", exchange_country: str = "", limit: int = 0)
|
|
```
|
|
|
|
---
|
|
|
|
## Parameters
|
|
|
|
| Name | Type | Description | Default | Optional |
|
|
|------------------|------|---------------------------------------------------------|---------|----------|
|
|
| query | str | The search term used to find company tickers | | True |
|
|
| country | str | Search by country to find stocks matching the criteria | | True |
|
|
| sector | str | Search by sector to find stocks matching the criteria | | True |
|
|
| industry | str | Search by industry to find stocks matching the criteria | | True |
|
|
| exchange_country | str | Search by exchange country to find stock matching | | True |
|
|
| limit | int | The limit of companies shown. | 0 | True |
|
|
|
|
---
|
|
|
|
## Returns
|
|
|
|
| Type | Description |
|
|
|--------------|----------------|
|
|
| pd.DataFrame | Search results |
|
|
|
|
|
|
---
|
|
|
|
## Examples
|
|
|
|
```python
|
|
from openbb_terminal.sdk import openbb
|
|
openbb.stocks.search(country="united states", exchange_country="Germany")
|
|
```
|
|
|
|
---
|