{"_id":"580e992f1e94290f00f35768","category":{"_id":"5792a0baf967f617000d9e77","project":"56d55013075dfa0b00be98e6","__v":0,"version":"56d55014075dfa0b00be98e9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-22T22:39:54.708Z","from_sync":false,"order":3,"slug":"books","title":"Books"},"version":{"_id":"56d55014075dfa0b00be98e9","__v":16,"project":"56d55013075dfa0b00be98e6","createdAt":"2016-03-01T08:17:24.051Z","releaseDate":"2016-03-01T08:17:24.051Z","categories":["56d55014075dfa0b00be98ea","56d55036c8c687150071efb3","56d55094b939870b005129e2","56d550ae5acf9f0b00f735d0","56d5537ac8c687150071efbf","573cae191000320e00918252","573cbe15f320ae29009dbd94","5792a0baf967f617000d9e77","5792a0c023106419009c4302","58093f2994bc150f00f2fe47","580940f33c22790f00fd1e98","58094c01e5998d0f00d29b5d","58101442c03f0b0f0097f099","581020f07c59d72500b85add","581032c708d8050f00948d2a","5810e6ca08d8050f00948dcf"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Archy","version_clean":"1.0.0","version":"1"},"parentDoc":null,"user":"573caf66f320ae29009dbd5b","__v":3,"project":"56d55013075dfa0b00be98e6","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-24T23:28:47.380Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"get","results":{"codes":[{"status":200,"name":"Response -1","code":"{\n  \"status\": \"error\",\n  \"response\": -1,\n  \"message\": \"invalid asin or isbn\",\n  \"ia_identifiers\": [],\n  \"books\": [],\n  \"related_books\": [],\n  \"component_response_times\": [],\n  \"response_time\": 0.0002\n}","language":"json"},{"code":"{\n  \"status\": \"ok\",\n  \"response\": 0,\n  \"message\": \"we have this book\",\n  ia_identifiers: \n    {\n      ia_identifier: \"lorem00ipsum\",\n      score: 1\n    },\n  response_time: 0.1064\n}","language":"text","status":200,"name":"Response 0"},{"status":200,"name":"Response 0","code":"{\n  \"status\": \"ok\",\n  \"response\": 0,\n  \"message\": \"we don't have this book\",\n  ia_identifiers: [],\n  response_time: 0.1064\n}","language":"text"}]},"settings":"573c9bbf06d222170092abda","auth":"required","params":[{"_id":"580e9b2eb425ff0f00550403","ref":"","in":"query","required":false,"desc":"A 10 or 13 character ISBN with no dashes or spaces, or a 10 character ASIN","default":"","type":"string","name":"isbn"},{"_id":"580e9b2eb425ff0f00550402","ref":"","in":"query","required":false,"desc":"False by default. Set to true to include more info in response","default":"false","type":"boolean","name":"debug"},{"_id":"590c052545fd2e0f00da5f4f","ref":"","in":"query","required":false,"desc":"False by default. Set to true to include books that have not been scanned yet. This includes donation items, which are lists of isbns and related isbns of books that have been donated to Internet Archive but which we have no schedule to digitize.","default":"false","type":"boolean","name":"include_unscanned_books"}],"url":"/book/v1/do_we_have_it/?isbn=:isbn&debug=:debug&include_unscanned_books=:include_unscanned_books"},"isReference":false,"order":7,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Do We Have It API\"\n}\n[/block]\nBook \"do we have it\" can be queried by either `ISBN` or `ASIN`. There are plans to also support `title`.\n\nEither an ASIN or ISBN can be submitted for the `isbn` key. The API will detect whether the value is an ASIN or an ISBN.\n\nWhen the API request if received by the IA server, the server is looking for different identifiers that may be related to the queried identifier, for example: related ISBNs or ASINs, related items that exist in IA’s collections, etc.\n\nBased on the data that the IA has on these related items, it calculates an response status and responds with the following fields:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  status: \\\"ok\\\",\\n  response: 0,\\n  message: \\\"we have this book\\\",\\n  ia_identifiers: \\n    {\\n      ia_identifier: \\\"lorem00ipsum\\\",\\n      score: 1\\n    },\\n  response_time: 0.1064\\n}\",\n      \"language\": \"text\",\n      \"name\": \"Typical Response\"\n    }\n  ]\n}\n[/block]\n**status**\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"OK\",\n    \"0-1\": \"The input string seems to be valid\",\n    \"1-0\": \"Error\",\n    \"1-1\": \"There's an error with the input string or the service\",\n    \"h-0\": \"Value\",\n    \"h-1\": \"Information\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n**response/message**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Response\",\n    \"h-1\": \"Message\",\n    \"0-0\": \"-1\",\n    \"0-1\": \"invalid asin or isbn\",\n    \"1-0\": \"0\",\n    \"1-1\": \"we have this book\",\n    \"2-0\": \"1\",\n    \"2-1\": \"we don't have this book\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n**ia_identifiers** - An array of globally unique IDs of items on archive.org that are related to the input (either have the same asin/isbn/oclc/lccn or have a related asin/isbn/oclc/lccn) \n**response time** - The time it took for IA’s server to generate the response\n**score** - 1 if the book is an exact match, 0.5 if it's a related match\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Debug Info\"\n}\n[/block]\nAdditional fields are returned when &debug=true is added to the end of the query\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  status: \\\"ok\\\",\\n  response: 0,\\n  message: \\\"we have this book\\\",\\n  ia_identifiers: \\n    [\\n      ia_identifier: \\\"9783791535661\\\",\\n      score: 1\\n    ],\\n  books: \\n    {\\n      9783791535661: \\n        {\\n          metadata: \\n            {\\n              title: \\\"DWWIAPI4Dummies\\\",\\n              imagecount: \\\"1\\\",\\n              isbn: \\\"9783791535661\\\",\\n              identifier: \\\"DWNIAPI18R3\\\",\\n              mediatype: \\\"texts\\\",\\n              creator: \\\"DWNI, API\\\",\\n              related-external-id:[ \\n                \\\"urn:isbn:3833722509\\\",\\n                \\\"urn:asin:276776144\\\",\\n                \\\"urn:oclc:723876752\\\",\\n                \\\"urn:lccn:836890281\\\"\\n              ]\\n            },\\n        }\\n    },\\n  component_response_times: \\n    {\\n      search: 0.0531,\\n      sort: 0.0001\\n    },\\n  query: \\\"mediatype:texts AND (isbn:TESTISBN00018 OR related-external-id:\\\"urn:isbn:TESTISBN00018\\\")\\\",\\n  response_time: 0.0749\\n}\",\n      \"language\": \"text\",\n      \"name\": \"Response w/ Debug Info\"\n    }\n  ]\n}\n[/block]\n**books**  - contains further metadata and internal algorithm results about the items from  **ia_identifiers**\n**title** - the name of the item\n**imagecount** - number of scanned/uploaded image files that are associated to this book\n**isbn** - ISBN/ASIN that associated to this book\n**creator** - Writer/Illustrator/etc. that are related to this book\n**related-external-id** - if available, an array of other asin/isbn/oclc/lccn that are related to this book, available in urn format\n**query**  - the query that’s used internally by the IA system to create this response","excerpt":"","slug":"do-we-have-it","type":"endpoint","title":"Book Holdings API"}

getBook Holdings API


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

isbn:
string
A 10 or 13 character ISBN with no dashes or spaces, or a 10 character ASIN
debug:
booleanfalse
False by default. Set to true to include more info in response
include_unscanned_books:
booleanfalse
False by default. Set to true to include books that have not been scanned yet. This includes donation items, which are lists of isbns and related isbns of books that have been donated to Internet Archive but which we have no schedule to digitize.

Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Do We Have It API" } [/block] Book "do we have it" can be queried by either `ISBN` or `ASIN`. There are plans to also support `title`. Either an ASIN or ISBN can be submitted for the `isbn` key. The API will detect whether the value is an ASIN or an ISBN. When the API request if received by the IA server, the server is looking for different identifiers that may be related to the queried identifier, for example: related ISBNs or ASINs, related items that exist in IA’s collections, etc. Based on the data that the IA has on these related items, it calculates an response status and responds with the following fields: [block:code] { "codes": [ { "code": "{\n status: \"ok\",\n response: 0,\n message: \"we have this book\",\n ia_identifiers: \n {\n ia_identifier: \"lorem00ipsum\",\n score: 1\n },\n response_time: 0.1064\n}", "language": "text", "name": "Typical Response" } ] } [/block] **status** [block:parameters] { "data": { "0-0": "OK", "0-1": "The input string seems to be valid", "1-0": "Error", "1-1": "There's an error with the input string or the service", "h-0": "Value", "h-1": "Information" }, "cols": 2, "rows": 2 } [/block] **response/message** [block:parameters] { "data": { "h-0": "Response", "h-1": "Message", "0-0": "-1", "0-1": "invalid asin or isbn", "1-0": "0", "1-1": "we have this book", "2-0": "1", "2-1": "we don't have this book" }, "cols": 2, "rows": 3 } [/block] **ia_identifiers** - An array of globally unique IDs of items on archive.org that are related to the input (either have the same asin/isbn/oclc/lccn or have a related asin/isbn/oclc/lccn) **response time** - The time it took for IA’s server to generate the response **score** - 1 if the book is an exact match, 0.5 if it's a related match [block:api-header] { "type": "basic", "title": "Debug Info" } [/block] Additional fields are returned when &debug=true is added to the end of the query [block:code] { "codes": [ { "code": "{\n status: \"ok\",\n response: 0,\n message: \"we have this book\",\n ia_identifiers: \n [\n ia_identifier: \"9783791535661\",\n score: 1\n ],\n books: \n {\n 9783791535661: \n {\n metadata: \n {\n title: \"DWWIAPI4Dummies\",\n imagecount: \"1\",\n isbn: \"9783791535661\",\n identifier: \"DWNIAPI18R3\",\n mediatype: \"texts\",\n creator: \"DWNI, API\",\n related-external-id:[ \n \"urn:isbn:3833722509\",\n \"urn:asin:276776144\",\n \"urn:oclc:723876752\",\n \"urn:lccn:836890281\"\n ]\n },\n }\n },\n component_response_times: \n {\n search: 0.0531,\n sort: 0.0001\n },\n query: \"mediatype:texts AND (isbn:TESTISBN00018 OR related-external-id:\"urn:isbn:TESTISBN00018\")\",\n response_time: 0.0749\n}", "language": "text", "name": "Response w/ Debug Info" } ] } [/block] **books** - contains further metadata and internal algorithm results about the items from **ia_identifiers** **title** - the name of the item **imagecount** - number of scanned/uploaded image files that are associated to this book **isbn** - ISBN/ASIN that associated to this book **creator** - Writer/Illustrator/etc. that are related to this book **related-external-id** - if available, an array of other asin/isbn/oclc/lccn that are related to this book, available in urn format **query** - the query that’s used internally by the IA system to create this response

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}