The Search API allows you to quickly locate assets such as stocks, ETFs, mutual funds, bonds, and indices by using a flexible query engine. You can search by ticker code, company name, or ISIN. This API is particularly useful for applications requiring user-friendly asset lookups or autocomplete suggestions.
The engine automatically adjusts search behavior based on the input string and considers asset popularity using metrics like market capitalization and trading volume. Filtering by asset type or exchange is supported.
API Endpoint
To search for financial instruments, use the following endpoint:
https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$data = curl_exec($curl);
curl_close($curl);
try {
$data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
var_dump($data);
} catch (Exception $e) {
echo 'Error. '.$e->getMessage();
}
import requests
url = f'https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()
print(data)
library(httr)
library(jsonlite)
url <- 'https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json'
response <- GET(url)
if (http_type(response) == "application/json") {
content <- content(response, "text", encoding = "UTF-8")
cat(content)
} else {
cat("Error while receiving data\n")
}
Try it now (it's free)!
How to use it (YouTube)
Parameters
Parameter | Required | Description |
---|---|---|
query_string | Yes | The search input. Can be a ticker symbol, company name, or ISIN. Example values: AAPL, Apple Inc, US0378331005. |
limit | No | Limits the number of results. Default is 15. Maximum value is 500. |
bonds_only | No | Set to 1 to include only bonds in the results. Default is 0 (bonds excluded). |
exchange | No | Filter results by exchange code (e.g., US, PA, FOREX, NYSE, NASDAQ). List of Exchanges API. |
type | No | Filter results by asset type. Possible values: all, stock, etf, fund, bond, index, crypto. Note: when using “all”, bonds are excluded by default. Use “type=bond” to include bonds. |
api_token | Yes | Your personal API key, provided after registration. |
Note: The demo API key does not work for the Search API. Please register to get your free API token.
Response Fields
The response is returned in JSON format as a list of matching instruments.
Field | Description |
---|---|
Code | Ticker symbol of the asset |
Exchange | Exchange code where the asset is listed |
Name | Full name of the instrument |
Type | Type of asset (e.g., Common Stock, ETF, Fund, Bond) |
Country | Country of the exchange |
Currency | Currency in which the asset is traded |
ISIN | ISIN code, if available |
previousClose | Previous closing price |
previousCloseDate | Date of the previous close price |
isPrimary | True if this is the primary exchange for the asset, otherwise false |
Examples
Search by ticker code:
https://eodhd.com/api/search/AAPL?api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/search/AAPL?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://eodhd.com/api/search/AAPL?api_token={YOUR_API_TOKEN}&fmt=json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$data = curl_exec($curl);
curl_close($curl);
try {
$data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
var_dump($data);
} catch (Exception $e) {
echo 'Error. '.$e->getMessage();
}
import requests
url = f'https://eodhd.com/api/search/AAPL?api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()
print(data)
library(httr)
library(jsonlite)
url <- 'https://eodhd.com/api/search/AAPL?api_token={YOUR_API_TOKEN}&fmt=json'
response <- GET(url)
if (http_type(response) == "application/json") {
content <- content(response, "text", encoding = "UTF-8")
cat(content)
} else {
cat("Error while receiving data\n")
}
Try it now (it's free)!
How to use it (YouTube)
Search by company name:
https://eodhd.com/api/search/Apple Inc?api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/search/Apple Inc?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://eodhd.com/api/search/Apple Inc?api_token={YOUR_API_TOKEN}&fmt=json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$data = curl_exec($curl);
curl_close($curl);
try {
$data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
var_dump($data);
} catch (Exception $e) {
echo 'Error. '.$e->getMessage();
}
import requests
url = f'https://eodhd.com/api/search/Apple Inc?api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()
print(data)
library(httr)
library(jsonlite)
url <- 'https://eodhd.com/api/search/Apple Inc?api_token={YOUR_API_TOKEN}&fmt=json'
response <- GET(url)
if (http_type(response) == "application/json") {
content <- content(response, "text", encoding = "UTF-8")
cat(content)
} else {
cat("Error while receiving data\n")
}
Try it now (it's free)!
How to use it (YouTube)
Search with a limit of 1 result:
https://eodhd.com/api/search/Apple Inc?limit=1&api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/search/Apple Inc?limit=1&api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://eodhd.com/api/search/Apple Inc?limit=1&api_token={YOUR_API_TOKEN}&fmt=json', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', )); $data = curl_exec($curl); curl_close($curl); try { $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR); var_dump($data); } catch (Exception $e) { echo 'Error. '.$e->getMessage(); }
import requests url = f'https://eodhd.com/api/search/Apple Inc?limit=1&api_token={YOUR_API_TOKEN}&fmt=json' data = requests.get(url).json() print(data)
library(httr) library(jsonlite) url <- 'https://eodhd.com/api/search/Apple Inc?limit=1&api_token={YOUR_API_TOKEN}&fmt=json' response <- GET(url) if (http_type(response) == "application/json") { content <- content(response, "text", encoding = "UTF-8") cat(content) } else { cat("Error while receiving data\n") }
Try it now (it's free)!
How to use it (YouTube)
Sample Response
{
"Code": "AAPL",
"Exchange": "US",
"Name": "Apple Inc",
"Type": "Common Stock",
"Country": "USA",
"Currency": "USD",
"ISIN": "US0378331005",
"previousClose": 229.65,
"previousCloseDate": "2025-08-12",
"isPrimary": true
},
{
"Code": "AAPL",
"Exchange": "TO",
"Name": "Apple CDR (CAD Hedged)",
"Type": "Common Stock",
"Country": "Canada",
"Currency": "CAD",
"ISIN": null,
"previousClose": 33.14,
"previousCloseDate": "2025-08-12",
"isPrimary": false
}