Skip to main content
Python SDK provides access to the News API from Python applications with support for both synchronous and asynchronous operations.

Installation

Basic usage

Async usage

Retrieving more than 10,000 articles

The SDK provides methods to automatically retrieve more than the standard 10,000 article limit:
To learn more about the custom methods allowing to bypass the API limits, see How to retrieve more than 10,000 articles.

Query validation

The SDK includes client-side query validation that helps you catch syntax errors before making API calls:
Query validation is automatically enabled in methods like get_all_articles() and will raise a ValueError for invalid queries. You can disable validation by setting validate_query=False. To learn more about query validation rules and bulk validation techniques, see Validate queries with Python SDK.

Error handling

Resources