Skip to main content

prism-news

PyPI License: MIT

Python client, command-line tool and 60 open news-topic datasets for the Prism News API by Fliar: 450M+ historical and real-time news articles with sentiment, priority, themes, geography and content classes.

Standard library only. Python 3.8+. pandas is optional.

pip install prism-news
# with DataFrame support
pip install "prism-news[pandas]"

Open datasets (no API key)

Each topic dataset covers January 2019 to July 2026 and is published at https://huggingface.co/datasets/fliarbi/<slug>-news-2019-2026 (data licence CC BY-NC 4.0). Topics include floods, hurricanes, covid, mental health, climate change, inflation, cybercrime, electric vehicles, air pollution, data centers and 50 more.

from prism_news import datasets

datasets.list_topics()[:2]
# [{'slug': 'snowfall', 'topic': 'snowfall', 'cluster': 'weather',
#   'repo': 'fliarbi/snowfall-news-2019-2026', 'url': 'https://huggingface.co/datasets/...'}, ...]

datasets.list_topics(cluster="health")      # filter by cluster
datasets.list_topics(online=True)           # only the repos live right now

t = datasets.load("floods")                 # {"sample": ..., "monthly": ..., "countries": ...}
t["monthly"].head()                         # DataFrame when pandas is installed
#      month  articles  all_news_articles  per_10k_news ...

rows = datasets.load_table("floods", "themes", as_frame=False)   # list of dicts
path = datasets.download("floods", "countries")                    # local CSV path

Tables: sample (headline sample), monthly, countries, cities, continents, country_tone, country_trend, organisations, themes, tone_by_year, states_india, states_us, research_by_year, top_papers, patents_by_year, patent_offices, patent_cpc. Files are cached in ~/.cache/prism-news (set PRISM_NEWS_CACHE to move it).

API client

Create a key in the Fliar dashboard (free tier included; one key works on the Radar API and both News APIs) and export it:

export PRISM_API_KEY=rdr_...
from prism_news import Client, PrismAPIError

client = Client()                     # base URL https://radar-api.fliarbi.com/news

client.status()                       # free: index coverage
hl = client.headlines("electric vehicle", since="2026-01-01", until="2026-04-30", limit=20)
for item in hl["data"]["items"]:
    print(item["published_at"], item["headline"])

client.trends("tariffs", granularity="monthly")
client.sentiment("heatwave", since="2026-04-01")
client.themes("data centers", limit=5)
client.compare(["electric vehicle", "battery storage"], since="2026-01-01", until="2026-04-30")

# Business News API (same key)
client.business("funding", sector="fintech", sort="amount", limit=10)
client.company_news("tesla.com", since="2026-01-01")

try:
    client.me()
except PrismAPIError as e:
    print(e.status, e.kind)

Every method returns the JSON envelope {"ok": ..., "data": ..., "meta": ...}. Keyword arguments become request fields; None values are dropped. client.request(method, path, body) calls any endpoint directly.

Command line

prism-news login                                  # saves base URL and key, owner-only file
prism-news status
prism-news headlines "electric vehicle" --since 2026-01-01 --limit 20 --table
prism-news trends "tariffs" --granularity monthly --table
prism-news export "floods" --since 2026-01-01 -o floods.csv
prism-business-news funding --sector fintech --sort amount --limit 10 --table

prism-news datasets list                          # open topic datasets, no key
prism-news datasets download floods monthly countries

Any --name value becomes a request field (--priority-min 7 sends priority_min=7); repeat an option for a list. Environment overrides: PRISM_API_KEY, PRISM_API_BASE, PRISM_BUSINESS_API_BASE.

Licence

Code: MIT. Datasets: CC BY-NC 4.0.

Metadata

Release files for prism-news 0.1.0

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

Source distribution (sdist)

Source distribution for prism-news 0.1.0
File Size Uploaded Provenance Actions
prism_news-0.1.0.tar.gz 16.8 kB Without provenance Details for prism_news-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prism-news 0.1.0
File Interpreter ABI Platform Actions
prism_news-0.1.0-py3-none-any.whl Python 3 none any Details for prism_news-0.1.0-py3-none-any.whl

Total release size: 32.2 kB

Release files / prism_news-0.1.0.tar.gz

Download URL prism_news-0.1.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9f1907ba47070b410cd2e2701e7e761b33cabc3c55d6398dc705a3812cbfd8f0
BLAKE2b-256 checksum
How to use checksums
84d41fbfeca74003fc8509be3a556f19d20125606d653be9469994f1c2d7bce6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / prism_news-0.1.0-py3-none-any.whl

Download URL prism_news-0.1.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16fd14dfe4157f35e8daa967732582004b9ed57990f9eeb21087bf7728d27402
BLAKE2b-256 checksum
How to use checksums
bbbe9b7a1d8a8c8b7d5d693f3b22023c60584e9053d33685171188a13bbf0f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for prism-news 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.1.0 This release

2 release files No 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