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 XML 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/v1/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 a XML document. 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/v1/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/v1/index.php?RequestType=RecentlyPosted&Limit=15&Offset=5


Processing the Response

Each RequestType will return different attributes back in the XML document. 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.

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<Response>
<APIVersion>1.0</APIVersion>
<RequestType>RecentlyPosted</RequestType>
<ResponseID>d2dvUExtUVhEZTQ9</ResponseID>
<ResponseTime>0.000816822052002</ResponseTime>
<GrandTotalResults>1160175</GrandTotalResults>
<ResultsThisResponse>10</ResultsThisResponse>
<Books>
<Book>
<ISBN-13>9781560547259</ISBN-13>
<ISBN-10>1560547251</ISBN-10>
<BookDetailsLink><![CDATA[https://.paperbackswap.com/Garters-Thorndike-Large-Print-Romance/book/9781560547259/]]></BookDetailsLink>
<Title><![CDATA[Garters (Thorndike Large Print Romance)]]></Title>
<Authors>
<Author><![CDATA[Pamela Morsi]]></Author>
</Authors>
<CoverImages>
<SmallImage>https://.paperbackswap.com/images/no_cover/no_cover_41_60.png</SmallImage>
<MediumImage>https://.paperbackswap.com/images/no_cover/no_cover_93_140.png</MediumImage>
<LargeImage>https://.paperbackswap.com/images/no_cover/no_cover_322_475.png</LargeImage>
</CoverImages>
<Binding>Hardcover</Binding>
<Rating>4.2</Rating>
<PostedDateTimeStamp>1178561628</PostedDateTimeStamp>
<PostedDate>5/7/2007 2:13.48 PM ET</PostedDate>
<Available>true</Available>
<BuyItNew><![CDATA[https://www.amazon.com/gp/redirect.html?location=https%3A%2F%2Fwww.amazon.com%2Fdp%2F1560547251%2F&tag=paperbackswap-20]]></BuyItNew>
</Book>
<Book>
.
.
.
</Book>
</Books>
</Response>


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