Skip to main content

h1news — Python client for the H1 News API

Real-time, ticker-tagged, sentiment-scored financial news from 135+ sources over REST and WebSocket. Get a key at heliusone.com/newsapi; the endpoint reference is at api.heliusone.com/docs.

pip install h1news

REST

from h1news import H1News

news = H1News("sk_...")

# Latest negative headlines on a ticker
for a in news.news("NVDA", sentiment="negative", date="today")["results"]:
    print(a["published_at"], a["source"], a["title"])

# Trading halts, SEC filings, central banks — same filters everywhere
news.halts(date="today")
news.filings("TSLA", form="8-K", date="last7days")
news.macro(source="Federal Reserve")
news.category("regulatory", date="last7days")          # FDA / SEC / FTC / FCA actions

# Multi-ticker (Pro), curated baskets, full-text search with AND / OR
news.news(["AAPL", "MSFT", "GOOGL"], match="any")
news.news(collection="MAG7", category="earnings")
news.news(search="guidance AND raise", date="last30days")

# Analytics
news.sentiment("TSLA", date="last7days")
news.top_mentioned(date="today", limit=10)
news.earnings_calendar(days=14)
news.economic_calendar(days=30, importance=["high", "medium"])   # CPI, jobs, GDP, FOMC … with actual / previous / nowcast
news.ratings("NVDA")
news.sundown_digest(anthropic_key="sk-ant-...")        # cached daily; your key is used once

# Walk history page by page; poll for what's new without the stream
for a in news.iter_news("AAPL", date="last30days", max_items=1000): ...
for a in news.poll("AAPL", interval=30): print("new:", a["title"])

Errors are typed: AuthError (401), PlanLimitError (403 — multi-ticker, deep history, paging cap or the stream on Basic), RateLimitError (429, with retry_after), H1NewsError for the rest. A 429 is retried once automatically.

Live stream (Pro)

import asyncio
from h1news import AsyncH1News

async def main():
    async with AsyncH1News("sk_...") as news:
        async for a in news.stream(tickers=["AAPL", "TSLA"], categories=["earnings", "halts"]):
            print(a["sentiment"]["label"], a["title"])

asyncio.run(main())

stream() reconnects with backoff when the socket drops and replays the gap through /v1/news?since_id= before resuming, so what you iterate is gapless. One connection costs one API call; pushed articles are free.

Browsers: never ship your key to a page. Call news.stream_token() on your server and hand the page the returned token; it connects to ws_url?token=… directly (see the TypeScript SDK).

AI agents

from h1news.langchain_tool import h1news_tools          # pip install "h1news[langchain]"
from h1news.llamaindex_tool import H1NewsToolSpec       # pip install "h1news[llamaindex]"

Eight tools each — search, halts, filings, sentiment, top-mentioned, earnings calendar, economic calendar, ratings — returning compact JSON a model reads in a few hundred tokens. For Claude Desktop, Cursor or any MCP client, see sdk/mcp.

Plans

Basic $19.99/mo Pro $49.99/mo
Calls / month 20,000 50,000
Tickers per call 1 25
History 30 days full archive
WebSocket stream — included

5-day free trial on both. Every REST endpoint is available on both tiers.

Metadata

Release files for h1news 0.2.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 h1news 0.2.0
File Size Uploaded Provenance Actions
h1news-0.2.0.tar.gz 13.1 kB With provenance Details for h1news-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 27.6 kB

Release files / h1news-0.2.0.tar.gz

Download URL h1news-0.2.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1c0214ebc77e2d11166e16e2f7e02f6f27c7c4175031810b929c39ae88b75b71
BLAKE2b-256 checksum
How to use checksums
0003a1e395fa32a1d5b2cc56ca0dabd3481780383eaff861c302475597bb0b48
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 Nov 30, 2026.

Transparency log

Release files / h1news-0.2.0-py3-none-any.whl

Download URL h1news-0.2.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4aedb4d4d1f5c74953018b9cddd212974b4c33743b182f2d12aeb870ba334084
BLAKE2b-256 checksum
How to use checksums
132cae0f8dc16ac4f3f3048a157ca724df278e784e45cacd736a1ffcb7667382
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 Nov 30, 2026.

Transparency log

Security for h1news 0.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for h1news-0.2.0.tar.gz

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 Nov 30, 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.2.0 This release

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