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.1

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.1
File Size Uploaded Provenance Actions
prism_news-0.1.1.tar.gz 16.9 kB Without provenance Details for prism_news-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 32.3 kB

Release files / prism_news-0.1.1.tar.gz

Download URL prism_news-0.1.1.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9d9d8e536685a4db6b58278542e0d4ed792fb0c182fb09e4f350686d0926ad40
BLAKE2b-256 checksum
How to use checksums
d1d8422d226379c5a5ca9d7f87d8f977fa3a24e2f14022df535aaafbe58a57a5
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.1-py3-none-any.whl

Download URL prism_news-0.1.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d66629f0402c12414bdb5fcfab3b28b41f07ad5c56077091171d151ea0e666ac
BLAKE2b-256 checksum
How to use checksums
433c17e1b209408a039edfc944432b93e3a62d2f76b0997d6abe001afe3cf143
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.1

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.1 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