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. Metadata

Latest Articles

PreviousArchive MetadataNextTags

Last updated 2 years ago

Was this helpful?

Load metadata of the latest articles.

Usage

NYTAPI.latest_articles(source=None, section=None)

Parameters

Variables
Description
Data type
Required
Default

source

Source of article (all, nyt and inyt)

str

False

"all"

Section of articles

str

False

section

You can find all possible sections using:

sections = nyt.section_list()

Example

latest = nyt.latest_articles(
    source = "nyt",
    section = "books"
)
section