Search
Entity Search
Searches for entities in the ontology. If a correct ISIN is supplied, it will retrieve the matching company. Keyword arguments: - q: the search query, accepts typos and punctuation - size: number of results returned, between 0 and 100, if not specified it defaults to 10
Examples
- Curl
- Python
Note: If you are using Windows, adjust the syntax:
- Replace line breaks (
\) with caret (^).- Use double quotes (
") instead of single quotes (').
curl -X 'GET' \
'https://metadata.api.yukkalab.com/search/entity_search?q=Apple&size=2' \
-H 'accept: application/json' \
-H "Authorization: Bearer $YUKKA_TOKEN"
import requests
headers = {
'accept': 'application/json',
'Authorization': f'Bearer {token}',
}
params = {
'q': 'Apple',
'size': '2',
}
response = requests.get('https://metadata.api.yukkalab.com/search/entity_search', params=params, headers=headers)
Return type
Dict[str, YlMetadataApiModelsRelatedModelEntity]
Example Response
{"hits":[{"entity":{"type":"company","alpha_id":"apple","compound_key":"company:apple","name":"Apple Inc","names":["US0378331005"],"isin":["US0378331005"],"country":{"type":"country","alpha_id":"us","compound_key":null,"name":"United States of America"},"parents":[]}},{"entity":{"type":"company","alpha_id":"apple_hospitality_reit_inc","compound_key":"company:apple_hospitality_reit_inc","name":"Apple Hospitality REIT Inc","names":["US03784Y2000"],"isin":["US03784Y2000"],"country":{"type":"country","alpha_id":"us","compound_key":null,"name":"United States of America"},"parents":[]}}],"term":"apple"}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| q | str | the search string | |
| size | int | how many results to return | [optional][default to 10] |
Return type
object
Authorization
JSON Web Token. Issued by Yukka.
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |