Skip to main content

AskNews Python SDK

Static Badge

Python SDK for the AskNews API.

Python support

Supported Python versions: 3.10–3.14.

Next release: Python support changes

Python 3.8 and 3.9 are no longer supported; upgrade to Python 3.10 or newer before upgrading the SDK. Python 3.13 and 3.14 are now included in the test matrix. This is a breaking change for users on older Python versions; a minor version bump is recommended for the next release.

Installation

pip install asknews

Usage

  • Use ask.news.search_news() for a fast, surgical, single-search lookup when you already know the keywords or entities and do not need iterative discovery.
  • Use DeepNews (ask.chat.get_deep_news() in this SDK) to attach your agent to deep, iterative research across news and other sources: finding and following leads, identifying unknown entities, and connecting evidence across sources.
from asknews_sdk import AskNewsSDK

ask = AskNewsSDK(
    api_key="<YOUR API KEY>",
    scopes=["news", "chat", "stories", "analytics"]
)

query = "NVIDIA earnings"

# Fast lookup: prompt-optimized news context for your LLM.
news_context = ask.news.search_news(query).as_string

# Iterative discovery across news and other sources.
research = ask.chat.get_deep_news(
    messages=[{"role": "user", "content": "Find and follow leads on AI chip supply risks."}],
    sources=["asknews", "google", "wiki"],
    engine="v1.5",
)
print(research.choices[0].message.content)

The API doesn't stop there, explore a wide range of endpoints:

  • /stories, high level event tracking and state of the art article clustering
  • /forecasts, industry leading forecasting on any real-time event
  • /analytics, time-series data on finance and politics
  • /deepnews, a deep research agent that can explore the new knowledge graph, X, Reddit, Google, Wikipedia and more to build forecasts, reports, analytics, and anything else your system may need.
  • /graph, build any news knowledge graph imaginable from the largest news graph on the planet
  • /websearch, search the web and get back an LLM distillation of all the relevant web pages

Find full details at the AskNews API documentation.

Support

Join our Discord to see what other people are building, and to get support with your projects.

Metadata

Release files for asknews 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for asknews 0.15.0
File Interpreter ABI Platform Actions
asknews-0.15.0-py3-none-any.whl Python 3 none any Details for asknews-0.15.0-py3-none-any.whl

Release files / asknews-0.15.0-py3-none-any.whl

Download URL asknews-0.15.0-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b79ccaec8e5c7b81b948cbf6b5e29b6761aadc581b91413bcaa6820b9c94cf35
BLAKE2b-256 checksum
How to use checksums
1391e26d21b35a9db7acbfa38b45c235c3f6ef6789bf4ae2d08094c44c645b36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for asknews 0.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for asknews-0.15.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.15.0 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page