edX API & Scraper
The edX API returns online-course catalog data as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary search endpoint returns courses and programs with id, name, URL, type, program type, partner(s), level, languages and subject, and you can pull a detail, partners and subjects. It is built for education apps, course-aggregators and learning tools that need edX catalog data without a scraper. One ReefAPI key, one shared credit pool, the standard envelope.
edX identifiers, the course run key, and the fields that swap sides between actions
search and detail read from two different sources at edX, so the same course answers differently depending on which one you ask. This table is the mapping. Values were read live on 2026-08-27 from search for "python" and detail for HarvardX CS50P.
| Field | search returns | detail returns |
|---|---|---|
| id | UUID 2cc794d0-316d-42f7-bbfd-25c34e4cd5df | The same UUID |
| object_id | course-<uuid> or program-<uuid>, so the prefix tells you the kind | Not returned |
| slug | null on every row measured | learn/python/harvard-university-cs50-s-introduction-to-programming-with-python |
| chaining the two | Pass the row's url to detail, since slug is empty | Accepts either url or slug |
| availability | ["Available now"], which is also the filter value | ["Current"]. Two different vocabularies for the same state |
| price | Not carried by the catalogue index at all | {price 299, currency USD, free_audit_available true, offer_categories ["Partially Free","Paid"]} |
| enrollment | recent_enrollment_count 192,664 | enrollment_count 1,795,815 lifetime plus recent_enrollment_count 193,438 |
| weeks_to_complete, min_effort, max_effort | 10, 3 and 9 | null, null and null |
| partner | "Harvard University", which is also the filter value | partners[] with name "Harvard University", key "HarvardX", slug "harvardx" |
| course run | Not returned | course_runs[] with key "course-v1:HarvardX+CS50P+Python", pacing_type "self_paced", start and end |
A search row carries program_type even when type is "Course": CS50P's row reads type "Course" with program_type "Professional Certificate", which names a program the course belongs to rather than describing the course. Test type first. There are no star ratings anywhere in this engine, because edX does not publish them, so rank on enrollment_count instead. Pagination is real here: 20 rows per page with meta.total_count 344 and meta.total_pages 18 for "python". partners returned 258 entries and subjects 33, each with a course_count.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/edx/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"query": "python"
}
}{
"ok": true,
"meta": {
"api": "edx",
"endpoint": "search",
"mode": "live",
"latency_ms": 796.3,
"record_count": 20,
"bytes": 161043,
"cache_hit": false,
"stop_reason": "limit_reached",
"page": 1,
"total_count": 345,
"total_pages": 18,
"has_more": true,
"next_page": 2,
"charged_credits": 1,
"version": "1.0.0"
},
"data": {
"results": [
{
"id": "2cc794d0-316d-42f7-bbfd-25c34e4cd5df",
"object_id": "course-2cc794d0-316d-42f7-bbfd-25c34e4cd5df",
"name": "CS50's Introduction to Programming with Python",
"type": "Course",
"program_type": "Professional Certificate",
"url": "https://www.edx.org/learn/python/harvard-university-cs50-s-introduction-to-programming-with-python",
"slug": null,
"partner": "Harvard University",
"partners": [
"Harvard University"
],
"level": "Introductory",
"languages": [
"English"
],
"subjects": [
"Computer Science",
"Data Analysis"
],
"availability": [
"Available now"
],
"weeks_to_complete": 10,
"min_effort": 3,
"max_effort": 9,
"subscription_eligible": null,
"recent_enrollment_count": 206954,
"skills": [
"Debugging",
"Python (Programming Language)",
"Boolean Expression"
],
"image": "https://prod-discovery.edx-cdn.org/media/course/image/2cc794d0-316d-42f7-bbfd-25c34e4cd5df-033e46d516c0.png",
"short_description": "An introduction to programming using Python, a popular language for general-purpose programming, data science, web programming, and more."
},
{
"id": "381a0046-5d78-4790-8776-74620d59f48e",
"object_id": "course-381a0046-5d78-4790-8776-74620d59f48e",
"name": "Python Basics for Data Science",
"type": "Course",
"program_type": "Professional Certificate",
"url": "https://www.edx.org/learn/python/ibm-python-basics-for-data-science",
"slug": null,
"partner": "IBM",
"partners": [
"IBM"
],
"level": "Intermediate",
"languages": [
"English"
],
"subjects": [
"Data Analysis",
"Engineering",
"Computer Science"
],
"availability": [
"Available now"
],
"weeks_to_complete": 3,
"min_effort": 4,
"max_effort": 10,
"subscription_eligible": null,
"recent_enrollment_count": 9584,
"skills": [
"Data Science",
"Python (Programming Language)",
"Machine Learning"
],
"image": "https://prod-discovery.edx-cdn.org/media/course/image/381a0046-5d78-4790-8776-74620d59f48e-e2e7f4677ce2.jpeg",
"short_description": "This Python course provides a beginner-friendly introduction to Python for Data Science. Practice through lab exercises, and you'll be ready to create your first Python scripts on your own!"
},
{
"id": "e250b08e-be2a-4b48-a43c-c9ae47f6cf14",
"object_id": "program-e250b08e-be2a-4b48-a43c-c9ae47f6cf14",
"name": "Computer Science for Python Programming",
"type": "Program",
"program_type": "Professional Certificate",
"url": "https://www.edx.org/certificates/professional-certificate/harvardx-computer-science-for-python-programming",
"slug": null,
"partner": "Harvard University",
"partners": [
"Harvard University"
],
"level": "Introductory",
"languages": [
"English"
],
"subjects": [
"Computer Science",
"Engineering",
"Data Analysis"
],
"availability": [
"Available now"
],
"weeks_to_complete": null,
"min_effort": null,
"max_effort": null,
"subscription_eligible": null,
"recent_enrollment_count": 503082,
"skills": [
"Web Browsers",
"Debugging",
"Python (Programming Language)"
],
"image": "https://prod-discovery.edx-cdn.org/media/programs/card_images/e250b08e-be2a-4b48-a43c-c9ae47f6cf14-a3f24d7ea4f3.jpg",
"short_description": "This is CS50x and CS50P offered together in one program as an introduction to programming with Python - Harvard University's introduction to the intellectual enterprises of computer science and the art of programming using a language called Python."
}
]
}
}What the edX API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| search | Search the edX catalogue by keyword (any topic, skill, tool or course/program title — 'python', 'machine learning', 'data science', 'cybersecurity', 'finance'). Returns a paginated list of result cards: name, url, type (course / program / executive education / degree), partner, level, languages, subjects, duration, effort, price, skills and enrollment. Optional filters: level, type, program_type, language, subject, partner, availability. Page with `page` (20 per page); meta.has_more / meta.total_count tell you how many. Feed a result's slug/url into the detail action. | Content platforms call search to search the edX catalogue by keyword (any topic, skill, tool or course/program title. | query, level, type, program_type, language, ... |
| detail | Full detail for one edX course OR program by slug or URL. For a course: level, languages, duration, effort, price, enrollment count, full description, what-you'll-learn, overview, prerequisites, syllabus, skills, subjects, partners, instructors (faculty) and course runs (sessions). For a program (professional certificate / MicroMasters / XSeries / degree): the same plus the list of courses inside it. Pass a search result's url or slug. | Research tools call detail to get full detail for one edX course OR program by slug or URL. | slug, url |
| partners | Browse every school, university and company that publishes on edX (Harvard, MIT, IBM, Google Cloud, Stanford, Delft, …) with the number of courses/programs each offers. Use a partner name as the search `partner` filter. | Community analysts call partners to get browse every school, university and company that publishes on edX (Harvard, MIT, IBM, Google…. | none |
| subjects | Browse edX's subject areas (Computer Science, Business & Management, Data Analysis & Statistics, Engineering, Economics & Finance, …) with the number of courses in each. Use a subject name as the search `subject` filter. | Media monitors call subjects to get browse edX's subject areas (Computer Science, Business & Management, Data Analysis & Statisti…. | none |
Call search from your stack
curl -X POST https://api.reefapi.com/edx/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"query":"python"}'import requests
r = requests.post(
"https://api.reefapi.com/edx/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"query": "python"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/edx/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"query": "python"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.edx.search with {"query":"python"}.Who uses this API and why
- Course-aggregators call search to list edX courses and programs by subject and level.
- Learning apps use detail to show course info, partner and language options.
- Skills tools use subjects and partners to map learning paths across providers.
Questions developers ask before integrating
Why is slug null on every search result?
Because edX's catalogue index does not store one; the slug only exists on the course page itself. On a live search for "python" all 20 rows returned slug null while url was fully populated. Pass that url straight to detail, which parses the path itself and returns the slug for you. Trying to reconstruct a slug from the name will not work, because edX's slugs prefix the subject and the partner, as in learn/python/harvard-university-cs50-s-introduction-to-programming-with-python.
Does the API return the course price?
detail does. CS50P returned price {price: 299, currency: "USD", free_audit_available: true, offer_categories: ["Partially Free","Paid"]}. The 299 is the verified-certificate price and free_audit_available true means the course content itself can be taken for nothing. Search rows carry no price, because the catalogue index does not hold one. This is the opposite of the Coursera engine, which publishes no price on any action, and unlike the Udemy engine there is no separate list price to reconcile.
How do I tell a self-paced course from a scheduled session?
Read course_runs[].pacing_type, which was "self_paced" for CS50P. Each run also carries key, title, start, end, availability and marketing_url, and the top-level active_run_key names the run currently being sold, "course-v1:HarvardX+CS50P+Python". A course with several scheduled sessions returns several runs with different start dates and pacing_type "instructor_paced".
Why are there two enrollment numbers?
enrollment_count is lifetime and recent_enrollment_count is a trailing window. detail for CS50P returned 1,795,815 and 193,438 respectively on 2026-08-27. Only the recent figure appears on search rows, so if you sort search results by enrollment you are sorting by current momentum, not by all-time popularity. Call detail when you need the lifetime number.
Does edX expose star ratings or reviews?
No. There is no rating, review_count or reviews action in this engine, because edX does not publish learner ratings on its course pages the way Coursera and Udemy do. The closest available quality signals are enrollment_count, recent_enrollment_count and the partner's own reputation, all of which come back on detail.
Why does availability say "Available now" in search and "Current" in detail?
The two sources use different label sets for the same state. The search filter and search rows use "Available now", "Upcoming" and "Archived"; detail returns edX's internal course-run status, which reads "Current". Both are arrays, not strings. Normalize on ingest rather than string-comparing across the two actions.
Why are weeks_to_complete and the effort fields null on detail?
Because on a course, effort lives on the run rather than on the product record, and the catalogue index is the one that flattens it. A live search row for CS50P carried weeks_to_complete 10, min_effort 3 and max_effort 9, while detail for the same course returned all three as null. If you want the duration and the price together, take the duration from search and the price from detail.
What is partners[].key, and how does it relate to the run key?
It is the Open edX organization code, "HarvardX" for Harvard University, and it is the first segment of the run key: course-v1:HarvardX+CS50P+Python. The search partner filter wants the display name instead, "Harvard University", exactly as the partners action lists it. That action returned 258 publishers with course counts on 2026-08-27, led by IBM at 261, Harvard at 213, Delft at 212 and Google Cloud at 204.
What is the edX API?
edX API is a ReefAPI endpoint group for edx It returns live JSON through POST requests under /edx/v1.
Is the edX API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. edX calls use the same shared credit balance as every other ReefAPI engine.
Do I need an edX login or account?
No login to edX is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the edX data?
The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the edX API use?
edX actions currently cost 1 credit per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.
Can I call edX from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call edx actions with the same key, credit pool and JSON envelope used by normal REST requests.