> For the complete documentation index, see [llms.txt](https://bookshelf-scanner-api.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bookshelf-scanner-api.gitbook.io/docs/getting-started/bookshelf-scanner-api-docs.md).

# Bookshelf Scanner API Docs

Please contact me at <alexandre@devforgoodcollective.com> to get the API URL and key.

## Scan Books

<mark style="color:green;">`POST`</mark> `/scan-bookshelf`

Send a base64 image and receive a list of detected books, with multiple choices per book detected.

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| x-api-key    | `<api_key>`        |

**Body**

<table><thead><tr><th>Name</th><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>image_base64</code></td><td>string</td><td><p>Base64 image:</p><ul><li>max: 10Mo</li><li>jpeg/png/gif/webp</li><li>Starts with <code>data:image/</code></li></ul></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
[
	{
		"detectedTitle": "string",
		"detectedAuthors": "string",
		"detectedPublisher": "string",
		"detectedLanguage": "string ISO 639-1",
		"booksFound": [
			{
				"source": "hybrid | google | open_library",
				"title": "string",
				"subtitle": "string",
				"authors": "string",
				"publisher": "string",
				"isbn_13": "string",
				"isbn_10": "string",
				"language": "string ISO 639-1",
				"cover_url": "string",
				"relevance_score": number between 0-100
			},
		]
	}
]
```

{% endtab %}

{% tab title="401" %}

```json
{
  "error": "Invalid or inactive API key"
}
```

{% endtab %}
{% endtabs %}
