# Udemy API scraper — search courses by keyword, then pull course detail, live pricing, ratings, paginated student reviews and the full curriculum (chapters + lectures) for any Udemy course by URL, slug or id, plus discovery: browse every course by an instructor and walk the live category taxonomy. Returns title, headline, instructors, rating, subscriber count, level, language, what-you'll-learn, requirements, price/discount and the complete lecture outline. No API key required.

> Search Udemy courses by keyword (any topic, e.g. 'python', 'excel', 'machine learning'). Returns a paginated list of course cards — id, title, headline, instructors, rating, review count, level, duration, language — most-relevant first. Feed a result's course_id into detail / pricing / reviews / curriculum. Page with `page`; meta.has_more / meta.total_count tell you how many.
> ReefAPI engine `udemy` · 7 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/udemy/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /udemy/v1/search — 2 credits
Search Udemy courses by keyword (any topic, e.g. 'python', 'excel', 'machine learning'). Returns a paginated list of course cards — id, title, headline, instructors, rating, review count, level, duration, language — most-relevant first. Feed a result's course_id into detail / pricing / reviews / curriculum. Page with `page`; meta.has_more / meta.total_count tell you how many.

**Parameters:**
- `query` (string, required) — The keyword(s) to search Udemy courses for (a topic, skill, tool or course title — e.g. 'python', 'excel formulas', 'aws certified').
- `page` (integer, optional, default 1) — Page number (results are paginated). Page until meta.has_more is false.
- `page_size` (integer, optional, default 12) — Results per page (1-24, default 12).

**Returns:** results[]{course_id, title, headline, url, image, rating, num_reviews, num_lectures, instructional_level, video_length, locale, is_free, instructors[]{id, name}} + meta{page, has_more, next_page, total_count}

**Example request body:**
```json
{
  "query": "python"
}
```

### POST /udemy/v1/detail — 1 credit
Full course card for a Udemy course by URL, slug or id: title, headline, instructors, rating, review count, subscriber count, level, language, duration, price, category, description, what-you'll-learn, requirements and target audience.

**Parameters:**
- `course_id` (string, optional) — The Udemy course to look up — its numeric id (the number in /course/<slug>/ → api id), its slug, or a full Udemy course URL (https://www.udemy.com/course/the-complete-python-bootcamp/). A URL/slug is resolved to the course automatically.

**Returns:** course{course_id, title, headline, url, image, rating, num_reviews, num_subscribers, num_lectures, instructional_level, content_info, video_length, locale, price{price_string, amount, currency, is_paid}, instructors[]{id, name, job_title, url}, category, subcategory, description, what_you_will_learn[], requirements[], target_audience[]}

**Example request body:**
```json
{
  "course_id": "567828"
}
```

### POST /udemy/v1/pricing — 1 credit
Live price, list price and discount price for one or many Udemy courses by id (comma-separated). Fast, lightweight — use it to track current/sale pricing.

**Parameters:**
- `course_ids` (string, required) — One or more numeric Udemy course ids, comma-separated (up to 50). Get ids from the detail action.

**Returns:** prices[]{course_id, price{amount, currency, price_string}, list_price{...}, discount_price{...}}

**Example request body:**
```json
{
  "course_ids": "567828"
}
```

### POST /udemy/v1/reviews — 1 credit
Paginated public student reviews for a course by id: star rating, review text, date and the instructor's reply. Page with `page` — meta.has_more / meta.review_count tell you how many.

**Parameters:**
- `course_id` (string, required) — Numeric Udemy course id to pull reviews for (from the detail action).
- `page` (integer, optional, default 1) — Page number (results are paginated). Page until meta.has_more is false.
- `page_size` (integer, optional, default 10) — Reviews per page (1-100, default 10).

**Returns:** reviews[]{review_id, author, rating, content, created, modified, instructor_reply} + meta{page, has_more, next_page, review_count}

**Example request body:**
```json
{
  "course_id": "567828"
}
```

### POST /udemy/v1/curriculum — 1 credit
The course outline by id: chapters and lectures in order, with title, position, lecture asset type and whether the lecture is a free preview. Paginated.

**Parameters:**
- `course_id` (string, required) — Numeric Udemy course id (from the detail action).
- `page` (integer, optional, default 1) — Page number (results are paginated). Page until meta.has_more is false.
- `page_size` (integer, optional, default 20) — Items per page (1-100, default 20).

**Returns:** items[]{type(chapter|lecture), id, title, index, description, asset_type, is_free} + meta{page, has_more, next_page, item_count}

**Example request body:**
```json
{
  "course_id": "567828"
}
```

### POST /udemy/v1/by_instructor — 1 credit
Browse every course published by a Udemy instructor, by their numeric instructor id. Returns a paginated list of course cards (id, title, rating, price, level, instructors) — use it to discover courses to feed into detail/pricing/reviews/curriculum. Get the instructor id from any course's instructors[] (detail action).

**Parameters:**
- `instructor_id` (string, required) — Numeric Udemy instructor id (the id in a course's instructors[].id, available from the detail action).
- `page` (integer, optional, default 1) — Page number (results are paginated). Page until meta.has_more is false.
- `page_size` (integer, optional, default 20) — Items per page (1-100, default 20).

**Returns:** courses[]{course_id, title, headline, url, image, rating, num_reviews, num_subscribers, num_lectures, instructional_level, content_info, price{...}, instructors[]{id, name, job_title, url}} + meta{page, has_more, next_page, course_count}

**Example request body:**
```json
{
  "instructor_id": "9685726"
}
```

### POST /udemy/v1/categories — 1 credit
The live Udemy category taxonomy (Development, Business, IT & Software, Design, …) with ids, titles and slugs. Pass a category_id to drill into its subcategories. Use this to map the Udemy catalogue structure.

**Parameters:**
- `category_id` (string, optional) — Optional. A category id (from this action) to list its subcategories instead of the top-level categories.

**Returns:** categories[]{id, title, slug, type, url}

## More
- Try it live, no code: https://reefapi.com/playground?engine=udemy
- Human docs page: https://reefapi.com/docs/udemy
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
