Alerts API Queries
Alerts API follows the same basic principles as other GraphQL APIs. There are two top-level nodes available: alerts and alert. It's possible to specify custom filters and sort order to retrieve a required subset of Alerts. Larger workflows could benefit from using pagination when the number of Alerts returned doesn't fit into a single API response.
You may find all entity types defined in Alerts API Reference.
Examples
Find Alerts by Company ID:
query findAlerts($id: ID!) {
alerts(
where: {
# Will filter for both "company.id"
# and "relatedCompanies.id"
company: {
id: { eq: $id }
}
}
) {
id
title
text
company {
id
displayName
}
relatedCompanies {
id
displayName
}
}
}Alerts have two main fields storing the Company data:
companyRepresents the specific company that is a subject of a given Alert. It's present on the Alerts describing events that happened to that particular Company. For example, headcount change or financial metrics change. If Alert describes an event that is generally related to multiple companies, this field will be
null, to process the list of related companies, please refer to the field below.
relatedCompaniesRepresents all the companies related to the event described by the Alert. Will contain a single item for events that are specific to the given Company or multiple items for more general events affecting multiple Companies at once.
Find Alerts by dataset and class
Dataset examples:
newsfor Alerts about news articles describing a certain change for a particular Companyemployeesfor Alerts describing changes in the employee count for a particular Companynews_commoditiesfor Alerts representing news on certain Commoditiesbalance_sheetnews_eventspnljobs
Class examples:
awards, bankruptcy, commodity, conference, cybersecurity, environmental_impact, epidemic, financial_changes, ...
Find Alerts for a particular date range
Find a single Alert by its id
Last updated
Was this helpful?