# Soliditylang — 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 Solidity documentation, search language references, and browse blog posts to stay updated on development news. Query compiler bug data filtered by version to identify known issues and compatibility concerns across smart contract projects.

**Category:** Developer Tools | **Website:** [soliditylang.org/](https://soliditylang.org/) | **Docs:** [parse.bot/marketplace/fcd43a55-2ad0-4bcf-ba00-03e69f46a9ba/soliditylang-org-api](https://parse.bot/marketplace/fcd43a55-2ad0-4bcf-ba00-03e69f46a9ba/soliditylang-org-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-soliditylang-org-api-fcd43a55/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_blog_post

Fetches a specific blog post by date and slug. Use get_blog_posts to discover available posts and extract year, month, day, and slug from the post URL path (format: /blog/YYYY/MM/DD/slug).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day` | string | Yes | Day of the blog post, zero-padded (e.g. '29'). |
| `month` | string | Yes | Month of the blog post, zero-padded (e.g. '04'). |
| `slug` | string | Yes | URL slug of the blog post (e.g. 'solidity-0.8.35-release-announcement'). |
| `year` | string | Yes | Year of the blog post (e.g. '2026'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/get_blog_post \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day":"<string>","month":"<string>","slug":"<string>","year":"<string>"}'
```

### get_blog_posts

Fetches the Solidity blog listing, optionally filtered by category. Returns all posts with metadata and content markdown. Filtering is case-insensitive and hyphens are treated as spaces.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Filter posts by category. Accepted values: 'releases', 'security alerts', 'announcements'. Case-insensitive; hyphens are treated as spaces (e.g. 'security-alerts' works). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/get_blog_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>"}'
```

### get_bugs_by_version

Fetches the mapping of compiler versions to their known bugs from the Solidity GitHub repository. Each version entry contains a list of bug names and the release date. Useful for checking if a specific compiler version has known vulnerabilities.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/get_bugs_by_version \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_doc_page

Fetches a specific documentation page by slug for a given version. Returns the content in HTML, RST source, and extracted headings. Slugs are discoverable from get_documentation_home ToC entries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Page slug (e.g. 'types', 'contracts', 'abi-spec', 'security-considerations'). |
| `version` | string | No | Documentation version slug (e.g. 'latest', 'stable', 'v0.8.35'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/get_doc_page \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>","version":"<string>"}'
```

### get_documentation_home

Fetches the main Solidity documentation landing page for a given version, returning the table of contents and main content HTML. The ToC lists all top-level documentation sections with their slug, suitable for feeding into get_doc_page. Content is cleaned HTML with navigation artifacts removed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `version` | string | No | Documentation version slug (e.g. 'latest', 'stable', 'v0.8.35'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/get_documentation_home \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":"<string>"}'
```

### get_known_bugs

Fetches the JSON bug database from the Solidity GitHub repository. Returns all known compiler bugs with severity, affected version ranges, and descriptions.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/get_known_bugs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_doc_versions

Returns the list of all available Solidity documentation versions from ReadTheDocs. Each version includes metadata such as slug, verbose_name, identifier, type (branch or tag), built status, active status, and documentation URLs.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/list_doc_versions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_documentation

Searches the Solidity documentation for sections matching a query string. Returns results with highlighted matches. Each result includes the page title, path, and content blocks with highlighted snippets. Results are capped at a single page from the upstream API.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query string. |
| `version` | string | No | Documentation version to search within (e.g. 'latest', 'stable', 'v0.8.35'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soliditylang-org-api-fcd43a55/search_documentation \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","version":"<string>"}'
```
