Discover/OpenStax API
live

OpenStax APIopenstax.org

Access structured data from 60+ OpenStax textbooks: book metadata, full table of contents, and learning outcomes organized by chapter and section.

Endpoint health
verified 3d ago
get_learning_outcomes
list_books
get_book_toc
3/3 passing latest checkself-healing
Endpoints
3
Updated
26d ago

What is the OpenStax API?

The OpenStax API gives programmatic access to 60+ free textbooks across Business, Science, Math, Social Sciences, Humanities, Computer Science, and Nursing. Three endpoints cover book discovery, table-of-contents retrieval, and learning-outcome extraction. The get_learning_outcomes endpoint returns verbatim objective statements organized by chapter and section, with an optional chapter filter to scope results for large books.

Try it
Filter by subject area. Case-insensitive partial match against book subjects. Common values include 'Business', 'Science', 'Math', 'Social Sciences', 'Humanities', 'Computer Science'. If omitted or empty, returns all live books.
api.parse.bot/scraper/97903193-4df4-40f4-8924-422c78e72ed7/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/97903193-4df4-40f4-8924-422c78e72ed7/list_books?subject=Business' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace openstax-org-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: OpenStax Textbooks SDK — browse catalog, inspect TOC, extract learning outcomes."""
from parse_apis.openstax_textbooks_api import OpenStax, Subject, BookNotFound

client = OpenStax()

# List science textbooks — limit= caps total items fetched.
for book in client.books.list(subject=Subject.SCIENCE, limit=5):
    print(book.title, book.slug, book.subjects)

# Drill into one book's table of contents via constructible key.
bio = client.book(slug="biology-2e")
toc = bio.toc()
print(toc.book_title, len(toc.chapters), "chapters")
for ch in toc.chapters[:3]:
    print(ch.title, ch.sections)

# Extract learning outcomes for chapter 1 of the same book.
outcomes = bio.learning_outcomes(chapter="1")
print(outcomes.total_learning_outcomes, "outcomes across", outcomes.total_sections_with_outcomes, "sections")
for section in outcomes.chapters[0].sections[:2]:
    print(section.section_title, section.learning_outcomes)

# Typed error handling for an invalid slug.
try:
    client.book(slug="nonexistent-book-xyz").toc()
except BookNotFound as exc:
    print(f"Book not found: {exc.book_slug}")

print("exercised: books.list / book.toc / book.learning_outcomes / BookNotFound")
All endpoints · 3 totalmissing one? ·

List all available OpenStax textbooks with their titles, slugs, subjects, and content IDs. Optionally filter by subject area. Returns only books with 'live' or 'new_edition_available' state. No pagination — the full catalog (~60 books) is returned in one response.

Input
ParamTypeDescription
subjectstringFilter by subject area. Case-insensitive partial match against book subjects. Common values include 'Business', 'Science', 'Math', 'Social Sciences', 'Humanities', 'Computer Science'. If omitted or empty, returns all live books.
Response
{
  "type": "object",
  "fields": {
    "books": "array of book objects with title, slug, subjects, cnx_id, book_state",
    "total": "integer total count of books returned"
  },
  "sample": {
    "data": {
      "books": [
        {
          "slug": "anatomy-and-physiology-2e",
          "title": "Anatomy and Physiology 2e",
          "cnx_id": "4fd99458-6fdf-49bc-8688-a6dc17a1268d",
          "subjects": [
            "Science"
          ],
          "book_state": "live"
        }
      ],
      "total": 1
    },
    "status": "success"
  }
}

About the OpenStax API

Book Discovery

The list_books endpoint returns all textbooks currently in a live or new_edition_available state. Each record includes the book title, URL slug, subjects array, cnx_id (the OpenStax content identifier), and book_state. An optional subject parameter accepts a case-insensitive partial match, so filtering by 'Science' returns Biology, Chemistry, Physics, and related titles without requiring an exact string.

Table of Contents

get_book_toc accepts a book_slug from list_books and returns the full chapter-section hierarchy. The chapters array nests section objects, each carrying a title and slug. The response also echoes book_title and subjects so callers can confirm they fetched the right book without a separate lookup. Large books like *University Physics* return dozens of chapters and hundreds of sections.

Learning Outcomes

get_learning_outcomes is the most data-dense endpoint. For each section that has defined objectives, it returns the verbatim learning_outcomes strings alongside section_title and section_slug. The response includes total_learning_outcomes and total_sections_with_outcomes counts at the top level. Because some books (Anatomy & Physiology, for example) carry hundreds of objectives, the optional chapter parameter—an integer string like '3'—limits the response to a single chapter. The chapter_filter field in the response confirms which filter was applied, or returns null when all chapters are included.

Reliability & maintenanceVerified

The OpenStax API is a managed, monitored endpoint for openstax.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when openstax.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official openstax.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a curriculum-alignment tool by mapping learning_outcomes strings to course standards across subjects.
  • Generate a structured study guide for any OpenStax book using the nested chapters and sections from get_book_toc.
  • Populate a course catalog or LMS with accurate book metadata (title, slug, subjects, cnx_id) from list_books.
  • Create chapter-by-chapter quiz banks derived from verbatim learning objective statements.
  • Filter OpenStax books by subject area to programmatically build reading lists for a specific discipline.
  • Track which sections have defined learning outcomes versus those that do not, using total_sections_with_outcomes against the total section count.
  • Sync OpenStax TOC structure into a knowledge graph or ontology for academic research tooling.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does OpenStax have an official developer API?+
OpenStax does not publish a general-purpose public developer API for programmatic access to book metadata, TOC structures, or learning outcomes. Their content is openly licensed, but there is no documented REST or GraphQL API intended for third-party developers.
What does `get_learning_outcomes` actually return, and how granular is it?+
It returns an array of chapters, each containing an array of sections. Each section object includes section_title, section_slug, and a learning_outcomes array of verbatim objective strings exactly as they appear in the textbook. The top-level fields total_learning_outcomes and total_sections_with_outcomes give aggregate counts for the full book (or filtered chapter) without having to iterate the nested structure.
Can I retrieve the full text or page content of a textbook section?+
Not currently. The API covers book metadata, table-of-contents hierarchy, and learning outcomes — not the prose, figures, or exercises within sections. You can fork this API on Parse and revise it to add an endpoint that returns section body content.
Are retired or draft OpenStax books included in `list_books` results?+
No. list_books filters to books with a book_state of live or new_edition_available only. Retired editions and unpublished drafts are excluded. If you need to track a specific older edition, you can fork the API on Parse and revise the state filter to include additional book states.
Does the `subject` filter in `list_books` support exact matching or multiple subjects at once?+
The filter is a single case-insensitive partial-match string. It matches against each book's subjects array but does not accept multiple values or boolean operators in one call. To retrieve books across two unrelated subjects, you would need to make separate requests and merge the results client-side. You can fork the API on Parse and revise it to support multi-value subject filtering.
Page content last updated . Spec covers 3 endpoints from openstax.org.
Related APIs in EducationSee all →
booksrun.com API
Search millions of books and get instant buyback quotes on BooksRun. Browse bestsellers and categories, view detailed book information, and check condition guidelines to understand buyback prices and acceptance criteria.
standardebooks.org API
Access Standard Ebooks' curated collection of free public domain ebooks. Search and filter by subject, retrieve full book details, and get direct download links in multiple formats including EPUB, AZW3, and KEPUB.
springer.com API
Search and retrieve metadata for millions of articles, books, and journals from Springer Nature's research library using DOI or ISBN lookups, with powerful filtering and pagination options. Get detailed information about academic publications including journal details, article metadata, and book information to power your research tools and discovery applications.
cfainstitute.org API
Access the complete CFA Program curriculum across all three levels, including topics, learning modules, and Learning Outcome Statements directly from official CFA Institute materials. Search and retrieve structured exam content to study efficiently, compare learning objectives, or build study tools.
bookshop.org API
Search for books by keyword or category, view detailed information like metadata and pricing, discover curated reading lists, and find independent bookstores near you on Bookshop.org. Filter results by format and browse new releases to discover your next read.
openalex.org API
Search and retrieve millions of academic papers, articles, and books from OpenAlex's comprehensive global research catalog to find scholarly works by topic, author, or citation. Discover detailed information about research publications including metadata, abstracts, and citation counts to stay current with academic literature in your field.
jstor.org API
Search and browse millions of academic articles, journals, and research issues from JSTOR's library, or retrieve specific articles and journal details to explore scholarly content by subject. Access peer-reviewed research across multiple disciplines to find the academic sources you need.
valorebooks.com API
Search for books and instantly compare prices across ValoreBooks' inventory while getting real-time buyback quotes for books you want to sell. Access detailed book information including pricing and resale values to find the best deals on textbooks and used books.