Chegg Textbook API Documentation

Chegg Textbook API Documentation

Version 4.0

Chegg, Inc

You can read the documentation online below or download the PDF here chegg_textbook_api_v4.

Introduction:

The Chegg.com Affiliate API aims to provide a flexible web service API solution to affiliates wishing to pull textbook information from Chegg.com.  The affiliate API allows for implementation on both ASP.NET and PHP sites.  Each affiliate must integrate through the Chegg’s affiliate program and agree to Chegg’s Textbook Rental Campaign Terms to receive access to the API.  Once integrated, affiliates can choose to pull returning information in PHP serialized data, JSON or XML.  All of the encoding is handled by the API.  The affiliate API also receives calls in all three formats.

 

Authentication:

The Chegg.com affiliate API uses a Key and Password system for authenticating API calls.  The key consists of a 32 character MD5 hash.  The password is a 10 digit integer value.  Both the key and the password are provided by Chegg.com and must be passed as the “Key” and “PW” name value parameters in API calls.  Each API key has a specific permission set that defines what API calls it has permission to make.  If the API key does not have permission to a particular service, it will return “ERR_NOPERM”.

 


 

Sending calls to the Chegg API

PHP (Serialized Array):
http://api.chegg.com/rent.svc?KEY=KEY&PW=PASSWORD&isbn=ISBN&R=PHP&with_pids=1&page=PAGE&results_per_page=NUMBER_OF_RESUTS&V=4.0

XML:

http://api.chegg.com/rent.svc?KEY=KEY&PW=PASSWORD&isbn=ISBN&R=XML&with_pids=1&page=PAGE&results_per_page=NUMBER_OF_RESUTS&V=4.0

JSON:

http://api.chegg.com/rent.svc?KEY=KEY&PW=PASSWORD&isbn=ISBN&R=JSON&with_pids=1&page=PAGE&results_per_page=NUMBER_OF_RESUTS&V=4.0

Definitions:

  • KEY – API key that Chegg provides
  • PASSWORD – Password associated with the API key that Chegg provides
  • PAGE – The page of results to return
  • NUMBER_OF_RESULTS – The number of results to be displayed per page. (Max 50)

 

Sending calls to look up multiple ISBN’s:

Use URL encoded comma %2C to separate out ISBN’s in the url.  The list of ISBN’s can be passed as a comma separated list.

http://api.chegg.com/rent.svc?KEY=KEY&PW=PASSWORD&isbn=ISBN%2CISBN%2CISBN&R=JSON&with_pids=1&page=PAGE&results_per_page=NUMBER_OF_RESUTS&V=4.0

 

 

Sample Response for a Search from Chegg textbook API

{

“Error”: false,

“Data”: {

“Items”: [

{

“BookInfo”: {

“Title”: “Biology”,

“EditionNumber”: “9”,

“EditionType”: “”,

“PubDate”: null,

“PubName”: “CENGAGE Learning”,

“ListPrice”: “266.95”,

“Authors”: [

“Starr, Cecie”,

“Evers, Christine”,

“Starr, Lisa”

],

“ImageThumb”: “//cs.cheggcdn.com/covers2/40460000/thumbs/40466004_1420694734.jpg”,

“ImageSmall”: “//cs.cheggcdn.com/covers2/40460000/40466004_1420694734.jpg”,

“ImageMedium”: “//cs.cheggcdn.com/covers2/40460000/40466004_1420694734.jpg”,

“ImageLarge”: “//cs.cheggcdn.com/covers2/40460000/40466004_1420694734.jpg”

},

“ISBN”: “1285427815”,

“EAN”: “9781285427812”,

“Terms”: [

{

“price”: “44.49”,

“id”: “161”,

“term”: “SEMESTER”,

“name”: “Semester Rental”,

“term_days”: “161”,

“due_date”: “2016-12-23”,

“orig_price”: “44.49”,

“discount_info”: “0”,

“pid”: “LBP-40466004|dd82f8de-dc91-4565-a2a2-368ce15cf295|1”

},

{

“price”: “44.49”,

“id”: “161”,

“term”: “QUARTER”,

“name”: “Quarter Rental”,

“term_days”: “161”,

“due_date”: “2016-12-23”,

“orig_price”: “44.49”,

“discount_info”: “0”,

“pid”: “LBP-40466004|dd82f8de-dc91-4565-a2a2-368ce15cf295|1”

},

{

“price”: “44.49”,

“id”: “161”,

“term”: “SUMMER”,

“name”: “Summer Rental”,

“term_days”: “161”,

“due_date”: “2016-12-23”,

“orig_price”: “44.49”,

“discount_info”: “0”,

“pid”: “LBP-40466004|dd82f8de-dc91-4565-a2a2-368ce15cf295|1”

}

],

“Renting”: true,

“ShippingPrices”: [

{

“method_name”: “Ground Shipping”,

“cost_first”: “5.99”,

“cost_each”: “2.99”,

“guarantee_date”: “07-23-2016”

},

{

“method_name”: “Standard”,

“cost_first”: “4.99”,

“cost_each”: “3.99”,

“guarantee_date”: “07-25-2016”

},

{

“method_name”: “UPS 3rd Day”,

“cost_first”: “5.99”,

“cost_each”: “2.99”,

“guarantee_date”: “07-19-2016”

},

{

“method_name”: “UPS 2nd Day”,

“cost_first”: “10.99”,

“cost_each”: “5.99”,

“guarantee_date”: “07-18-2016”

},

{

“method_name”: “UPS Next Day Air”,

“cost_first”: “16.99”,

“cost_each”: “10.99”,

“guarantee_date”: “07-16-2016”

}

],

“SellPrices”: [

{

“price”: “169.49”,

“pid”: “LBP-40466004|be01c6db-8d1f-4bdd-96bb-1d52ae05f3b7|1”,

“condition”: 70,

“desc”: “Used Book”

},

{

“price”: “227.99”,

“pid”: “LBP-40466004|1c80ec31-5d3f-446d-9115-0ed292d30384|1”,

“condition”: 100,

“desc”: “New Book”

}

],

“CheggStudy”: {

“description”: “Chegg Study monthly membership with 4 Weeks Free Trial”,

“pid”: “SCP-9|c0d7421f-68ba-46b3-bc57-3c79644c2a74|1”,

“trial_days”: “28”

},

“Ebook”: {

“ISBN”: “1285974654”,

“EAN”: “9781285974651”,

“Terms”: [

{

“price”: “79.99”,

“name”: “180-day Rental”,

“term_days”: “180”,

“due_date”: “2017-01-11”,

“orig_price”: “79.99”,

“discount_info”: “0”,

“pid”: “LBP-40466004|909928d6-f502-4340-aef6-86826213dfcd|1”

},

{

“price”: “69.91”,

“name”: “120-day Rental”,

“term_days”: “120”,

“due_date”: “2016-11-12”,

“orig_price”: “69.91”,

“discount_info”: “0”,

“pid”: “LBP-40466004|25bb0e5f-daef-4091-afbd-391f6790c804|1”

},

{

“price”: “64.87”,

“name”: “90-day Rental”,

“term_days”: “90”,

“due_date”: “2016-10-13”,

“orig_price”: “64.87”,

“discount_info”: “0”,

“pid”: “LBP-40466004|d91fe15b-313b-407c-b417-92602ccfe859|1”

},

{

“price”: “110.23”,

“name”: “360-day Rental”,

“term_days”: “360”,

“due_date”: “2017-07-10”,

“orig_price”: “110.23”,

“discount_info”: “0”,

“pid”: “LBP-40466004|5a1ac54e-091e-425e-b412-95fb9001de1f|1”

},

{

“price”: “0.00”,

“name”: “Read While You Wait”,

“term_days”: “7”,

“due_date”: “2016-07-22”,

“orig_price”: null,

“discount_info”: “0”,

“pid”: “LBP-40466004|81df19f0-6103-4e24-b70f-9a840371f0bc|1”

}

],

“SellPrices”: [

{

“price”: “200.00”,

“pid”: “LBP-40466004|5a1ac54e-091e-425e-b412-95fb9001de1f|1”

}

]

}

}

]

}

}

 

The response includes the following data points for each book returned:

  • Book Info
    • Title
    • Edition #
    • Edition Type
    • Pub Date
    • Pub Name
    • List Price
    • Authors
    • Image Thumb
    • Image Small
    • Image Medium
    • Image Large
  • ISBN
  • EAN
  • Rental Term
    • Price
    • Description of Term
    • Length of term in days
    • Due Date, if ordered today
    • PID – Price identifier
  • Renting (is a yes flag to indicate if Chegg is renting this book: 1 = renting; 0 = not renting)
  • Shipping Prices
    • Shipping Type
    • Cost for first book
    • Cost for each additional book
    • Delivery guarantee date
      • Note: for 2 day and next day deliver, that guarantee date is only applicable if order is placed prior to 9:00am
    • Sell Prices
      • Price
      • PID – Price identifier
      • Condition
      • Description (New or Used Book)
    • Chegg Study
      • Description – Will display if Study solutions for book is available
      • PID – Price identifier
      • Trial Days – Number of trial days included with book purchase
    • Ebook
      • ISBN
      • EAN
      • Rental Term
        • Price
        • Name – Description of Term (Read While You Wait will display if offered free for certain length of days with book rental or sell)
        • Length of term in days
        • Due Date, if ordered today
        • PID – Price identifier
      • Sell Prices
        • Price
        • PID – Price identifier

 

 

Tracking links and directing traffic to Chegg:

To get links to direct users to Chegg, you will need to login to the affiliate dashboard, click on “My Offers” tab, and select “Creatives” from the Chegg Textbook Rental campaign.

 

 

On the following screen, you will fine Deep Links to direct users to the Cart Page or the Product Page.

  1. Cart Page: You will need the PID from the API results to direct users to the Cart Page.  PID results only last 24 hours.
  2. Product Page: You will need the ISBN of the book to direct users to the Product page.








Share This