pynytimes
  • Introduction to pynytimes
  • Getting Started
    • Installation
    • Usage
    • Citation
  • Search
    • Article Search
    • Book Reviews
    • Movie Reviews
  • Popular
    • Top Stories
    • Most Viewed
    • Most Shared
    • Best Sellers Lists
  • Metadata
    • Article Metadata
    • Archive Metadata
    • Latest Articles
  • Other
    • Tags
  • Advanced Usage
    • Close Connection
    • Automatic Connection
  • Repository
  • PyPI
Powered by GitBook
On this page
  • Usage
  • Parameters
  • Example

Was this helpful?

Edit on GitHub
  1. Popular

Best Sellers Lists

Load best seller list.

Usage

NYTAPI.best_sellers_list(name="combined-print-and-e-book-fiction", date=None)

Parameters

Variables
Description
Data type
Required
Default

name

Name of best sellers list

str

False

"combined-print-and-e-book-fiction"

date

Date of best sellers list

datetime.datetime

False

Today

name

Get all best sellers lists

lists = nyt.best_sellers_lists()

Example

# Get fiction best sellers list
books = nyt.best_sellers_list()

# Get non-fiction best sellers list
books = nyt.best_sellers_list(
    name = "combined-print-and-e-book-nonfiction"
)

# Get best sellers lists from other date
import datetime

books = nyt.best_sellers_list(
    name = "combined-print-and-e-book-nonfiction",
    date = datetime.datetime(2019, 1, 1)
)
PreviousMost SharedNextArticle Metadata

Last updated 2 years ago

Was this helpful?