Search for events
Searches for structured event data extracted from news articles. Supports filtering by event type, date ranges, and event-specific fields.
curl --request POST \
--url https://events.newscatcherapi.xyz/api/events_search \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '{
"event_type": "layoff",
"attach_articles_data": false,
"additional_filters": {
"company_name": "<string>",
"event_date": {
"gte": "<string>",
"lte": "<string>"
},
"extraction_date": {
"gte": "<string>",
"lte": "<string>"
},
"layoff.how_much_related": "Completely Irrelevant",
"layoff.is_relevant_for_real_estate": "true",
"layoff.layoff_reason": "<string>",
"layoff.location": {
"country": "<string>",
"city": "<string>",
"raw_location": "<string>",
"county": "<string>",
"state": "<string>"
},
"layoff.max_number_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.min_number_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.number_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.percentage_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.summary": "<string>"
},
"additional_article_fields": [
"description",
"published_date",
"nlp.summary"
]
}'
{
"message": "Success",
"count": 25,
"events": [
{
"id": "n1jk-pQBvyT_ytpRpzBn",
"event_type": "layoff",
"global_event_type": "Layoff",
"associated_article_ids": [
"<string>"
],
"extraction_date": "2023-11-07T05:31:56Z",
"event_date": "2023-11-07T05:31:56Z",
"articles": [
{
"id": "<string>",
"title": "<string>",
"link": "<string>",
"media": "<string>"
}
],
"company_name": "<string>",
"layoff": {
"summary": "<string>",
"layoff_reason": "<string>",
"max_number_of_people_laid_off": 123,
"min_number_of_people_laid_off": 123,
"number_of_people_laid_off": 123,
"percentage_of_people_laid_off": 123,
"how_much_related": "Completely Irrelevant",
"is_relevant_for_real_estate": true,
"location": [
{
"country": "<string>",
"city": "<string>",
"raw_location": "<string>",
"county": "<string>",
"state": "<string>"
}
]
}
}
]
}
Authorizations
Body
The type of events to retrieve from the database.
layoff
, data_breach
, fundraising
If true, includes source article data in the response. If false, returns only event data.
The event-specific filtering parameters. Required structure depends on the event_type value.
The name of the company that conducted or is conducting the layoffs.
The date when the layoff occurred. Accepts both absolute dates (YYYY-MM-DD) and relative dates (e.g., "now", "now-30d"). Default: Last 30 days.
The date when the event was extracted from news sources. Accepts both absolute dates (YYYY-MM-DD) and relative dates.
The relevance rating of the layoff event to real estate market trends.
Completely Irrelevant
, Irrelevant
, Very Poor
, Poor
, Fair
, Good
, Very Good
, Excellent
True if the layoff impacts real estate market; false otherwise.
true
, false
The stated reason provided for the layoff.
Filter criteria for the location of the layoff. All fields support both exact and partial matching.
The country where the event occurred.
The city where the event occurred.
The unparsed location string from the source.
The county where the event occurred.
The state where the event occurred.
The detailed description of the layoff event.
Additional article fields to include in the response. Only applicable when attach_articles_data
is true
.
description
, content
, published_date
, published_date_precision
, author
, authors
, journalists
, domain_url
, full_domain_url
, name_source
, extraction_data.parent_url
, is_headline
, paid_content
, rights
, rank
, is_opinion
, language
, word_count
, twitter_account
, all_links
, all_domain_links
, nlp.theme
, nlp.summary
, nlp.sentiment
, nlp.ner_PER
, nlp.ner_ORG
, nlp.ner_MISC
, nlp.ner_LOC
Response
The status message of the search operation.
The total number of events returned.
The list of matched events.
The unique identifier of the event.
The specific type of the event.
layoff
, data_breach
, fundraising
The high-level category of the event.
Layoff
, DataMonitoring
, Finance
The identifiers of news articles associated with this event.
The timestamp when the event was extracted from news sources.
The timestamp when the event occurred.
Name of the company that conducted the layoff.
Array of source articles. Only present when attach_articles_data
is true
in the request. Access individual articles using array index, e.g.:
- First article:
events.articles[0]
- Second article:
events.articles[1]
By default, only returns id, title, link, and media fields. To request more fields, add them to the additional_article_fields
array in the search request.
The detailed description of the layoff event.
The relevance rating of the layoff event.
Completely Irrelevant
, Irrelevant
, Very Poor
, Poor
, Fair
, Good
, Very Good
, Excellent
The locations where the layoff occurred.
The country where the event occurred.
The city where the event occurred.
The unparsed location string from the source.
The county where the event occurred.
The state where the event occurred.
Stated reason for the layoff.
The maximum number of employees affected if a range was specified.
The minimum number of employees affected if a range was specified.
The exact number of employees affected.
The percentage of total workforce affected.
True if the layoff impacts real estate market; false otherwise.
Was this page helpful?
curl --request POST \
--url https://events.newscatcherapi.xyz/api/events_search \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '{
"event_type": "layoff",
"attach_articles_data": false,
"additional_filters": {
"company_name": "<string>",
"event_date": {
"gte": "<string>",
"lte": "<string>"
},
"extraction_date": {
"gte": "<string>",
"lte": "<string>"
},
"layoff.how_much_related": "Completely Irrelevant",
"layoff.is_relevant_for_real_estate": "true",
"layoff.layoff_reason": "<string>",
"layoff.location": {
"country": "<string>",
"city": "<string>",
"raw_location": "<string>",
"county": "<string>",
"state": "<string>"
},
"layoff.max_number_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.min_number_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.number_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.percentage_of_people_laid_off": {
"gte": 123,
"lte": 123
},
"layoff.summary": "<string>"
},
"additional_article_fields": [
"description",
"published_date",
"nlp.summary"
]
}'
{
"message": "Success",
"count": 25,
"events": [
{
"id": "n1jk-pQBvyT_ytpRpzBn",
"event_type": "layoff",
"global_event_type": "Layoff",
"associated_article_ids": [
"<string>"
],
"extraction_date": "2023-11-07T05:31:56Z",
"event_date": "2023-11-07T05:31:56Z",
"articles": [
{
"id": "<string>",
"title": "<string>",
"link": "<string>",
"media": "<string>"
}
],
"company_name": "<string>",
"layoff": {
"summary": "<string>",
"layoff_reason": "<string>",
"max_number_of_people_laid_off": 123,
"min_number_of_people_laid_off": 123,
"number_of_people_laid_off": 123,
"percentage_of_people_laid_off": 123,
"how_much_related": "Completely Irrelevant",
"is_relevant_for_real_estate": true,
"location": [
{
"country": "<string>",
"city": "<string>",
"raw_location": "<string>",
"county": "<string>",
"state": "<string>"
}
]
}
}
]
}