Skip to content

thefernbot/openclaw-nyt-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NYT Plugin for OpenClaw

An OpenClaw plugin that provides access to the New York Times API suite.

APIs Supported

Action Description
top_stories Top stories by section (home, world, tech, movies, etc.)
search Search articles by keyword, date range, filters
most_popular Most viewed, shared, or emailed articles
bestseller_lists List all NYT bestseller list names
bestsellers Get books from a specific bestseller list
newswire Latest articles as they're published
archive Historical articles by year/month (1851-present)

Note: The Movie Reviews API has been deprecated by NYT. For movie content, use section=movies with top_stories or newswire, or search for movie-related articles.

Installation

  1. Get an API key from developer.nytimes.com
  2. Add to your OpenClaw config:
{
  "plugins": {
    "load": {
      "paths": ["/path/to/this/plugin"]
    },
    "entries": {
      "new-york-times": {
        "enabled": true,
        "config": {
          "apiKey": "your-api-key"
        }
      }
    }
  },
  "tools": {
    "allow": ["nyt"]
  }
}

Usage Examples

Top Stories

nyt action=top_stories section=technology limit=5
nyt action=top_stories section=movies limit=10

Sections: home, world, science, technology, health, sports, arts, books, movies, travel, etc.

Article Search

nyt action=search query="artificial intelligence" begin_date=20240101 sort=newest
nyt action=search query="climate" filter_query='section_name:("Science")'

Most Popular

nyt action=most_popular type=viewed period=7 limit=10

Types: viewed, shared, emailed
Periods: 1, 7, or 30 days

Bestseller Lists

nyt action=bestseller_lists
nyt action=bestsellers list_name=hardcover-fiction
nyt action=bestsellers list_name=paperback-nonfiction date=2024-01-01

Times Newswire (Live Feed)

nyt action=newswire source=nyt section=technology limit=20
nyt action=newswire section=movies limit=10

Sources: all, nyt, inyt (International NYT)

Archive (Historical)

nyt action=archive year=1969 month=7

Access every article since 1851!

RSS Feeds (No API Key Required)

NYT also offers RSS feeds that don't require authentication:

  • Movies: https://rss.nytimes.com/services/xml/rss/nyt/Movies.xml
  • Technology: https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml
  • Full list: developer.nytimes.com/docs/rss-api

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors