Table of Contents

    API

    Mock Server

    Use this URL to access a mockup of the API server. Your traffic will be recorded and compared to the documentation. You'll find your traffic analysis in the inspector or directly here in the documentation, right next to each resource.

Books

Books API is a service to catalog publishing information on popular books.

Books

Books related resources of the Books API

Book

A single Book object, it represents a single book.

Required attributes:

  • id Automatically assigned
  • title
  • author ID of author
  • publishers IDs of publishers
  • year
  • genre
  • summary
  • cover

Optional attributes:

-adaptations

List all Books

GET

/books.json

Response

200 (OK)
Content-Type: application/json
[{
  "id": 1, "title" : "Guns, Germs, and Steel: The Fates of Human Societies", "author" : 1, "publishers" : [1], "year" : 1997, "genre" : "History", "summary" : "Guns, Germs, and Steel: The Fates of Human Societies is a 1997 transdisciplinary nonfiction book by Jared Diamond, professor of geography and physiology at the University of California, Los Angeles (UCLA). In 1998, it won the Pulitzer Prize for general non-fiction and the Aventis Prize for Best Science Book. A documentary based on the book, and produced by the National Geographic Society, was broadcast on PBS in July 2005.", "adaptations" : "http:\/\/www.imdb.com\/title\/tt0475043\/", "cover" : "http:\/\/blog.nimble.com.au\/wp-content\/uploads\/2013\/09\/guns-germs-and-steel.jpg"
}, {
  "id": 2, "title" : "The Road", "author" : "Cormac McCarthy", "publishers" : [2], "year" : 2006, "genre" : "Science Fiction", "summary" : "The Road is a 2006 novel by American writer Cormac McCarthy. It is a post-apocalyptic tale of a journey of a father and his young son over a period of several months, across a landscape blasted by an unspecified cataclysm that has destroyed most of civilization and, in the intervening years, almost all life on Earth. The novel was awarded the 2007 Pulitzer Prize for Fiction and the James Tait Black Memorial Prize for Fiction in 2006. In 2010, The Times ranked The Road first on its list of the 100 best fiction and non-fiction books of the past 10 years.", "adaptations" : "http:\/\/www.imdb.com\/title\/tt0898367\/", "cover" : "http:\/\/www.fancygoods.com.au\/wp-content\/uploads\/2010\/02\/The-Road.jpg"
}]

Book

A single Book object with all its details

Retrieve a Book

GET

/books/{id}.json

Parameters
Name Description Details
id

Numeric id of the Book to perform action with. Has example value.

number, required
example: 1

Response

200 (OK)
Content-Type: application/json
X-My-Header: The Value
{ "id": 2, "title" : "The Road", "author" : "Cormac McCarthy", "publishers" : [2], "year" : 2006, "genre" : "Science Fiction", "summary" : "The Road is a 2006 novel by American writer Cormac McCarthy. It is a post-apocalyptic tale of a journey of a father and his young son over a period of several months, across a landscape blasted by an unspecified cataclysm that has destroyed most of civilization and, in the intervening years, almost all life on Earth. The novel was awarded the 2007 Pulitzer Prize for Fiction and the James Tait Black Memorial Prize for Fiction in 2006. In 2010, The Times ranked The Road first on its list of the 100 best fiction and non-fiction books of the past 10 years.", "adaptations" : "http:\/\/www.imdb.com\/title\/tt0898367\/", "cover" : "http:\/\/www.fancygoods.com.au\/wp-content\/uploads\/2010\/02\/The-Road.jpg" }

Response

404 (Not Found)
Content-Type: application/json
{
  "error": "Book with id {id} does not exist"
}

Author

A single Author object, it represents a single author.

Required attributes:

  • id Automatically assigned
  • name
  • born
  • country
  • photo
  • bio

Optional attributes:

  • died
  • web
  • twitter
  • youtube

List all Authors

GET

/authors.json

Response

200 (OK)
Content-Type: application/json
[{
  "id": 1, "name" : "Jared Diamond", "born" : 1937, "died" : 0, "country" : "United States", "photo" : "http:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/d\/db\/Jared_diamond.jpg\/1024px-Jared_diamond.jpg", "web" : "http:\/\/http:\/\/www.jareddiamond.org\/", "twitter" : "", "youtube" : "https:\/\/www.youtube.com\/watch?v=IESYMFtLIis", "bio" : "Jared Mason Diamond (born September 10, 1937) is an American scientist and author. Originally trained in physiology, Diamond's work is known for drawing from a variety of fields, including anthropology, ecology, geography, and evolutionary biology. As of 2013, he is Professor of Geography at the University of California, Los Angeles. He has been described as \"America’s best-known geographer\"."
}, {
  "id": 2, "name" : "J.R.R. Tolkien", "born" : 1892, "died" : 1973, "country" : "England", "photo" : "http://upload.wikimedia.org/wikipedia/commons/b/b4/Tolkien_1916.jpg", "web" : "http://www.tolkien.co.uk/", "twitter" : "", "youtube" : "https://www.youtube.com/watch?v=HkmNHP58OhU", "bio" : "John Ronald Reuel Tolkien, CBE was an English writer, poet, philologist, and university professor, best known as the author of the classic high fantasy works The Hobbit, The Lord of the Rings, and The Silmarillion. Tolkien was appointed a Commander of the Order of the British Empire by Queen Elizabeth II on 28 March 1972."
}]

Author

A single Author object with all its details

Retrieve a Author

GET

/authors/{id}.json

Parameters
Name Description Details
id

Numeric id of the Book to perform action with. Has example value.

number, required
example: 1

Response

200 (OK)
Content-Type: application/json
X-My-Header: The Value
{ "id": 2, "name" : "J.R.R. Tolkien", "born" : 1892, "died" : 1973, "country" : "England", "photo" : "http://upload.wikimedia.org/wikipedia/commons/b/b4/Tolkien_1916.jpg", "web" : "http://www.tolkien.co.uk/", "twitter" : "", "youtube" : "https://www.youtube.com/watch?v=HkmNHP58OhU", "bio" : "John Ronald Reuel Tolkien, CBE was an English writer, poet, philologist, and university professor, best known as the author of the classic high fantasy works The Hobbit, The Lord of the Rings, and The Silmarillion. Tolkien was appointed a Commander of the Order of the British Empire by Queen Elizabeth II on 28 March 1972." }

Response

404 (Not Found)
Content-Type: application/json
{
  "error": "Author with id {id} does not exist"
}

Publisher

A single Publisher object, it represents a single publisher.

Required attributes:

  • id Automatically assigned
  • name
  • year
  • info

Optional attributes:

  • address
  • web
  • twitter
  • logo

List all Publishers

GET

/publishers.json

Response

200 (OK)
Content-Type: application/json
[{
  "id": 1, "name" : "W.W. Norton & Company, Inc.", "year" : 1923, "address" : "500 Fifth Avenue, New York, NY 10110", "web" : "http:\/\/www.wwnorton.com\/", "twitter" : "https:\/\/twitter.com\/wwnorton", "info" : "Now, in its 90th year and with an annual list of 400 titles, W. W. Norton is a global company, its familiar seagull logo appearing on books in the United States, Canada, Australia, New Zealand, Taiwan, Hong Kong, Japan, Korea, and Latin America. Though the Norton of today is international in scope, there is much about the company that would remain recognizable to its founders: the editorial quality of the books, the rigorously anti-corporate style, and above all the shared sense of purpose that flourishes when all employees have a stake in the success of their firm.", "logo" : "http:\/\/www.afta.org\/files\/bookstore\/WWNorton.jpg"
},{
  "id": 2, "name" : "Alfred A. Knopf", "year" : 1915, "address" : "1745 Broadway, New York, NY 10019", "web" : "http:\/\/knopfdoubleday.com\/imprint\/knopf\/", "twitter" : "https:\/\/twitter.com\/AAKnopf", "info" : "Alfred A. Knopf, Inc. is a New York publishing house, founded by Alfred A. Knopf, Sr. in 1915. It was acquired by Random House in 1960 and is now part of the Knopf Doubleday Publishing Group at Random House. Alfred A. Knopf has long been known as a publisher of distinguished hardcover fiction and nonfiction.", "logo" : "http:\/\/www.comicbookreligion.com\/logos\/a\/Alfred_A_Knopf.jpg"
}]

Publisher

A single Publisher object with all its details

Retrieve a Publisher

GET

/publishers/{id}.json

Parameters
Name Description Details
id

Numeric id of the Publisher to perform action with. Has example value.

number, required
example: 1

Response

200 (OK)
Content-Type: application/json
X-My-Header: The Value
{ "id": 2, "name" : "Alfred A. Knopf", "year" : 1915, "address" : "1745 Broadway, New York, NY 10019", "web" : "http:\/\/knopfdoubleday.com\/imprint\/knopf\/", "twitter" : "https:\/\/twitter.com\/AAKnopf", "info" : "Alfred A. Knopf, Inc. is a New York publishing house, founded by Alfred A. Knopf, Sr. in 1915. It was acquired by Random House in 1960 and is now part of the Knopf Doubleday Publishing Group at Random House. Alfred A. Knopf has long been known as a publisher of distinguished hardcover fiction and nonfiction.", "logo" : "http:\/\/www.comicbookreligion.com\/logos\/a\/Alfred_A_Knopf.jpg" }

Response

404 (Not Found)
Content-Type: application/json
{
  "error": "Publisher with id {id} does not exist"
}