# Coursera API

> Coursera returns course, specialization, certificate, degree, and guided project data as a workflow and API.

Coursera’s Search courses finds learning options by required topic, with optional level, free-only, and result-count inputs. Get course returns details for a course, specialization, or certificate and needs its name or link; provider is optional.

- Page: https://fous.com/workflows/coursera
- Handle: `@coursera`
- Category: [Education](https://fous.com/workflows/category/education)
- Source website: https://coursera.org
- Last verified: Sep 29, 2026
- Fous is not affiliated with Coursera.

## Methods

### Get course

Operation `get_course`, version 1. 1 credit per call.

Get details of a Coursera course, specialization, or professional certificate by name or link. Prices are returned only when publicly displayed; availability and charges can vary by location.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `course` | string | yes | `"https://www.coursera.org/learn/machine-learning"` | Course, specialization, or certificate name or Coursera link, for example Google Data Analytics. |
| `provider` | string | no | `"Google"` | Optional university or company to distinguish similarly named courses, for example Google. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "course"
  ],
  "properties": {
    "course": {
      "type": "string",
      "description": "Course, specialization, or certificate name or Coursera link, for example Google Data Analytics.",
      "examples": [
        "https://www.coursera.org/learn/machine-learning",
        "Google Data Analytics",
        "Python for Everybody"
      ]
    },
    "provider": {
      "type": "string",
      "default": "",
      "description": "Optional university or company to distinguish similarly named courses, for example Google.",
      "examples": [
        "Google",
        "University of Michigan"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "course": "https://www.coursera.org/learn/machine-learning"
    },
    {
      "course": "Google Data Analytics",
      "provider": "Google"
    },
    {
      "course": "Python for Everybody",
      "provider": "University of Michigan"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `cost` | string or null | `"Free to enroll"` |  |
| `link` | string | `"https://www.coursera.org/learn/machine-learning"` |  |
| `type` | string | `"Course"` |  |
| `level` | string or null | `"Beginner"` |  |
| `price` | number or null | `49` |  |
| `title` | string | `"Supervised Machine Learning: Regression and Classification"` |  |
| `rating` | number or null | `4.89` | Rating out of 5. |
| `skills` | array |  |  |
| `currency` | string or null | `"USD"` |  |
| `duration` | string or null | `"3 weeks at 10 hours a week"` |  |
| `languages` | array |  |  |
| `providers` | array |  |  |
| `instructors` | array |  |  |
| `number_enrolled` | integer or null | `1253410` |  |
| `number_of_reviews` | integer or null | `32925` |  |
| `modules_or_courses` | array |  |  |
| `modules_or_courses[].title` | string | `"Week 1: Introduction to Machine Learning"` |  |
| `modules_or_courses[].short_description` | string or null | `"Welcome to the Machine Learning Specialization!  You're joining millions of others who have taken either this or the or` |  |
| `certificate_offered` | boolean | `true` |  |

**Example input**

```json
{
  "course": "https://www.coursera.org/learn/machine-learning"
}
```

**Example output**

```json
{
  "cost": "Free to enroll",
  "link": "https://www.coursera.org/learn/machine-learning",
  "type": "Course",
  "level": "Beginner",
  "price": null,
  "title": "Supervised Machine Learning: Regression and Classification",
  "rating": 4.89,
  "skills": [
    "Model Evaluation",
    "Supervised Learning",
    "Machine Learning"
  ],
  "currency": null,
  "duration": "3 weeks at 10 hours a week",
  "languages": [
    "English",
    "German",
    "Hindi"
  ],
  "providers": [
    "DeepLearning.AI",
    "Stanford Online"
  ],
  "instructors": [
    "Andrew Ng",
    "Aarti Bagul",
    "Geoff Ladwig"
  ],
  "number_enrolled": 1253410,
  "number_of_reviews": 32925,
  "modules_or_courses": [
    {
      "title": "Week 1: Introduction to Machine Learning",
      "short_description": "Welcome to the Machine Learning Specialization!  You're joining millions of others who have taken either this or the original course, which led to the founding of Coursera, and has helped millions of …"
    },
    {
      "title": "Week 2: Regression with multiple input variables",
      "short_description": "This week, you'll extend linear regression to handle multiple input features.  You'll also learn some methods for improving your model's training and performance, such as vectorization, feature scalin…"
    },
    {
      "title": "Week 3: Classification",
      "short_description": "This week, you'll learn the other type of supervised learning, classification.  You'll learn how to predict categories using the logistic regression model.  You'll learn about the problem of overfitti…"
    }
  ],
  "certificate_offered": true
}
```

### Search courses

Operation `search_courses`, version 1. 1 credit per call.

Find Coursera courses, specializations, professional certificates, degrees, and guided projects on a topic. Results follow Coursera’s search order; free means Coursera labels the result Free.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `level` | string | no | `"beginner"` | Difficulty level, for example beginner; any includes all levels. |
| `topic` | string | yes | `"computer science degree"` | Topic or skill to search, for example data analysis. |
| `free_only` | boolean | no | `true` | Keep only items Coursera labels Free, for example true. |
| `max_results` | integer | no | `15` | Maximum number of results, for example 20 (up to 100). |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "level": {
      "enum": [
        "any",
        "beginner",
        "intermediate",
        "advanced"
      ],
      "type": "string",
      "default": "any",
      "description": "Difficulty level, for example beginner; any includes all levels.",
      "examples": [
        "beginner"
      ]
    },
    "topic": {
      "type": "string",
      "minLength": 1,
      "description": "Topic or skill to search, for example data analysis.",
      "examples": [
        "computer science degree",
        "data analysis"
      ]
    },
    "free_only": {
      "type": "boolean",
      "default": false,
      "description": "Keep only items Coursera labels Free, for example true.",
      "examples": [
        true
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of results, for example 20 (up to 100).",
      "x-fous-developer": true,
      "examples": [
        15
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "topic": "computer science degree",
      "max_results": 15
    },
    {
      "topic": "data analysis"
    },
    {
      "level": "beginner",
      "topic": "data analysis",
      "free_only": true,
      "max_results": 15
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `courses` | array |  |  |
| `courses[].type` | string |  |  |
| `courses[].level` | string or null |  |  |
| `courses[].title` | string |  |  |
| `courses[].rating` | number or null |  |  |
| `courses[].duration` | string or null |  |  |
| `courses[].image_url` | string or null |  |  |
| `courses[].course_url` | string |  |  |
| `courses[].offered_by` | string or null |  |  |
| `courses[].number_of_reviews` | integer or null |  |  |
| `courses[].skills_youll_gain` | array |  |  |

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@coursera",
  "visibility": "public",
  "operation": "get_course",
  "version": 1,
  "input": {
    "course": "https://www.coursera.org/learn/machine-learning"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@coursera\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_course\",\n  \"version\": 1,\n  \"input\": {\n    \"course\": \"https://www.coursera.org/learn/machine-learning\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@coursera",
  "visibility": "public",
  "operation": "get_course",
  "version": 1,
  "input": {
    "course": "https://www.coursera.org/learn/machine-learning"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@coursera","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Find learning options for a topic or skill
- Compare course ratings, levels, and durations
- Review skills and modules before selecting a course
- Identify course providers and instructors
- Check publicly displayed course prices

## FAQ

### Is Fous affiliated with Coursera?

No. Fous is not affiliated with Coursera. This workflow reads the public coursera.org website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Coursera account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from coursera.org when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What learning options cover a topic?

Search courses finds courses, specializations, professional certificates, degrees, and guided projects by topic.

### What skills does a course teach?

Get course returns skills for a course, specialization, or professional certificate identified by name or link.

### What rating and price does a course have?

Get course returns a rating and prices when publicly displayed; availability and charges can vary by location.

## Related

- [Udemy API](https://fous.com/workflows/udemy.md): Online courses in professional and personal skills.
- [Class Central API](https://fous.com/workflows/class-central.md): Find online courses across learning platforms.
- [MIT OpenCourseWare API](https://fous.com/workflows/mit-opencourseware.md): Free MIT course materials open to everyone.
- [College Scorecard API](https://fous.com/workflows/college-scorecard.md): College Scorecard returns US college costs and outcomes, including admissions, graduation, debt, and earnings; some figures may be missing, and comparisons cover 2–5 colleges.
- [Google Search API](https://fous.com/workflows/google-search.md): Google Search returns public web, image, job, event, related-question, and autocomplete results in Google’s order, with answers and details when available; results may be fewer, omit information, or be empty.
- [Costco API](https://fous.com/workflows/costco.md): Costco returns US product prices/details and warehouse hours/services/gas prices; delivery affects availability, member prices may be hidden, and posted gas and holiday hours may differ.
- [Sephora API](https://fous.com/workflows/sephora.md): Sephora provides US beauty products, shopping information, product details, and customer reviews; prices and availability may change.
- [Capterra API](https://fous.com/workflows/capterra.md): Capterra provides business software ratings, verified reviews, pricing details, and category listings, with review freshness and pricing availability varying by listing.
- [All Education workflows](https://fous.com/workflows/category/education)
