Comment on page
Top Stories
Load all the top stories.
NYTAPI.top_stories(section=None)
Variables | Description | Data type | Required |
---|---|---|---|
section | Get Top Stories from a specific section | str | False |
The possible sections are:
arts
, automobiles
, books
, business
, fashion
, food
, health
, home
, insider
, magazine
, movies
, national
, nyregion
, obituaries
, opinion
, politics
, realestate
, science
, sports
, sundayreview
, technology
, theater
, tmagazine
, travel
, upshot
, and world
.top_stories = nyt.top_stories()
# Get all the top stories from a specific category
top_science_stories = nyt.top_stories(section = "science")
Last modified 11mo ago