Guide
Knowledge Graph

Source entities

This example shows how to source entities. Works only with the Corporate Knowledge Graph.

GET /kg/entities

Query parameters

  • sectors: A filter to apply in order to get only organizations that belong to the given sectors.
    • Accepted values: A valid sector. You can retrieve it using the GET kg/sectors route. This field is case sensitive.
  • sub_sectors: A filter to apply in order to get only organizations that belong to the given sub_sectors.
    • Accepted values: A valid sub_sector. You can retrieve it using the GET kg/sectors route. This field is case sensitive.
  • ipo_status: A filter to apply in order to get only organizations that are public, private or delisted.
    • Accepted values: A list containing at least one of the following values [public, private, delisted].
  • operating_status: A filter to apply in order to get only organizations that have the given operating_status.
    • Accepted values: A list containing at least one of the following values [active, closed].
  • company_type: A filter to apply in order to get only organizations that have the given company_type.
    • Accepted values: A list containing at least one of the following values [for_profit, non_profit].
  • limit: How many organizations should be retrieved.
    • Default: 100
    • Min: 1
    • Max: 100
  • search_after: A string to use for pagination.
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']
 
sectors = {"sectors": ["Financial Services"]}
ipo_status = {"ipo_status": ["public"]}
operating_status = {"operating_status": ["active"]}
company_type = {"company_type": ["for_profit"]}
sub_sectors = {"sub_sectors": ["Insurance"]}
limit = {"limit": 1}
 
token = get_token(config)
 
endpoint = f'{host}/api/2.0/kg/entities'
 
headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {token}'
}
 
response = requests.get(endpoint, headers=headers, params={**sectors, **ipo_status, **limit, **sub_sectors, **operating_status, **company_type})
print(response.json()["entities"])

Result

result.json
[
    {
      "aliases": [],
      "company_name": "AIA Group",
      "company_type": "for_profit",
      "country": "Hong Kong",
      "description": "AIA Group Limited and its subsidiaries (collectively “AIA” or “the Group”) comprise the largest independent publicly listed pan-Asian life insurance group. It has operations in 17 markets in Asia-Pacific  wholly-owned branches and subsidiaries in Hong Kong, Thailand, Singapore, Malaysia, China, Korea, the Philippines, Australia, Indonesia, Taiwan, Vietnam, New Zealand, Macau, Brunei, a 97 per cent subsidiary in Sri Lanka, a 26 per cent joint venture in India and a representative office in Myanmar. It had total assets of US$159 billion as of 31 May 2014.",
      "employee_count": "10000+",
      "founded_on": "1919-01-01T00:00:00.000Z",
      "funding_total": 0,
      "ipo_status": "public",
      "last_funding_type": null,
      "legal_name": "",
      "operating_status": "active",
      "revenue_range": "10B+",
      "sectors": [
        "Financial Services"
      ],
      "status": "ipo",
      "sub_sectors": [
        "Health Insurance",
        "Insurance",
        "Wealth Management"
      ],
      "uuid": "ed2ac160-1172-50b2-bef2-38854faff25f"
    }
]