Trend Endpoint: search for entity types

Have you already searched the Community for similar issues? The answer may already be waiting for you.
To help you get an answer as quickly as possible, fill out the following template (please do not delete, or miss out any fields - this will delay the resolution time):
Description: Using trends-endpoint to search for entities of type "Company"
Support type: expected behavior
Version:
Components: Quantexa News Intelligence, News API
Debugging: e.g. copies of logs, Developer Tools errors, links to Documentation and Community posts consulted
Code (please insert into the code block below):
params = { 'published_at': '[NOW-14DAYS TO NOW]', 'language': '(de)', 'categories': '{{taxonomy:aylien AND id:(ay.lifesoc.esg) AND score:>=0.65}}', 'entities': '{{types:("Company")}}', # this does not work 'field': 'entities.surface_forms.text',}
response = requests.get('https://api.aylien.com/v6/news/trends', params=params, headers=headers) print(response)
print(response.content) # b'{"errors":[{"id":"trends_params_entities","links":{"about":"https://docs.aylien.com/newsapi/#error-codes-amp-responses","docs":"https://docs.aylien.com/newsapi"},"type":"http://httpstatus.es/422","title":"Unsupported parameter in AQL query.","status":422,"code":"KB422","detail":"Unsupported field: entities.types"}]}'
Is something like 'entities': '{{types:("Company")}}'
possible?
Best Answer
-
Hey @Julian_Kartte
Welcome to the Quantexa Community! :)
it's possible, but please change your syntax to the following:
params = { 'published_at': '[NOW-14DAYS TO NOW]', 'language': '(de)', 'categories': '{{taxonomy:aylien AND id:(ay.lifesoc.esg) AND score:>=0.65}}', 'entities': '{{type:("Company")}}' }
2
Comments
-
Also, your question was posted in Quantexa Platform Support, but it actually belongs in Quantexa News Intelligence.
I’ll go ahead and move it to the right category! :)
0
Topics
- Topics
- Support
- Support
- 12 Quantexa Community Library
- 1.4K Academy
- Insights & Innovation
- Insights & Innovation
- 3 NEW: Product Demos
- Launch the Customer Intelligence Demo
- Launch the Trade AML Demo
- 11 User Research Panel
- Latest from Quantexa
- Connect
- 95 Getting Started
- 326 Quantexa News & Announcements
- 14 Release Announcements
- 29 Community Digest
- 32 Quantexa News Intelligence
- Get Involved
- 41 Get Rewarded
- 11 Quantexa Career Development