Using nytimes-python-sdk with nytimes.com

Python integration

Install
pip install nytimes-python-sdk
Quick start
import nytimes-python-sdk

# Set your API key
client = nytimes_python_sdk.Client(api_key="YOUR_API_KEY")
Most Shared by Section & Time Period
curl \
  # append ?api-key=$API_KEY to the URL \
  http://api.nytimes.com/svc/mostpopular/v2/mostshared/{section}/{time-period}.json
Most Viewed by Section & Time Period
curl \
  # append ?api-key=$API_KEY to the URL \
  http://api.nytimes.com/svc/mostpopular/v2/mostviewed/{section}/{time-period}.json
Most Emailed by Section & Time Period
curl \
  # append ?api-key=$API_KEY to the URL \
  http://api.nytimes.com/svc/mostpopular/v2/mostemailed/{section}/{time-period}.json
SDK on GitHub 📄 API Docs
SDK
nytimes-python-sdk
Python
API
nytimes.com
nytimes.com:most_popular_api
At a glance
Language Python
Endpoints3
Base URLhttp://api.nytimes.com/svc/mostpopular/v2