# Shanghairanking — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive rankings data for Chinese universities including ARWU, GRAS subject rankings, and BCUR assessments, with the ability to search institutions and view detailed university profiles. Compare academic performance metrics and subject-specific standings across China's higher education institutions.

**Category:** Education | **Website:** [shanghairanking.com/](https://shanghairanking.com/) | **Docs:** [parse.bot/marketplace/25c9fcb7-71b6-4dcf-bd1e-4410b565f032/shanghairanking-com-api](https://parse.bot/marketplace/25c9fcb7-71b6-4dcf-bd1e-4410b565f032/shanghairanking-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-shanghairanking-com-api-25c9fcb7/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_arwu_rankings

Fetch ARWU (Academic Ranking of World Universities) world rankings for a given year. Returns a paginated list of ranked universities with their scores, world rank, national rank, and region. Supports optional filtering by region name. Single-page response ordered by world rank.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region` | string | No | Filter by full region name. Accepted values include: 'United States', 'China Mainland', 'China', 'United Kingdom', 'Germany', 'Italy', 'Australia', 'Japan', 'South Korea', 'Canada', 'France', 'Brazil', 'India', 'Taiwan, China', 'Sweden', 'Netherlands'. Empty string returns all regions. |
| `year` | string | No | Ranking year (e.g. '2024'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shanghairanking-com-api-25c9fcb7/get_arwu_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"region":"<string>","year":"<string>"}'
```

### get_chinese_universities

Retrieve a list of Chinese universities with their current ARWU world ranking position. Each entry includes university name, slug identifier, world ranking, and region. The list is ordered by world ranking. Use the slug to fetch full university details via get_university_detail.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of universities to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shanghairanking-com-api-25c9fcb7/get_chinese_universities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>"}'
```

### get_gras_subject_rankings

Fetch GRAS (Global Ranking of Academic Subjects) rankings for a given year and subject code. Returns ranked universities with their scores for the specified academic subject. Each entry includes world rank, name, slug, region, and score. Single-page response ordered by subject rank.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `subject_code` | string | No | Subject code. Known codes: 'AS0210' (Computer Science & Engineering), 'AS0101' (Mathematics). |
| `year` | string | No | Ranking year (e.g. '2024'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shanghairanking-com-api-25c9fcb7/get_gras_subject_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject_code":"<string>","year":"<string>"}'
```

### get_university_detail

Fetch the detailed profile of a specific university by its slug identifier. Returns name, website URL, founding year, physical address, and a list of subject rankings when available. The slug is obtainable from search_universities, get_arwu_rankings, or get_gras_subject_rankings endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | University slug identifier (e.g. 'tsinghua-university', 'harvard-university'). Obtainable from search_universities or ranking endpoints. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shanghairanking-com-api-25c9fcb7/get_university_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### search_universities

Search universities by name substring and/or filter by region. Returns matching universities with their name, logo URL, slug, region, latest ranking info string, and current world ranking position. Results are not paginated — the full match set is returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | University name search query (substring match, e.g. 'Harvard', 'Tsinghua'). |
| `region` | string | No | Filter by region name. Accepted values include: 'China Mainland', 'China', 'United States', 'United Kingdom', 'Germany', 'Australia', 'Japan'. Empty string returns all regions. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-shanghairanking-com-api-25c9fcb7/search_universities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","region":"<string>"}'
```
