Skip to main content

ListsJsonService

A list of all methods in the ListsJsonService service. Click on the method name to view detailed information about that method.

MethodsDescription
GET_lists_formatGet Best Sellers list. If no date is provided returns the latest list.

GET_lists_format

Get Best Sellers list. If no date is provided returns the latest list.

  • HTTP Method: GET
  • Endpoint: /lists.json

Parameters

NameTypeRequiredDescription
liststringThe name of the Times best sellers list (hardcover-fiction, paperback-nonfiction, ...). The /lists/names service returns all the list names. The encoded list names are lower case with hyphens instead of spaces (e.g. e-book-fiction, instead of E-Book Fiction).
bestsellersDatestringYYYY-MM-DD The week-ending date for the sales reflected on list-name. Times best sellers lists are compiled using available book sale data. The bestsellers-date may be significantly earlier than published-date. For additional information, see the explanation at the bottom of any best-seller list page on NYTimes.com (example: Hardcover Fiction, published Dec. 5 but reflecting sales to Nov. 29).
publishedDatestringYYYY-MM-DD The date the best sellers list was published on NYTimes.com (different than bestsellers-date). Use "current" for latest list.
offsetnumberSets the starting point of the result set (0, 20, ...). Used to paginate thru books if list has more than 20. Defaults to 0. The num_results field indicates how many books are in the list.

Return Type

GetListsFormatOkResponse

Example Usage Code Snippet

import { NytBooksSdk } from 'nyt-books';

(async () => {
const nytBooksSdk = new NytBooksSdk({});

const { data } = await nytBooksSdk.listsJson.getListsFormat({
list: 'hardcover-fiction',
bestsellersDate: '8901-94-76',
publishedDate: '0252-52-08',
offset: 123,
});

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →