Athena News API Documentation
FeaturesPricingContact UsCreate AccountSign In
Athena API v3
Athena API v3
  • About Athena News API
  • v3 Change Summary
  • Account Overview
    • Account Overview
    • Dashboard
    • News Search
    • API Key
    • Account Settings
    • Manage Subscription
  • Getting Started
    • API Quickstart
    • Python SDK
    • Intro to Building a Query
    • API Reference
      • News Search
      • Headlines (BETA)
    • Data Model Reference
      • Articles
      • Entities
    • Supported Languages
    • Rate Limits
    • Troubleshooting
Powered by GitBook
On this page
  • First, install the package:
  • Python SDK Parameter Reference
  1. Getting Started

Python SDK

PreviousAPI QuickstartNextIntro to Building a Query

Last updated 1 month ago

Athena provides a Python package to make it easier to work with our APIs.

First, install the package:

pip install athenanewsapi

If you haven't already, go ahead and create an .

From there, you can run searches without ever having to touch the APIs.

from athenanews import news

API_KEY = "Your API Key"
articles = articles = news(start_date="2025-02-01", end_date="2025-03-10", query="Tesla dealership protests", key_phrases="('Tesla')", api_key=API_KEY)

print("Total Articles: " + str(len(articles)))
for a in articles:
    print(a['title'])
    print(a['url']

Python SDK Parameter Reference

  • start_date (str): ISO formatted start date.

  • end_date (str): ISO formatted end date.

  • query (str): The search query.

  • key_phrases (str): Key phrases to refine the search. (ex: ('elon' or 'musk') and not 'sam altman')

  • toggle_state (str): The toggle state (e.g., "All Articles" or "Encoded Articles").

  • api_key (str): Your Athena API key.

https://pypi.org/project/athenanewsapi/
Athena News API account