Skip to main content

Python SDK for AskNews

Project description

AskNews Python SDK

Static Badge

Python SDK for the AskNews API.

Installation

pip install asknews

Usage

from asknews_sdk import AskNewsSDK

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

query = "Effect of fed policy on tech sector"

# prompt-optimized string ready to go for any LLM:
news_context = ask.news.search_news(query).as_string

And you will have a prompt-optimized string ready to go for any LLM. 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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asknews-0.13.40-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file asknews-0.13.40-py3-none-any.whl.

File metadata

  • Download URL: asknews-0.13.40-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for asknews-0.13.40-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ac7270c131ce18abaeea987af9a8bc008e036fc92705eb6adf6e8339e84b6b
MD5 a3e80559d7464b01e846d4b7869d3730
BLAKE2b-256 4b5a91fc162b651f4a9115a54e38d09232eca6f6a23e60a80748093123f0683d

See more details on using hashes here.

Provenance

The following attestation bundles were made for asknews-0.13.40-py3-none-any.whl:

Publisher: release.yml on emergentmethods/asknews-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page