We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).
By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
Learn more on our terms of service and privacy policy.
AskNews stories provide quick access to the hottest topics in the news-sphere, filterable by coverage, region, category, and sentiment. Further, AskNews stories provide high-level overview of the news landscape with custom written content based on human-in-the-loop editorial. Common uses for AskNews stories include:
The Story object is the object that is returned from the stories endpoint. It is an aggregation of information concerning a single news narrative (e.g. the evolution of ). This object contains a variety of aggregated information, including (but not limited to) the following fields:
A full representation of the story object can be found in the API reference.
Given the story.uuid, you can always return and obtain the latest updates to the story. This is useful for tracking the evolution of a story through time. The aggregated information (such as sentiment, reddit_sentiment, updates etc.) will be updated in real-time as new information is added to the story:
The story object always contains a list of updates. Each update object contains a variety of information concerning a single update to the story. This includes (but is not limited to) the following fields:
A full representation of the update object can be found in the response object of the story endpoint - API reference.
AskNews filters include (but are not limited to):
obj_type="story" will find stories according to the most recent update. If you want to search through all updates, use obj_type="story_update(optional)story.updates[].story field. Can be 'brackets', 'urls', or 'none'. Use 'urls' if you want to get the citations injected in markdown format (e.g. (AOL)[https://aol.com]), use 'brackets' to get citations injected as integers in square brackets (e.g. [1]) which correspond to the index in update.prompt_articles list. Use 'none' if you do not want any citations (optional).A full view of the available parameters is available in the API reference.
If you would like to obtain the hottest tech stories in North America, you can use the filters as follows:
Which will print out the headline of the top technology stories in North America from the past 24 hours. If you would like to control the time period of your search, you can also define the start_timestamp and end_timestamp parameters.
You can use natural language or keyword queries to search through stories and story updates. For example, if you would like to search for stories that contain the keyword "TSLA" and have been updated in the last 24 hours, you can use the following query:
Or if you would like to use a semantic search on "Tesla stock is skyrocketing!", and you'd like to search on updates as well, you can use the following query:
If you have a story.uuid, update.uuid or update.url_safe_title, you can pass this value to the get_story function to retrieve the document with a much higher limits for max_updates and max_articles. In the case of passing a story.uuid, it will return the story object with the latest update in story.updates. If you pass a specific update.uuid or update.url_safe_title, it will return the specific update object in story.updates:
If you would like to obtain more than just the latest update, you can pass the max_updates parameter to the get_story function:
You can also control the max_articles parameter as well as the number of reddit threads with the reddit parameters.
A full view of the available parameters is available in the API reference.