Guide
Knowledge Graph

Retrieve properties for an entity

This example shows how to retrieve the list of properties of an entity.

GET /kg/entities/<entity_id>/properties

Query parameters

  • entity_id: The unique identifier of the entity.
  • source: The type of the knowledge graph you want to request.
    • Accepted values: general_kg, corporate_kg.
    • Defaults: corporate_kg
example_request.py
import json
import requests
 
# Functions found in the section 'Quick start' under 'Getting started'
from connect_v2 import read_config, get_token
 
config = read_config()
host = config['api']['host']
 
entity_id = 'apple'
source = 'corporate_kg'
token = get_token(config)
 
endpoint = f'{host}/api/2.0/kg/entities/{entity_id}/properties?source={source}'
 
headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {token}'
}
 
response = requests.get(endpoint, headers=headers)
print(response.json())

Result

result.json
[
  {
    "en": "ticker"
  },
  {
    "en": "chief_executive_officer"
  },
  {
    "en": "domain"
  },
  {
    "en": "subsidiaries"
  },
  {
    "en": "founders"
  },
  {
    "en": "legal_name"
  }
]