DevelopersDocsGuides
Examples
Server-side patterns for a worksheet, a tutor, and a game, using mathematics problems.
On this page
These examples call the mathematics search. Physics, informatics, quantitative reasoning, and biology use the same route and currently return no_eligible_problem. They are not shown here as working problem payloads.
Worksheet
Ask for a short batch of text-only problems, then print each statement with its attribution. Keep the ids and pass them as exclude_ids on the next run.
Tutor
Store the id from the first response. Later, load that problem with GET. The id is a UUID, not the public /p/[code] slug. Replace the sample id below with one you actually received.
Game
Draw one text-only mathematics problem from a wide Maths Rating window. difficulty and tolerance are required on this route. Show statement_md and the choices. Your game has to decide correctness on its own: the payload has no answer key. rating_confidence: "low" means you should not describe that rating as a precise measurement.
A subject with no problems
Handle 404 no_eligible_problem as an empty state, not as a bug in the key. This is the current result for physics:
{ : { : , : true }, : { : , : }}