JSON API: Books

Bookshelves and book metadata via the API.

Get bookshelves

Returns JSON Feed that also includes a books_count field in _microblog with the number of books in a bookshelf.

GET /books/bookshelves
Authorization: Bearer 123456789
{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "Micro.blog - Bookshelves",
  "home_page_url": "https://micro.blog/",
  "feed_url": "https://micro.blog/books/bookshelves",
  "_microblog": {
    "about": "https://micro.blog/about/api"
  },
  "items": [
    {
      "id": 22,
      "title": "Currently reading",
      "content_text": "",
      "url": "https://micro.blog/account/bookshelves/22",
      "date_published": "2021-06-16T21:34:20+00:00",
      "_microblog": {
        "books_count": 5
      }
    },
    {
      "id": 23,
      "title": "Want to read",
      "content_text": "",
      "url": "https://micro.blog/account/bookshelves/23",
      "date_published": "2021-06-16T21:34:20+00:00",
      "_microblog": {
        "books_count": 10
      }
    }
  ]
}

Get books in a bookshelf

Pass the id from /books/bookshelves. Returns JSON Feed with each item representing a book. The isbn is in the _microblog namespace.

GET /books/bookshelves/123
Authorization: Bearer 123456789
{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "Micro.blog - Currently reading",
  "home_page_url": "https://micro.blog/",
  "feed_url": "https://micro.blog/books/bookshelves/25",
  "_microblog": {
    "about": "https://micro.blog/about/api"
  },
  "items": [
    {
      "id": 79,
      "title": "Project Hail Mary",
      "content_text": "",
      "url": "https://micro.blog/books/9780593395561",
      "image": "https://images.isbndb.com/covers/55/61/9780593395561.jpg",
      "date_published": "2021-06-16T21:38:46+00:00",
      "authors": [
        {
          "name": "Andy Weir"
        }
      ],
      "_microblog": {
        "isbn": "9780593395561"
      }
    }
  ]
}

Add a new bookshelf

Every user will automatically have the default bookshelves like “Currently reading”. Accepts a single form-encoded parameter: name

POST /books/bookshelves
Authorization: Bearer 123456789

Rename a new bookshelf

The bookshelf id goes in the URL. Accepts a single form-encoded parameter: name

POST /books/bookshelves/123
Authorization: Bearer 123456789

Add a new book

Accepts form-encoded parameters:

  • title
  • author
  • isbn
  • bookshelf_id

Where possible, Micro.blog will try to find the cover art for you based on ISBN and include that in subsequent bookshelf JSON responses.

POST /books
Authorization: Bearer 123456789

Searching for books

Micro.blog can’t provide an API for searching books. You will need to integrate with another book search API such as Open Library, ISBNdb, Google Books, or Amazon.