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

Most Shared

Load most shared articles.

Usage

NYTAPI.most_shared(days=1, method="email")

Parameters

Variables
Description
Data type
Required
Default

days

Get most viewed articles over the last 1, 7 or 30 days

int

False

1

method

Method of sharing (email or facebook)

str

False

"email"

Example

most_shared = nyt.most_shared()

# Get most emailed articles of the last day
most_shared = myt.most_shared(
    days = 1,
    method = "email"
)

# Get most shared articles to Facebook of the last 7 days
most_shared = nyt.most_shared(
    days = 7,
    method = "facebook"    
)

# Get most shared articles to Facebook of the last 30 days
most_shared = nyt.most_shared(
    days = 30,
    method = "facebook"
)
PreviousMost ViewedNextBest Sellers Lists

Last updated 2 years ago

Was this helpful?