The MixCache.com API lets your software or AI agent search our catalog and buy the full text of MixCache.com books, delivered as a plain Markdown text file, for your internal use. Read a free sample of any book before you buy, then purchase one book or up to 100 in a single call.
Which books are available? Only books published by MixCache.com itself (16,000+ titles). Browse the eligible books. Books by third-party authors and publishers, and books in the MixCache.com Extended Catalog, are not available through the API.
Price: $49.95 per book, charged in US dollars to the card saved on your account. No extra fees.
Internal use only: you may not publish, republish, share, resell or distribute the books, or any substantial part of them, anywhere, or present them as your own work. See the API Terms of Use.
mxc_live_…
and are shown once: store yours somewhere safe. Anyone with your key can buy books on your card, so revoke it right away if it leaks.Send your key with every request, in either header:
Authorization: Bearer mxc_live_your_key
X-API-Key: mxc_live_your_key
Base URL: https://mixcache.com/v1. Every response is JSON except the book text itself.
A machine-readable description is at /developers/openapi.json (OpenAPI 3.1).
GET /v1/search (free)Searches the eligible books, the same way search works on MixCache.com.
| Parameter | Description |
|---|---|
q | Required. Search words (title, subtitle, description, author). |
page, per_page | Paging. per_page defaults to 20, maximum 50. |
language | Optional: en, es, fr, it, de, pt, nl, zh. en also matches books whose language hasn't been detected yet. |
book_type | Optional: fiction or nonfiction. |
curl -H "Authorization: Bearer $KEY" "https://mixcache.com/v1/search?q=silk+road&book_type=nonfiction"
Each result has id, title, subtitle, author, book_type, language,
words (use it to choose by length), published_at, price, currency and cover_url.
GET /v1/books/{id} (free)Everything in a search result plus description, bullet_points, target_audience,
categories, table_of_contents, sections_total, a sample of the first 3 sections
(each {heading, text}), and owned (whether your account has already bought it). Read the sample to check a
book covers what you need before you buy.
POST /v1/purchaseOne call buys up to 100 books with a single charge to your saved card. List book ids and/or inclusive id ranges. A range includes only the eligible books inside it; any explicitly listed id that isn't eligible rejects the whole call, and nothing is charged. Books you already own are skipped and not charged.
curl -X POST "https://mixcache.com/v1/purchase" \
-H "Authorization: Bearer $KEY" \
-H "Idempotency-Key: order-2026-11-24-001" \
-H "Content-Type: application/json" \
-d '{"books": [18587, "12100-12150"]}'
?dry_run=1 to see exactly which books would be bought, which are skipped,
the total, your card, and your remaining daily limit. Nothing is charged.text_url for each, plus the total and a payment reference. A receipt is emailed to the account owner.GET /v1/books/{id}/textThe full book as plain Markdown text (text/markdown), for books your account has bought.
Add ?format=json to get {"sections": [{heading, text}, …]} instead.
curl -H "Authorization: Bearer $KEY" "https://mixcache.com/v1/books/18587/text" -o book.md
GET /v1/libraryEverything your account has bought, newest first, with a text_url for each, so you can download again at any time.
| Limit | Value |
|---|---|
| Books per purchase call | 100 |
| Daily spending limit | $500 per rolling 24 hours for new accounts. Need more? Request a higher limit on the API Access page. |
| Requests | 60 per minute per key. Responses carry X-RateLimit-Limit and X-RateLimit-Remaining; over the limit you get 429 with Retry-After. |
Licensing large portions of the catalog? Contact us.
Errors are JSON: {"error": {"code": "…", "message": "…"}}.
| Code | HTTP | Meaning |
|---|---|---|
invalid_api_key | 401 | Missing, unknown or revoked key. |
account_disabled | 403 | API access for this account is disabled. Contact support. |
not_found | 404 | Not a book available through the API, or an unknown endpoint. |
not_owned | 403 | Text requested for a book this account hasn't bought. |
invalid_request | 400 | Bad parameters or request body. |
ineligible_books | 400 | Lists ids that aren't available. Nothing was charged. |
too_many_books | 400 | More than 100 books in one call. Split it. |
idempotency_key_required | 400 | A real purchase needs an Idempotency-Key header. |
no_payment_method | 402 | No card on file. Save one under Manage Billing. |
card_declined | 402 | The card was declined. Nothing was charged. |
card_requires_authentication | 402 | The card needs the cardholder to approve each payment, so it can't be used for API purchases. Save a different card. |
daily_cap_exceeded | 402 | Over the daily spending limit. Shows your limit and what's left. |
purchase_in_progress | 409 | Another purchase for your account is running. Retry shortly. |
payment_error | 502 | The payment processor couldn't be reached. Retry with the same Idempotency-Key. |
rate_limited | 429 | Too many requests. Wait for Retry-After seconds. |
All sales are final, except duplicate or erroneous charges, which we refund. See the API Terms of Use.