question

Upvotes
Accepted
1 0 1 2

Permid API vs manual search

Hello, I am trying to retrieve the list of companies that match a specific emtity name (e.g. BNP Paribas Securities (JP)). When I use the permid API, I get 5 matches. However , when I use the manual search, I get 67 matches. Is there a limit set on the API? How can I get the same matches on the API? Here is my code:

for search in searches:
    url = 'https://api.thomsonreuters.com/permid/search?q='
    access_token = 'xxxx'
    headers = {'X-AG-Access-Token' : access_token}
    response = requests.get(url + search, headers=headers)
    if response.status_code == 200:
        json_data = response.json()
    res = json_data['result']['organizations']['entities']
    org = []
    for rs in res: 
        org = org + [rs['organizationName']]
    newdf = pd.DataFrame([[search,";".join(org)]], columns = ['seach','organisationName'])
    tabres = tabres.append(newdf, ignore_index=True)
pythonintelligent-tagging-apipermid-apiopen-permid-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvote
Accepted
45.2k 103 43 60

@sigrid.rouam

The default number of results returned for each entity is 5. You can change it to 5, 10, 20, 50, or 100 with num parameter. For example:

https://api.thomsonreuters.com/permid/search?access-token=xxx&q=name%3ABNP%20Paribas%20Securities%20(JP)&num=100

For other options, please refer to this document.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you!