{"_id":"59121415fecdb90f003580e2","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"},"project":"56d55013075dfa0b00be98e6","githubsync":"","__v":3,"user":"573cb45cced73c20002cf5a2","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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-09T19:10:13.638Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"code":"","language":"text"}]},"settings":"573c9bbf06d222170092abda","examples":{"codes":[]},"method":"get","auth":"required","params":[{"_id":"5bbd3b8373abaf00034e2597","ref":"","in":"query","required":false,"desc":"A 10-digit ASIN or a 10-digit or 13-digit ISBN. To use strict isbn mode, use isbn as the query param instead.","default":"","type":"string","name":"asin"},{"_id":"5bbd3b8373abaf00034e2596","ref":"","in":"query","required":false,"desc":"Include extra output about the search results (see below).","default":"false","type":"string","name":"debug"},{"_id":"5bbd3b8373abaf00034e2595","ref":"","in":"query","required":false,"desc":"","default":"false","type":"string","name":"ignore_donation_items"}],"url":"/book/v1/do_we_have_it/?isbn=:isbn&debug=:debug&ignore_donation_items=:ignore_donation_items"},"isReference":false,"order":999,"body":"Do we want it is an API that determines whether or not Internet Archive needs a physical book for our collection. It can be queried by a 10 or 13 digit ISBN or a 10-character ASIN.\n\nEither an ASIN or ISBN can be submitted for the `asin` key. The API will detect whether the value is an ASIN or an ISBN. Using `isbn` as the key instead of `asin` will cause the API to reject ASINs as invalid.\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 a response status and responds with the following fields:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  status: \\\"ok\\\",\\n  response: 3,\\n  message: \\\"we have already scanned this book, but need another physical copy for ourselves\\\",\\n  ia_identifiers: \\n    {\\n      ia_identifier: \\\"lorem00ipsum\\\",\\n      score: 1\\n    },\\n  response_time: 0.1064\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Typical Response\"\n    }\n  ]\n}\n[/block]\n**status**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Value\",\n    \"h-1\": \"Information\",\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\"\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 don't need this book\",\n    \"2-0\": \"1\",\n    \"2-1\": \"we need to scan this book\",\n    \"3-0\": \"2\",\n    \"3-1\": \"we have already scanned this book, but need another physical copy for a partner\",\n    \"4-0\": \"3\",\n    \"4-1\": \"we have already scanned this book, but need another physical copy for ourselves\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\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\nNote: As long as the API is working, it will always give a 200 OK HTTP response, as even \"negative\" responses may contain useful information for the caller.\n\nNote: Currently, the API will never return a \"2\" response.\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{\\n  status: \\\"ok\\\",\\n  response: 3,\\n  message: \\\"we have already scanned this book, but need another physical copy for ourselves\\\",\\n  ia_identifiers: \\n    [\\n      ia_identifier: \\\"9783791535661\\\",\\n      score: 1\\n    ],\\n  books: \\n    {\\n      9783791535661: \\n        {\\n          metadata: \\n            {\\n              sort_status: \\\"NEED\\\",\\n              title: \\\"DWWIAPI4Dummies\\\",\\n              imagecount: \\\"1\\\",\\n              isbn: \\\"9783791535661\\\",\\n              identifier: \\\"DWNIAPI18R3\\\",\\n              mediatype: \\\"texts\\\",\\n              boxid: \\\"IA1234567\\\",\\n              creator: \\\"DWNI, API\\\",\\n              boxid_2: \\\"CH123456\\\",\\n              related-external-id:[ \\n                \\\"urn:isbn:3833722509\\\",\\n                \\\"urn:asin:276776144\\\",\\n                \\\"urn:oclc:723876752\\\",\\n                \\\"urn:lccn:836890281\\\"\\n              ]\\n            },\\n          scanned: true,\\n          china_has: true,\\n          need_second: true,\\n          in_transit: false\\n        }\\n    },\\n  related_books: [],\\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.0532\\n}\",\n      \"language\": \"json\",\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 - **boxid, boxid_2,sort_status** - information that’s related to a physical copy of the book, if available. Used to calculate the following fields, and consequently to calculate the **status/response/message** for the original query\n**related_books** - a list of books similar to **books**, but for books who appear to be a \"related\" match, I.E. another printing or edition of the book with the queried isbn.\n**component_response_times** - Detailed information about the response time\n**query**  - the query that’s used internally by the IA system to create this response\n**response_time** - the total response time for the query\n[block:api-header]\n{\n  \"title\": \"Ignore Donation Items\"\n}\n[/block]\nBy default, the API includes books that have been donated to Internet Archive but not yet scanned in its response. Including `&ignore_donation_items=true` in the request will force the API to ignore these items when processing search results, allowing a caller that is handling items from this category to tell whether they should digitize the book.\n\nThis is used in our scanningcenters when digitizing donated books, essentially answering the question, \"do we have a copy of this book that is *not* the donated one,\" allowing us to dedupe books which have been acquired and digitized from another source before we were able to scan the donated one.\n\nFor most callers, this param can be left out.","excerpt":"The Book Do-We-Want-It (DWWI) API","slug":"book-do-we-want-it-dwwi-api","type":"endpoint","title":"Book Do-We-Want-It API"}

getBook Do-We-Want-It API

The Book Do-We-Want-It (DWWI) API

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

asin:
string
A 10-digit ASIN or a 10-digit or 13-digit ISBN. To use strict isbn mode, use isbn as the query param instead.
debug:
stringfalse
Include extra output about the search results (see below).
ignore_donation_items:
stringfalse

Documentation

Do we want it is an API that determines whether or not Internet Archive needs a physical book for our collection. It can be queried by a 10 or 13 digit ISBN or a 10-character ASIN. Either an ASIN or ISBN can be submitted for the `asin` key. The API will detect whether the value is an ASIN or an ISBN. Using `isbn` as the key instead of `asin` will cause the API to reject ASINs as invalid. 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 a response status and responds with the following fields: [block:code] { "codes": [ { "code": "{\n status: \"ok\",\n response: 3,\n message: \"we have already scanned this book, but need another physical copy for ourselves\",\n ia_identifiers: \n {\n ia_identifier: \"lorem00ipsum\",\n score: 1\n },\n response_time: 0.1064\n}", "language": "json", "name": "Typical Response" } ] } [/block] **status** [block:parameters] { "data": { "h-0": "Value", "h-1": "Information", "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" }, "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 don't need this book", "2-0": "1", "2-1": "we need to scan this book", "3-0": "2", "3-1": "we have already scanned this book, but need another physical copy for a partner", "4-0": "3", "4-1": "we have already scanned this book, but need another physical copy for ourselves" }, "cols": 2, "rows": 5 } [/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 Note: As long as the API is working, it will always give a 200 OK HTTP response, as even "negative" responses may contain useful information for the caller. Note: Currently, the API will never return a "2" response. [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{\n status: \"ok\",\n response: 3,\n message: \"we have already scanned this book, but need another physical copy for ourselves\",\n ia_identifiers: \n [\n ia_identifier: \"9783791535661\",\n score: 1\n ],\n books: \n {\n 9783791535661: \n {\n metadata: \n {\n sort_status: \"NEED\",\n title: \"DWWIAPI4Dummies\",\n imagecount: \"1\",\n isbn: \"9783791535661\",\n identifier: \"DWNIAPI18R3\",\n mediatype: \"texts\",\n boxid: \"IA1234567\",\n creator: \"DWNI, API\",\n boxid_2: \"CH123456\",\n related-external-id:[ \n \"urn:isbn:3833722509\",\n \"urn:asin:276776144\",\n \"urn:oclc:723876752\",\n \"urn:lccn:836890281\"\n ]\n },\n scanned: true,\n china_has: true,\n need_second: true,\n in_transit: false\n }\n },\n related_books: [],\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.0532\n}", "language": "json", "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 - **boxid, boxid_2,sort_status** - information that’s related to a physical copy of the book, if available. Used to calculate the following fields, and consequently to calculate the **status/response/message** for the original query **related_books** - a list of books similar to **books**, but for books who appear to be a "related" match, I.E. another printing or edition of the book with the queried isbn. **component_response_times** - Detailed information about the response time **query** - the query that’s used internally by the IA system to create this response **response_time** - the total response time for the query [block:api-header] { "title": "Ignore Donation Items" } [/block] By default, the API includes books that have been donated to Internet Archive but not yet scanned in its response. Including `&ignore_donation_items=true` in the request will force the API to ignore these items when processing search results, allowing a caller that is handling items from this category to tell whether they should digitize the book. This is used in our scanningcenters when digitizing donated books, essentially answering the question, "do we have a copy of this book that is *not* the donated one," allowing us to dedupe books which have been acquired and digitized from another source before we were able to scan the donated one. For most callers, this param can be left out.

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 }}