drawing

PermID - Demo

What is PermId:¶

It is Permanent Identifier that is applicable across various entities across several data products.

Link : https://permid.org/

API Documentation¶

https://developers.refinitiv.com/en/api-catalog/open-perm-id/permid-entity-search/tutorials

Register for API key¶

In [39]:
with open("my-permid-api-key.txt",'r') as f:
    permid_api_key = f.readlines()[0]

Get the relevant attributes for a given PermID¶

Results in turtle format¶

In [40]:
import requests
import json
input_permid = "https://permid.org/1-4295908005"
#permid_api_key = "XXXXXXXXXXX"
url = input_permid + "/?format=turtle&access-token="+ permid_api_key
results = requests.get(url)
print(results.text)
@prefix mdaas: <http://permid.org/ontology/mdaas/> .
@prefix tr-fin: <http://permid.org/ontology/financial/> .
@prefix tr-common: <http://permid.org/ontology/common/> .
@prefix fibo-be-le-cb: <http://www.omg.org/spec/EDMC-FIBO/BE/LegalEntities/CorporateBodies/> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix tr-org: <http://permid.org/ontology/organization/> .

<https://permid.org/1-4295908005>
        a                               tr-org:Organization ;
        tr-common:hasPermId             "4295908005"^^xsd:string ;
        tr-fin:hasOrganizationPrimaryQuote
                <https://permid.org/1-55835345281> ;
        tr-fin:hasPrimaryInstrument     <https://permid.org/1-8590938069> ;
        mdaas:HeadquartersAddress       "P O Box 34067\n\n\nSEATTLE\nWASHINGTON\n98124-1067\nUnited States\n"^^xsd:string ;
        mdaas:RegisteredAddress         "300 Deschutes Way Sw Ste 208 Mc-Csc1\n\n\nTUMWATER\nWASHINGTON\n98501\nUnited States\n"^^xsd:string ;
        tr-org:hasActivityStatus        tr-org:statusActive ;
        tr-org:hasHeadquartersPhoneNumber
                "12064471575"^^xsd:string ;
        tr-org:hasHoldingClassification
                tr-org:publiclyHeld ;
        tr-org:hasIPODate               "1992-06-26T04:00:00Z"^^xsd:dateTime ;
        tr-org:hasLEI                   "OQSJ1DU9TAOC51A47K68"^^xsd:string ;
        tr-org:hasLatestOrganizationFoundedDate
                "1985-11-04T00:00:00Z"^^xsd:dateTime ;
        tr-org:hasPrimaryBusinessSector
                <https://permid.org/1-4294952915> ;
        tr-org:hasPrimaryEconomicSector
                <https://permid.org/1-4294952746> ;
        tr-org:hasPrimaryIndustryGroup  <https://permid.org/1-4294952914> ;
        tr-org:isIncorporatedIn         <http://sws.geonames.org/6252001/> ;
        fibo-be-le-cb:isDomiciledIn     <http://sws.geonames.org/6252001/> ;
        vcard:hasURL                    <https://www.starbucks.com/> ;
        vcard:organization-name         "Starbucks Corp"^^xsd:string .

Results in json-ld format¶

In [41]:
url = input_permid + "/?format=json-ld&access-token="+ permid_api_key
results = requests.get(url)
info = results.json()
print(json.dumps(info, indent=4, sort_keys=False))
{
    "@id": "https://permid.org/1-4295908005",
    "@type": "tr-org:Organization",
    "tr-common:hasPermId": "4295908005",
    "hasOrganizationPrimaryQuote": "https://permid.org/1-55835345281",
    "hasPrimaryInstrument": "https://permid.org/1-8590938069",
    "mdaas:HeadquartersAddress": "P O Box 34067\n\n\nSEATTLE\nWASHINGTON\n98124-1067\nUnited States\n",
    "mdaas:RegisteredAddress": "300 Deschutes Way Sw Ste 208 Mc-Csc1\n\n\nTUMWATER\nWASHINGTON\n98501\nUnited States\n",
    "hasActivityStatus": "tr-org:statusActive",
    "tr-org:hasHeadquartersPhoneNumber": "12064471575",
    "hasHoldingClassification": "tr-org:publiclyHeld",
    "hasIPODate": "1992-06-26T04:00:00Z",
    "tr-org:hasLEI": "OQSJ1DU9TAOC51A47K68",
    "hasLatestOrganizationFoundedDate": "1985-11-04T00:00:00Z",
    "hasPrimaryBusinessSector": "https://permid.org/1-4294952915",
    "hasPrimaryEconomicSector": "https://permid.org/1-4294952746",
    "hasPrimaryIndustryGroup": "https://permid.org/1-4294952914",
    "isIncorporatedIn": "http://sws.geonames.org/6252001/",
    "isDomiciledIn": "http://sws.geonames.org/6252001/",
    "hasURL": "https://www.starbucks.com/",
    "vcard:organization-name": "Starbucks Corp",
    "@context": {
        "hasURL": {
            "@id": "http://www.w3.org/2006/vcard/ns#hasURL",
            "@type": "@id"
        },
        "isIncorporatedIn": {
            "@id": "http://permid.org/ontology/organization/isIncorporatedIn",
            "@type": "@id"
        },
        "hasPrimaryEconomicSector": {
            "@id": "http://permid.org/ontology/organization/hasPrimaryEconomicSector",
            "@type": "@id"
        },
        "hasActivityStatus": {
            "@id": "http://permid.org/ontology/organization/hasActivityStatus",
            "@type": "@id"
        },
        "RegisteredAddress": {
            "@id": "http://permid.org/ontology/mdaas/RegisteredAddress",
            "@type": "http://www.w3.org/2001/XMLSchema#string"
        },
        "hasOrganizationPrimaryQuote": {
            "@id": "http://permid.org/ontology/financial/hasOrganizationPrimaryQuote",
            "@type": "@id"
        },
        "hasPrimaryIndustryGroup": {
            "@id": "http://permid.org/ontology/organization/hasPrimaryIndustryGroup",
            "@type": "@id"
        },
        "hasHoldingClassification": {
            "@id": "http://permid.org/ontology/organization/hasHoldingClassification",
            "@type": "@id"
        },
        "hasPrimaryBusinessSector": {
            "@id": "http://permid.org/ontology/organization/hasPrimaryBusinessSector",
            "@type": "@id"
        },
        "hasLatestOrganizationFoundedDate": {
            "@id": "http://permid.org/ontology/organization/hasLatestOrganizationFoundedDate",
            "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
        },
        "hasPermId": {
            "@id": "http://permid.org/ontology/common/hasPermId",
            "@type": "http://www.w3.org/2001/XMLSchema#string"
        },
        "hasPrimaryInstrument": {
            "@id": "http://permid.org/ontology/financial/hasPrimaryInstrument",
            "@type": "@id"
        },
        "hasHeadquartersPhoneNumber": {
            "@id": "http://permid.org/ontology/organization/hasHeadquartersPhoneNumber",
            "@type": "http://www.w3.org/2001/XMLSchema#string"
        },
        "isDomiciledIn": {
            "@id": "http://www.omg.org/spec/EDMC-FIBO/BE/LegalEntities/CorporateBodies/isDomiciledIn",
            "@type": "@id"
        },
        "organization-name": {
            "@id": "http://www.w3.org/2006/vcard/ns#organization-name",
            "@type": "http://www.w3.org/2001/XMLSchema#string"
        },
        "HeadquartersAddress": {
            "@id": "http://permid.org/ontology/mdaas/HeadquartersAddress",
            "@type": "http://www.w3.org/2001/XMLSchema#string"
        },
        "hasIPODate": {
            "@id": "http://permid.org/ontology/organization/hasIPODate",
            "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
        },
        "hasLEI": {
            "@id": "http://permid.org/ontology/organization/hasLEI",
            "@type": "http://www.w3.org/2001/XMLSchema#string"
        },
        "mdaas": "http://permid.org/ontology/mdaas/",
        "tr-fin": "http://permid.org/ontology/financial/",
        "tr-common": "http://permid.org/ontology/common/",
        "fibo-be-le-cb": "http://www.omg.org/spec/EDMC-FIBO/BE/LegalEntities/CorporateBodies/",
        "xsd": "http://www.w3.org/2001/XMLSchema#",
        "vcard": "http://www.w3.org/2006/vcard/ns#",
        "tr-org": "http://permid.org/ontology/organization/"
    }
}