Skip to main content
PBS logo
 
 
PBS Logo dev

PBSWS - Developers


Want an easy way to get your PaperBackSwap book data on your personal site? Whether you want to make a simple widget to display your current Wish List or you want to syndicate your book reviews, it all can be done. Please refer to the documentation below on how to make a request and retrieve a response.
To retrieve your MemberID please login and visit this page.

Documentation
  1. Who is this for?
  2. Making a Request
  3. Processing the Response


Who is this for?

To use the PBSWS you will need a working knowledge of JSON and how to parse it into your application. Parsing could be as simple as a XLST document or as complex as a server-side scripted application.


Making a Request

Making a request is done very easily by requesting a URL with the correct parameters. The below example request will return the 10 most recently posted books.

https://www.paperbackswap.com/api/v2/index.php?RequestType=RecentlyPosted

The RequestType variable in the above example makes a request for RecentlyPosted. The PBSWS then return the 10 most recently posted books in JSON. Below is a table that lists the valid RequestTypes.

RequestType Description
MemberID Required?
Bookshelf Returns a list of books that a particular member has posted into the system.
Yes
BooksRead Returns a list of books that a particular member as on their Books I've Read List.
Yes
ClubWishList Returns the book details for a list of ISBNs and whether they are on the Club Wish List.
No
ISBNList Returns the book details for a list of ISBNs and whether they are currently available in the system.
No
MemberReviews Returns a list of book reviews written by a particular member.
Yes
MemberWishList Returns a list of books on a Member's Wish List.
Yes
RecentlyPosted Returns a list of the 10 most recently posted books.
No
RecentlySwapped Returns a list of the 10 most recently swapped books.
No
TBRPile Returns a list of books on a particular Member's TBR Pile.
Yes


For RequestTypes that require a MemberID it must be passed in the URL as MemberID. MemberIDs are case-sensitive.

To retrieve your MemberID please login.

To make a request with RequestTypes ISBNList or ClubWishList you will need to pass the ISBN(s) with the request. Pass the ISBN(s) through the variable in a comma-delimited list.

https://www.paperbackswap.com/api/v2/index.php?RequestType=ISBNList&ISBN=0684826976,9780684826974

Many request types return a list of books. If you want more or fewer items than the default, you can use the "Limit" paramter. You can also specify that you want the list to start after the beginning of the list using the "Offset" parameter. An offset of 0 is equivalent to providing no offset at all. An offset of 10 will tell the API to start with what would normally be the 11th result, skipping the first 10 items.

To request 15 of the most recently posted items, but skip the first 5, your request URL would be:

https://www.paperbackswap.com/api/v2/index.php?RequestType=RecentlyPosted&Limit=15&Offset=5


Processing the Response

Each RequestType will return different attributes back in JSON. If a date is returned, it will be returned in two different formats. The first format will be a Unix TimeStamp while the second will be in human readable format. The Unix TimeStamp is an integer representing the number of seconds since the Unix Epoch (January 1, 1970 00:00.00 GMT). Below is a sample response for RequestType=RecentlyPosted.

{"Response":
	{"APIVersion":"1.0",
	"RequestType":"RecentlyPosted",
	"ResponseID":"Zk1rSGtMOTZGNnc9",
	"Limit":"10",
	"Offset":"0",
	"GrandTotalResults":
	"4135201",
	"ResultsThisResponse":"10",
	"Books":
		{"Book":
			[
				{"ISBN-13":"9780345391056",
				"ISBN-10":"0345391055",
				"BookDetailsLink":"https:\/\/www.paperbackswap.com\/Disclosure-Michael-Crichton\/book\/0345391055\/&_ads=widget&m=referral&c=API&k=",
				"Title":"Disclosure",
				"Authors":{"Author":"Michael Crichton"},
				"CoverImages":
					{"SmallImage":"https:\/\/images.paperbackswap.com\/s\/56\/1056\/9780345391056.jpg",
					"MediumImage":"https:\/\/images.paperbackswap.com\/m\/56\/1056\/9780345391056.jpg",
					"LargeImage":"https:\/\/images.paperbackswap.com\/xl\/56\/1056\/9780345391056.jpg"},
				"Binding":"Paperback",
				"Rating":"3.5",
				"PostedDateTimeStamp":"1427918715",
				"PostedDate":"4\/1\/2015 4:05.15 PM ET",
				"Available":"true",
				"BuyItNew":"https:\/\/www.amazon.com\/gp\/product\/0345391055?SubscriptionId=0QCHRJVSKG6F3BRGBNG2&tag=paperbackswap-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=0345391055"},
				...
			]
		},

	"ResponseTime":"0.03260612487793"}
}				


Response Attributes
  • APIVersion
  • RequestType
  • ResponseID
  • ResponseTime
  • GrandTotalResults
  • ResultsThisResponse
  • ResultsPreviousSet (excluding RequestType "RecentlyPosted")
  • ResultsNextSet (excluding RequestType "RecentlyPosted")


Response - Book Attributes
  • Bookshelf
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • MemberRating
    • MemberRatingDateTimeStamp
    • MemberRatingDate
    • PostedDateTimeStamp
    • PostedDate
    • BuyItNew
  • BooksRead
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • MemberRating
    • MemberRatingDateTimeStamp
    • MemberRatingDate
    • ReadDateTimeStamp
    • ReadDate
    • BuyItNew
  • ClubWishList
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • Wishes
    • BuyItNew
  • ISBNList
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • Available
    • NumberOfPages
    • PublicationDate
    • Publisher
    • Description
    • BuyItNew
  • MemberReviews
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • MemberRating
    • MemberRatingDateTimeStamp
    • MemberRatingDate
    • ReviewDateTimeStamp
    • ReviewDate
    • ReviewText
    • ReviewHelpful
    • ReviewUnHelpful
    • BuyItNew
  • MemberWishList
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • AutoRequest
    • WishDateTimeStamp
    • WishDate
    • WishQueuePosition
    • WishQueueTotal
    • BuyItNew
  • RecentlyPosted
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • PostedDateTimeStamp
    • PostedDate
    • Available
    • BuyItNew
  • RecentlySwapped
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • SwappedDateTimeStamp
    • SwappedDate
    • Available
    • BuyItNew
  • TBRPile
    • ISBN-13
    • ISBN-10
    • BookDetailsLink
    • Title
    • Author
      • Author
    • CoverImages
      • SmallImage
      • MediumImage
      • LargeImage
    • Binding
    • Rating
    • TBRDateTimeStamp
    • TBRDate
    • BuyItNew