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.,

GET /book/9780134093413 HTTP/1.1
Host: api2.isbndb.com
User-Agent: insomnia/5.12.4
Authorization: YOUR_REST_KEY
Accept: */*

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

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


ISBNDB API has a default limit of 1 request per second. across all endpoints.

If you are a PREMIUM subscriber you are entitled to 3 requests per second limit. To access this benefit use the following [ Base URL: api.premium.isbndb.com ]

Please note that the above is only available for PREMIUM subscribers. Attempting to use your API key if you are in a different subscription plan will result in access being denied.

If you are a PRO subscriber you are entitled to 5 requests per second limit. To access this benefit use the following [ Base URL: api.pro.isbndb.com ]

Please note that the above is only available for PRO subscribers. Attempting to use your API key if you are in a different subscription plan will result in access being denied.


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.

View Examples

ISBNdb API v2 2.0.0

[ Base URL: api2.isbndb.com ]
/modules/isbndb_api_docs/swagger_v2.6.json

Definition of ISBNdb.com API v2.

If you are a PREMIUM subscriber you are entitled to 3 requests per second limit. To access this benefit use the following [ Base URL: api.premium.isbndb.com ]

Please note that the above is only available for PREMIUM subscribers. Attempting to use your API key if you are in a different subscription plan will result in access being denied.

If you are a PRO subscriber you are entitled to 5 requests per second limit. To access this benefit use the following [ Base URL: api.pro.isbndb.com ]

Please note that the above is only available for PRO subscribers. Attempting to use your API key if you are in a different subscription plan will result in access being denied.


API Code Examples

  • 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# Book

      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. }
    • .NET C# Book Multiple

      1. using System.Text;
      2.  
      3. namespace ConsoleApp1 {
      4. public class Program {
      5.  
      6. public static async Task Main(string[] args) {
      7. try {
      8. HttpClient client = new HttpClient();
      9. client.BaseAddress = new Uri("https://api2.isbndb.com");
      10. client.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", "<key>");
      11.  
      12. HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Post, "/books");
      13.  
      14. string[] isbns = {"9781492666868", "9781616555719"};
      15. message.Content = new StringContent("isbns=" + String.Join(',', isbns), Encoding.UTF8, "application/json");
      16.  
      17. HttpResponseMessage response = await client.SendAsync(message);
      18.  
      19. var jsonResponse = await response.Content.ReadAsStringAsync();
      20.  
      21. Console.Write(jsonResponse);
      22. } catch (Exception ex) {
      23. Console.WriteLine(ex.ToString());
      24. }
      25. }
      26. }
      27. }
    • Python Book

      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())
    • Python Book Multiple

      1. import requests
      2.  
      3. headers = {
      4. 'accept': 'application/json',
      5. 'Authorization': 'key',
      6. 'Content-Type': 'application/json',
      7. }
      8.  
      9. data = 'isbns=' + ','.join(['9781492666868', '9781616555719'])
      10.  
      11. response = requests.post('https://api2.isbndb.com/books',
      12. headers=headers, data=(data))
      13.  
      14. print(response.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 Book

      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. });
    • NodeJS Book Multiple

      1. const axios = require('axios').default;
      2.  
      3. let headers = {
      4. "Content-Type": 'application/json',
      5. "Authorization": 'key'
      6. }
      7.  
      8. const instance = axios.create({
      9. baseURL: 'https://api2.isbndb.com',
      10. headers: headers
      11. });
      12.  
      13. instance.post(
      14. '/books',
      15. 'isbns=0452284236,2266154117,2842281500',
      16. ).then(function (response) {
      17. console.log(response.data);
      18. })
      19. .catch(function (error) {
      20. console.log(error);
      21. });