160 likes | 454 Views
Best Sellers API. Current Best-Seller List. Must specify list-name parameter Leaving off date parameter gives current week http://api.nytimes.com/svc/books/v2/lists/hardcover-fiction.xml?api-key={api-key}. http://api.nytimes.com/svc/books/v2/lists/hardcover-fiction.xml?api-key={api-key}.
E N D
Current Best-Seller List • Must specify list-name parameter • Leaving off date parameter gives current week http://api.nytimes.com/svc/books/v2/lists/hardcover-fiction.xml?api-key={api-key}
http://api.nytimes.com/svc/books/v2/lists/hardcover-fiction.xml?api-key={api-key}http://api.nytimes.com/svc/books/v2/lists/hardcover-fiction.xml?api-key={api-key}
Best-Seller List Names • To get all possible list-name options, see the names service: http://api.nytimes.com/svc/books/v2/lists/names.xml?api-key={api-key}
http://api.nytimes.com/svc/books/v2/lists/names.xml?api-key={api-key}http://api.nytimes.com/svc/books/v2/lists/names.xml?api-key={api-key}
Previous Best-Seller List • To get a previous list, specify a date parameter in the URL prior to the list-name. • The date parameter does not have to be exact, we will find the closest list to the date you specified (going forward in time). http://api.nytimes.com/svc/books/v2/lists/2008-10-06/hardcover-fiction.xml?api-key={api-key}
http://api.nytimes.com/svc/books/v2/lists/2008-10-06/hardcover-fiction.xml?api-key={api-key}http://api.nytimes.com/svc/books/v2/lists/2008-10-06/hardcover-fiction.xml?api-key={api-key}
Sorting Basic List List service can be sorted on the following fields: • isbn • list-name ( or just list ) • published-date (or just date) • bestsellers-date • weeks-on-list • rank • rank-last-week http://api.nytimes.com/svc/books/v2/lists/2008-10-06/hardcover-fiction.xml?sort-by=weeks-on-list&sort-order=DESC&api-key={api-key}
Best-Seller List Search More flexible option for retrieving list information Search parameters are same as sort parameters: • isbn • list-name ( or just list ) • published-date (or just date) • bestsellers-date • weeks-on-list • rank • rank-last-week http://api.nytimes.com/svc/books/v2/lists.xml?date=2008-10-06&list=hardcover-fiction&api-key={api-key} http://api.nytimes.com/svc/books/v2/lists.xml?date=2008-10-06&list=hardcover-fiction&weeks-on-list=2&sort-by=rank-last-week&sort-order=DESC&api-key={api-key}
Best Seller Search Search for all lists for specific book, author and more Search and sort options are the following: • isbn • title • price • publisher • contributor • author • age-group http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=McCarthy&api-key={api-key} http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=McCarthy&title=Road&api-key={api-key}
http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=McCarthy&api-key={api-key}http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=McCarthy&api-key={api-key}
http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=McCarthy&title=Road&api-key={api-key}http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=McCarthy&title=Road&api-key={api-key}
Sorting Best Seller Search All search fields may also be used as sort parameters • isbn • title • price • publisher • contributor • author • age-group http://api.nytimes.com/svc/books/v2/lists/best-sellers/history.xml?author=Grisham&sort-by=title&api-key={api-key}
Show Us Your Apps Check out the New York Times Developer Network forum and let us know what apps you are building.