# QS Top Universities API

> QS Top Universities returns university rankings and profiles as a workflow and API.

QS Top Universities (QS) lists world or subject rankings by edition and country, with subject optional. Get university returns a profile, latest world rank, student figures, and listed subject ranks from a university name.

- Page: https://fous.com/workflows/qs-top-universities
- Handle: `@qs-top-universities`
- Category: [Education](https://fous.com/workflows/category/education)
- Source website: https://topuniversities.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with QS Top Universities.

## Methods

### Get university

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

Get a university’s QS profile by name, including its latest world ranking, student figures and up to five listed subject ranks. Tuition appears only where shown on the public profile.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `university` | string | yes | `"Massachusetts Institute of Technology"` | University name, for example University of Toronto. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "university"
  ],
  "properties": {
    "university": {
      "type": "string",
      "description": "University name, for example University of Toronto.",
      "examples": [
        "Massachusetts Institute of Technology",
        "University of Toronto",
        "Azerbaijan Technical University"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "university": "Massachusetts Institute of Technology"
    },
    {
      "university": "University of Toronto"
    },
    {
      "university": "Azerbaijan Technical University"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `city` | string or null | `"Cambridge"` |  |
| `country` | string or null | `"United States"` |  |
| `profile_link` | string | `"https://www.topuniversities.com/universities/massachusetts-institute-technology-mit"` |  |
| `overall_score` | number or null | `100` |  |
| `total_students` | integer or null | `11694` |  |
| `tuition_ranges` | array |  |  |
| `university_name` | string | `"Massachusetts Institute of Technology (MIT)"` |  |
| `subject_rankings` | array |  |  |
| `subject_rankings[].rank` | string | `"#1"` |  |
| `subject_rankings[].subject` | string | `"Chemistry"` |  |
| `world_ranking_year` | integer or null | `2027` |  |
| `world_ranking_position` | string or null | `"#1"` |  |
| `student_to_faculty_ratio` | integer or null | `4` |  |
| `international_students_percent` | number or null | `32.56` |  |

**Example input**

```json
{
  "university": "Massachusetts Institute of Technology"
}
```

**Example output**

```json
{
  "city": "Cambridge",
  "country": "United States",
  "profile_link": "https://www.topuniversities.com/universities/massachusetts-institute-technology-mit",
  "overall_score": 100,
  "total_students": 11694,
  "tuition_ranges": [],
  "university_name": "Massachusetts Institute of Technology (MIT)",
  "subject_rankings": [
    {
      "rank": "#1",
      "subject": "Chemistry"
    },
    {
      "rank": "#1",
      "subject": "Computer Science and Information Systems"
    },
    {
      "rank": "#1",
      "subject": "Data Science and Artificial Intelligence"
    }
  ],
  "world_ranking_year": 2027,
  "world_ranking_position": "#1",
  "student_to_faculty_ratio": 4,
  "international_students_percent": 32.56
}
```

### List university rankings

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

List QS World University Rankings, or a QS subject ranking, by edition and country. Returns the displayed rank, university location, overall score, and the indicator scores shown for the selected table. Subject rankings can have a different latest edition from the world ranking.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `year` | integer | no | `2026` | Edition year, such as 2026. Omit for the latest edition of the chosen ranking. |
| `country` | string | no | `"United States"` | Country or territory name, such as United States; omit for all countries. |
| `subject` | string | no | `"Computer Science"` | Subject name in plain words, such as Computer Science; omit for the world ranking. |
| `max_results` | integer | no | `5` | Maximum number of ranked universities to return, such as 50. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "year": {
      "type": "integer",
      "maximum": 2100,
      "minimum": 2000,
      "description": "Edition year, such as 2026. Omit for the latest edition of the chosen ranking.",
      "examples": [
        2026
      ]
    },
    "country": {
      "type": "string",
      "default": "",
      "description": "Country or territory name, such as United States; omit for all countries.",
      "examples": [
        "United States",
        "United Kingdom",
        "Atlantis"
      ]
    },
    "subject": {
      "type": "string",
      "default": "",
      "description": "Subject name in plain words, such as Computer Science; omit for the world ranking.",
      "examples": [
        "Computer Science"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 200,
      "minimum": 1,
      "description": "Maximum number of ranked universities to return, such as 50.",
      "x-fous-developer": true,
      "examples": [
        5,
        7
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "max_results": 5
    },
    {
      "country": "United States",
      "subject": "Computer Science",
      "max_results": 5
    },
    {
      "year": 2026,
      "country": "United Kingdom",
      "max_results": 7
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `rows` | array |  | Universities in QS rank order; additional numeric fields are the indicator scores published for this table. |
| `rows[].city` | string or null | `"Cambridge"` |  |
| `rows[].rank` | string | `"1"` |  |
| `rows[].country` | string or null | `"United States"` |  |
| `rows[].university` | string | `"Massachusetts Institute of Technology (MIT)"` |  |
| `rows[].overall_score` | number or null | `100` |  |
| `rows[].university_url` | string | `"https://www.topuniversities.com/universities/massachusetts-institute-technology-mit"` |  |
| `year` | integer | `2027` | Edition year. |
| `ranking_name` | string | `"QS World University Rankings"` | Name of the chosen QS ranking. |

**Example input**

```json
{
  "max_results": 5
}
```

**Example output**

```json
{
  "rows": [
    {
      "city": "Cambridge",
      "rank": "1",
      "country": "United States",
      "university": "Massachusetts Institute of Technology (MIT)",
      "overall_score": 100,
      "university_url": "https://www.topuniversities.com/universities/massachusetts-institute-technology-mit",
      "academic_reputation": 100,
      "employer_reputation": 100,
      "employment_outcomes": 100,
      "sustainability_score": 93.2,
      "citations_per_faculty": 100,
      "faculty_student_ratio": 100,
      "international_faculty_ratio": 100,
      "international_student_ratio": 91.1,
      "international_research_network": 94.4
    },
    {
      "city": "London",
      "rank": "=2",
      "country": "United Kingdom",
      "university": "Imperial College London",
      "overall_score": 99.2,
      "university_url": "https://www.topuniversities.com/universities/imperial-college-london",
      "academic_reputation": 99.6,
      "employer_reputation": 100,
      "employment_outcomes": 96.4,
      "sustainability_score": 98,
      "citations_per_faculty": 93.8,
      "faculty_student_ratio": 98.9,
      "international_faculty_ratio": 100,
      "international_student_ratio": 100,
      "international_research_network": 98.8
    },
    {
      "city": "Stanford",
      "rank": "=2",
      "country": "United States",
      "university": "Stanford University",
      "overall_score": 99.2,
      "university_url": "https://www.topuniversities.com/universities/stanford-university",
      "academic_reputation": 100,
      "employer_reputation": 100,
      "employment_outcomes": 100,
      "sustainability_score": 97.6,
      "citations_per_faculty": 98.8,
      "faculty_student_ratio": 100,
      "international_faculty_ratio": 97.9,
      "international_student_ratio": 75.1,
      "international_research_network": 96.8
    }
  ],
  "year": 2027,
  "ranking_name": "QS World University Rankings"
}
```

## 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": "@qs-top-universities",
  "visibility": "public",
  "operation": "get_university",
  "version": 1,
  "input": {
    "university": "Massachusetts Institute of Technology"
  },
  "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\": \"@qs-top-universities\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_university\",\n  \"version\": 1,\n  \"input\": {\n    \"university\": \"Massachusetts Institute of Technology\"\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": "@qs-top-universities",
  "visibility": "public",
  "operation": "get_university",
  "version": 1,
  "input": {
    "university": "Massachusetts Institute of Technology"
  },
  "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":"@qs-top-universities","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

- Compare university ranks and scores across countries.
- Find rankings for a specific subject and edition.
- Review a university’s student figures and listed subject ranks.
- Filter ranked universities by country.

## FAQ

### Is Fous affiliated with QS Top Universities?

No. Fous is not affiliated with QS Top Universities. This workflow reads the public topuniversities.com 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 QS Top Universities account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from topuniversities.com 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.

### Which universities rank highest in a subject?

List university rankings returns universities in rank order for a selected subject and edition.

### What is a university’s latest world ranking?

Get university returns the latest world ranking and its edition year for a named university.

### What student figures does a university profile show?

Get university returns total students, student-to-faculty ratio, and international student percentage when shown on the profile.

## Related

- [All Education workflows](https://fous.com/workflows/category/education)
