{"id":18174386,"url":"https://github.com/news-r/nytimes","last_synced_at":"2026-01-16T18:42:54.696Z","repository":{"id":85371118,"uuid":"189661058","full_name":"news-r/nytimes","owner":"news-r","description":"🍎 R wrapper to New York Times APIs","archived":false,"fork":false,"pushed_at":"2024-11-09T00:03:24.000Z","size":42,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T15:41:23.790Z","etag":null,"topics":["api","news","nytimes","r","rstats"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/news-r.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-31T21:33:22.000Z","updated_at":"2025-01-07T20:25:06.000Z","dependencies_parsed_at":"2024-11-02T16:08:15.451Z","dependency_job_id":"37e5f002-9e95-477f-8a48-bf184f0de713","html_url":"https://github.com/news-r/nytimes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/news-r/nytimes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/news-r%2Fnytimes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/news-r%2Fnytimes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/news-r%2Fnytimes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/news-r%2Fnytimes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/news-r","download_url":"https://codeload.github.com/news-r/nytimes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/news-r%2Fnytimes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","news","nytimes","r","rstats"],"created_at":"2024-11-02T16:03:05.453Z","updated_at":"2026-01-16T18:42:54.668Z","avatar_url":"https://github.com/news-r.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/news-r/nytimes.svg?branch=master)](https://travis-ci.org/news-r/nytimes)\n[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/news-r/nytimes?branch=master\u0026svg=true)](https://ci.appveyor.com/project/news-r/nytimes)\n\u003c!-- badges: end --\u003e\n\n# nytimes\n\nThe goal of `nytimes` is to integrate all of the [New York Times API](https://developer.nytimes.com) with R.\n\n## Installation\n\n``` r\n#install.packages(\"remotes\")\nremotes::install_github(\"news-r/nytimes\")\n```\n\n## APIs\n\n- [x] [Archive](https://developer.nytimes.com/docs/archive-product/1/overview) \n- [x] [Article Search](https://developer.nytimes.com/docs/articlesearch-product/1/overview)\n- [x] [Books](https://developer.nytimes.com/docs/books-product/1/overview)\n- [x] [Geo](https://developer.nytimes.com/docs/geo-product/1/overview)\n- [x] [Most Popular](https://developer.nytimes.com/docs/most-popular-product/1/overview)\n- [x] [Movie Reviews](https://developer.nytimes.com/docs/movie-reviews-api/1/overview)\n- [x] [Semantic](https://developer.nytimes.com/docs/semantic-api-product/1/overview)\n- [x] [Times Tags](https://developer.nytimes.com/docs/timestags-product/1/overview)\n- [x] [Times Wire](https://developer.nytimes.com/docs/timeswire-product/1/overview)\n- [x] [Top Stories](https://developer.nytimes.com/docs/top-stories-product/1/overview)\n\n## Setup\n\nFirst, [create an account](https://developer.nytimes.com) to obtain an API key. Then either specify the aforementioned key using `nytimes_key` or specify it as environment variable (likely in your `.Renviron`) as `NYTIMES_API_KEY`.\n\n```r\nlibrary(nytimes)\n\nnytimes_key(\"xXxxX\")\n```\n\n## Examples\n\nThe archive API.\n\n```{r}\nlibrary(nytimes)\n\n# get all articles from January first 2018\narchive \u003c- ny_archive(2018, 1)\n```\n\nThe article search API.\n\n```{r}\n# get all articles on Obama that have been published in the last 3 days, get three pages of results\nobama \u003c- ny_search(\"Obama\", since = Sys.Date() - 3, pages = 3)\n```\n\nThe books API\n\n```{r}\n# get data on a random book\nbooks \u003c- ny_book_names()\nlist \u003c- ny_book_list(sample(books$list_name_encoded, 1))\n```\n\nThe most popular API\n\n```{r}\n# get most viewed articles in the last 7 days\nviewed \u003c- ny_popular_viewed(7)\n```\n\nThe movie review API\n\n```{r}\n# get 2 pages of movie reviews on war\nreviews \u003c- ny_movie_search(\"war\", pages = 2)\n```\n\nThe semantic API\n\n```{r}\n# get 2 pages of movie reviews on war\nconcepts \u003c- ny_semantic_search(\"war\")\n```\n\nTimes tags API\n\n```{r}\nny_tags(\"Trump\", max = 6)\n```\n\nTop stories API\n\n```r\nbusiness \u003c- ny_stories(\"business\")\n```\n\nTimes wire API\n\n```{r}\nsections \u003c- ny_wire_section_list()\nwires \u003c- ny_wire_source(sample(sections$section, 1))\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnews-r%2Fnytimes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnews-r%2Fnytimes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnews-r%2Fnytimes/lists"}