DevelopersDocsStart
Quickstart
Ask for a key, store it on the server, and retrieve one mathematics problem.
Request a key
Email hello@problems.cc with the product you are building. An admin creates the key and sets its limits. The secret is shown once and starts with pcc_.
Store the key
Put it in an environment variable named PROBLEMS_API_KEY on the server that will call the API. Do not ship it in a browser bundle, a mobile app, or a public repository.
Call search
The production base URL is https://www.problems.cc/api/v1. Requests go to www.problems.cc under /api/v1.
Render the statement
- Read
problems[0].statement_mdand the choiceoption_mdfields. Both are Markdown with$math. - Prefer
images[].urlandchoices[].image_url. Resolve remaining markdown paths that start with/against the media origin. - Show
attribution.textnext to the problem. - Store
idif you want to fetch the same problem later, or pass it inexclude_idsto avoid a repeat. - If the status is 404 and
error.codeisno_eligible_problem, the allowlist had no match. That can happen for mathematics.
The shorter random route is mathematics-only and takes a flat body. Search is the route that understands subjects. The same key also works with MCP.