# Runoob — 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 programming tutorials and learning materials from Runoob, including browsing categories and directories, retrieving full tutorial content, and searching across thousands of coding lessons. Discover structured learning paths by category, view navigation links, and get detailed metadata to help you find exactly what you need to learn.

**Category:** Education | **Website:** [runoob.com/](https://runoob.com/) | **Docs:** [parse.bot/marketplace/e3e84f61-00aa-418c-8d4a-6042822fafa7/runoob-com-api](https://parse.bot/marketplace/e3e84f61-00aa-418c-8d4a-6042822fafa7/runoob-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/runoob/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get top navbar links

Returns the top navigation bar links from the runoob.com homepage. These are the site-wide navigation sections (e.g. home, tools, notes, references). Single page result.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/get-top-navbar-links \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get tutorial directory

Scrapes the left-column sidebar navigation of a given tutorial page, returning the full directory of topics in that tutorial section. Each entry has a title and absolute URL. Useful for enumerating all pages within a tutorial series.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Tutorial URL path or full URL (e.g. 'html/html-tutorial.html' or 'https://www.runoob.com/html/html-tutorial.html'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/get-tutorial-directory \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### Get tutorial metadata

Returns metadata for a tutorial page including the page title, meta description, keywords, and canonical URL. Useful for SEO inspection or understanding page context without fetching full content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Tutorial page full URL or path (e.g. 'https://www.runoob.com/html/html-intro.html' or 'html/html-intro.html'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/get-tutorial-metadata \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### Get tutorial page content

Returns the main content area text, page title, and navigation links (previous/next) of a tutorial page. Content is extracted as plain text with newline separators. Navigation links point to adjacent pages in the tutorial sequence.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Tutorial page full URL or path (e.g. 'https://www.runoob.com/html/html-intro.html' or 'html/html-intro.html'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/get-tutorial-page-content \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### List homepage categories

Returns all top-level tutorial categories from the runoob.com homepage. Each category has a name and identifier. Categories group tutorials by topic domain (e.g. Python, frontend, database). The full list is returned in a single page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/list-homepage-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### List tutorials by category

Returns tutorials grouped by category from the homepage. When category_name is provided, filters to categories whose title contains the value (case-insensitive). When omitted, returns all categories with their tutorials. Each tutorial has a title, URL, description, and icon URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_name` | string | No | Category name to filter by, matched case-insensitively against category titles (e.g. 'Python', 'HTML', '前端开发'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/list-tutorials-by-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_name":"<string>"}'
```

### Search tutorials

Performs a site search on runoob.com and returns matching tutorial results. Results include title, URL, and description snippet. Searches across all tutorial categories. Returns a single page of results (typically up to 10).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'Python', 'CSS', '函数'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/runoob/search-tutorials \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.