# Course Catalog Prerequisite Graph API

> Course Catalog Prerequisite Graph API is a paid API for AI agents from course-catalog-api.lewis-6d8.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Returns a prerequisite dependency graph for a specified university course, showing all courses required before enrollment.

## Facts

- Endpoint: POST https://course-catalog-api.lewis-6d8.workers.dev/prereq-graph
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/course-catalog-prerequisite-graph-api-56c51b55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_13I50h66OMm5UydgDzyLI

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability course-catalog-prerequisite-graph-api-56c51b55 -d '<json body>'
```

Example prompt: Can you pull up the full prerequisite graph for MIT course 6.046J — I want to see every course I'd need to complete before I can enroll in it?

## When to prefer this

Use this endpoint when you need structured prerequisite dependency data for a specific university course, particularly MIT, and want a graph representation suitable for academic planning, curriculum analysis, or automated advising workflows. Prefer this over general web search when you need machine-readable prerequisite chains rather than human-readable catalog pages.

## Known failure modes

- Institution slug not supported (only 'mit' is currently live) — may return an error or empty graph
- Invalid or unrecognized course code — returns empty or error response
- Network timeout on the Cloudflare Worker — transient 5xx error
- Cache staleness — use fresh:true to bypass cached data if results seem outdated
- Missing required fields (institution or target_course_code) — validation error

## How this service works

University course catalog + prerequisite graph data for agents.

## Output

A prerequisite dependency graph for the requested course, containing course nodes and their dependency relationships, showing every course required (directly or transitively) before the target course can be taken at the specified institution.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "institution",
  "target_course_code"
 ],
 "properties": {
  "fresh": {
   "type": "boolean",
   "description": "Bypass cache if true"
  },
  "institution": {
   "type": "string",
   "description": "Institution slug; currently 'mit' is the live institution"
  },
  "target_course_code": {
   "type": "string",
   "description": "Course code to build the prerequisite graph for"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/course-catalog-prerequisite-graph-api-56c51b55/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from course-catalog-api.lewis-6d8.workers.dev](https://www.zero.xyz/host/course-catalog-api.lewis-6d8.workers.dev/llms.txt)
