PlanetMath APIplanetmath.org ↗
Access PlanetMath encyclopedia entries, MSC subject classifications, alphabetical indexes, and related-topic graphs via a structured JSON API.
What is the PlanetMath API?
The PlanetMath API exposes 7 endpoints covering the full encyclopedia at planetmath.org, including entry content, MSC subject classifications, alphabetical browsing, and keyword search. The get_entry endpoint returns a single article's title, full HTML and plain-text content, MSC code, related topics, defined terms, author, and dates. The get_subject_index endpoint maps all ~60 top-level MSC categories to their listed entries in one call.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/a75dd142-0fda-4d83-8209-6ebcb3861cf8/get_subject_index' \ -H 'X-API-Key: $PARSE_API_KEY'
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 planetmath-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: PlanetMath SDK — browse MSC categories, search entries, fetch details."""
from parse_apis.planetmath_api import PlanetMath, CategoryCode, ResourceNotFound
planetmath = PlanetMath()
# Browse MSC classification categories
for category in planetmath.msccategories.list(limit=5):
print(category.code, category.name)
# Search entries by keyword
for summary in planetmath.entrysummaries.search(query="topology", limit=5):
print(summary.canonical_name, summary.title)
# Drill into a specific entry by canonical name
entry = planetmath.entries.get(canonical_name="axiom")
print(entry.title, entry.content_text[:120])
# Explore related topics from an entry
relations = entry.related_topics()
print(relations.title, relations.related_topic, relations.define)
# Navigate via constructible MSC category to its entries
number_theory = planetmath.msccategory(code="11")
for entry_summary in number_theory.entries.list(limit=3):
print(entry_summary.canonical_name, entry_summary.title)
# Browse the full alphabetical index grouped by letter
alpha_index = planetmath.alphabeticalindexes.browse()
print(alpha_index.groups.keys())
# Typed error handling for missing entries
try:
planetmath.entries.get(canonical_name="nonexistent_entry_xyz")
except ResourceNotFound as exc:
print(f"Entry not found: {exc}")
print("exercised: msccategories.list / entrysummaries.search / entries.get / entry.related_topics / msccategory.entries.list / alphabeticalindexes.browse")
Scrape the full MSC (Mathematics Subject Classification) subject index, returning all top-level subject categories with the entries listed under each. Each category contains its MSC code, human-readable name, HTML anchor ID, and a list of entry summaries. Returns approximately 60 categories. A single network round-trip fetches the entire index.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of category objects, each containing category_code, category_name, category_id, and entries array"
},
"sample": {
"data": {
"categories": [
{
"entries": [
{
"title": "AdHoc",
"canonical_name": "AdHoc"
},
{
"title": "Dimension",
"canonical_name": "Dimension"
}
],
"category_id": "#00_General",
"category_code": "00",
"category_name": "00_General"
},
{
"entries": [
{
"title": "AbelianNumberField",
"canonical_name": "AbelianNumberField"
}
],
"category_id": "#11_Number_theory",
"category_code": "11",
"category_name": "11_Number_theory"
}
]
},
"status": "success"
}
}About the PlanetMath API
Entry Content and Metadata
The get_entry endpoint accepts a canonical_name slug (case-sensitive, e.g. FermatsLittleTheorem or axiom) and returns title, content_html, content_text, keywords, and a metadata object containing fields such as msc, related_topic, defines, entry_type, author, and dates. If you only need the dependency graph for an entry rather than the full article body, get_entry_related_topics returns the related_topic and define arrays alone, avoiding the overhead of the full content payload.
MSC Classification Hierarchy
get_msc_hierarchy returns all top-level MSC category code and name pairs (approximately 60 categories, e.g. 11 → 11_Number_theory). get_subject_index extends this by including each category's entries as an array of canonical_name and title objects. To query a specific MSC category directly, get_entries_by_msc_category accepts a category_code string and matches with or without leading zeros, so both '03' and '3' resolve to Mathematical Logic.
Alphabetical Browsing and Search
get_alphabetical_index returns the entire encyclopedia grouped by first character (0–9, A–Z), each group containing canonical_name and title for every entry under that letter. The search_entries endpoint accepts a query string of one or more space-separated keywords and applies case-insensitive substring AND-matching against entry titles and slugs across the full index, returning a flat results array of canonical_name and title matches.
Building Concept Graphs
Because get_entry_related_topics exposes both related_topic (entries this one references) and define (terms this entry formally defines), you can traverse the encyclopedia as a directed graph. Starting from a single slug and recursively calling the endpoint builds a dependency tree showing which prerequisite concepts underlie a given theorem or definition.
The PlanetMath API is a managed, monitored endpoint for planetmath.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when planetmath.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 planetmath.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.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a prerequisite graph for a mathematics curriculum by traversing
related_topicanddefinefields across entries. - Populate a math reference tool with full article text and MSC classification using
get_entry. - Index all entries under a specific MSC code (e.g. '54' for Topology) with
get_entries_by_msc_category. - Implement autocomplete for mathematical terms by querying
get_alphabetical_indexand filtering client-side. - Search for entries matching multiple keywords (e.g. 'prime field') using
search_entrieswith AND logic. - Generate a structured map of PlanetMath's ~60 subject areas using
get_msc_hierarchyfor a course navigator. - Extract defined terms from an entry to identify concept boundaries for a knowledge graph node.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 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.
Does PlanetMath have an official developer API?+
What does `get_entry` return beyond the article text?+
content_html and content_text, the response includes a metadata object with fields for msc (subject classification), related_topic, defines, entry_type, author, and dates. A keywords array is also returned from the page's meta tag.Does `search_entries` support full-text search within article bodies?+
search_entries matches the query keywords only against entry titles and canonical name slugs. Article body content is not searched. You can fork this API on Parse and revise it to add a body-content search endpoint if full-text matching is required.Are user comments, forum threads, or revision history available?+
How case-sensitive are canonical name lookups?+
get_entry and get_entry_related_topics treat the canonical_name parameter as case-sensitive, matching PlanetMath's own URL scheme. Both lowercase slugs like axiom and CamelCase slugs like FermatsLittleTheorem are valid, but the case must match exactly the slug as it appears on PlanetMath.