ISBNdb API Documentation v2

Authentication

Welcome to the ISBNdb API Documentation. Our REST API allows you to retrieve information about millions of books.

Authentication
In order to interact with the API you'll need to use an HTTP header on every request.

Authorization: YOUR_REST_KEY
Please note the difference as passing your key via GET parameters won't work. e.g.,

Incorrect

https://api2.isbndb.com/book/9780134093413?Authorization=YOUR_REST_KEY
        
Correct

GET /book/9780134093413 HTTP/1.1
Host: api2.isbndb.com
User-Agent: insomnia/5.12.4
Authorization: YOUR_REST_KEY
Accept: */*
        
Error Messages
If the key reaches the request limit the response will be 

Status code: 404 Not found

Response:  {"errorMessage": "Not Found"}

Status code: 429 Too Many Requests

Response :  { "message": "Limit Exceeded" }

If you need further information on HTTP Headers please see our API Code Examples

View Examples

API Endpoints

The following lists all our available API endpoints, you may use your assigned API_REST_KEY to live interact with it using each of the forms below.

APIv2 code samples

  • PHP books

    1. $url = 'https://api2.isbndb.com/book/9780134093413';
    2. $restKey = 'YOUR_REST_KEY';
    3.  
    4. $headers = array(
    5. "Content-Type: application/json",
    6. "Authorization: " . $restKey
    7. );
    8.  
    9. $rest = curl_init();
    10. curl_setopt($rest,CURLOPT_URL,$url);
    11. curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
    12. curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
    13.  
    14. $response = curl_exec($rest);
    15.  
    16. echo $response;
    17. print_r($response);
    18. curl_close($rest);
    19.  
  • PHP author

    1. $author = rawurlencode('James Hadley Chase');
    2. $url = "https://api2.isbndb.com/author/{$author}";
    3. $restKey = 'YOUR_REST_KEY';
    4.  
    5. $headers = array(
    6. "Content-Type: application/json",
    7. "Authorization: " . $restKey
    8. );
    9.  
    10. $rest = curl_init();
    11. curl_setopt($rest,CURLOPT_URL,$url);
    12. curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
    13. curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
    14.  
    15. $response = curl_exec($rest);
    16.  
    17. echo $response;
    18. print_r($response);
    19. curl_close($rest);
    20.  
    • .NET C#

      1. using System;
      2. using System.IO;
      3. using System.Net;
      4.  
      5. namespace ConsoleApp1 {
      6. public class Program {
      7.  
      8. public static void Main(string[] args) {
      9.  
      10. const string WEBSERVICE_URL = "https://api2.isbndb.com/book/9781934759486";
      11.  
      12. try {
      13. var webRequest = WebRequest.Create(WEBSERVICE_URL);
      14.  
      15. if (webRequest != null) {
      16. webRequest.Method = "GET";
      17. webRequest.ContentType = "application/json";
      18. webRequest.Headers["Authorization"] = "YOUR_REST_KEY";
      19.  
      20. //Get the response
      21. WebResponse wr = webRequest.GetResponseAsync().Result;
      22. Stream receiveStream = wr.GetResponseStream();
      23. StreamReader reader = new StreamReader(receiveStream);
      24.  
      25. string content = reader.ReadToEnd();
      26.  
      27. Console.Write(content);
      28. }
      29. } catch (Exception ex) {
      30. Console.WriteLine(ex.ToString());
      31. }
      32. }
      33. }
      34. }
    • Python

      1. import requests as req
      2.  
      3. h = {'Authorization': 'YOUR_REST_KEY'}
      4. resp = req.get("https://api2.isbndb.com/book/9781934759486", headers=h)
      5. print(resp.json())
    • Java

      1. import java.io.BufferedReader;
      2. import java.io.IOException;
      3. import java.io.InputStreamReader;
      4. import java.net.HttpURLConnection;
      5. import java.net.MalformedURLException;
      6. import java.net.ProtocolException;
      7. import java.net.URL;
      8.  
      9. public class JavaGetRequest {
      10.  
      11. private static HttpURLConnection con;
      12.  
      13. public static void main(String[] args) throws MalformedURLException,
      14.  
      15. String url = "https://api2.isbndb.com/book/9781934759486";
      16.  
      17. try {
      18.  
      19. URL myurl = new URL(url);
      20. con = (HttpURLConnection) myurl.openConnection();
      21. con.setRequestProperty("Content-Type", "application/json");
      22. con.setRequestProperty("Authorization": "YOUR_REST_KEY");
      23. con.setRequestMethod("GET");
      24.  
      25. StringBuilder content;
      26.  
      27. new InputStreamReader(con.getInputStream()))) {
      28.  
      29. String line;
      30. content = new StringBuilder();
      31.  
      32. while ((line = in.readLine()) != null) {
      33. content.append(line);
      34. content.append(System.lineSeparator());
      35. }
      36. }
      37.  
      38. System.out.println(content.toString());
      39.  
      40. } finally {
      41.  
      42. con.disconnect();
      43. }
      44. }
      45. }
    • NodeJS

      1. let headers = {
      2. "Content-Type": 'application/json',
      3. "Authorization": 'YOUR_REST_KEY'
      4. }
      5.  
      6. fetch('https://api2.isbndb.com/book/9781934759486', {headers: headers})
      7. .then(response => {
      8. return response.json();
      9. })
      10. .then(json => {
      11. console.log(json)
      12. })
      13. .catch(error => {
      14. console.error('Error:', error)
      15. });