# The Block — 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 real-time cryptocurrency prices, breaking news, and in-depth research articles from The Block's crypto intelligence platform. Search and browse news by category, discover articles from expert authors, and learn about blockchain topics all in one place.

**Category:** Web3 & Onchain | **Website:** [theblock.co/](https://theblock.co/) | **Docs:** [parse.bot/marketplace/2492271f-8e1b-422b-9e42-28e67c76681a/theblock-co-api](https://parse.bot/marketplace/2492271f-8e1b-422b-9e42-28e67c76681a/theblock-co-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-theblock-co-api-2492271f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_article

Fetch full article content by numeric post ID. Returns the article headline, HTML body, authors, category, tags, related tokens, and related posts. Each article is a single round-trip; there is no batch endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `post_id` | string | Yes | Numeric post ID. Obtain from get_latest_news, search_articles, or get_news_by_category results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/get_article \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_id":"<string>"}'
```

### get_cryptocurrency_prices

Retrieve cryptocurrency prices and market data for multiple tokens sorted by rank. Returns real-time price data from CoinGecko via The Block's API. Use start/size for offset-based pagination through the full token list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `size` | integer | No | Number of tokens to return. |
| `start` | integer | No | Offset for pagination (0-based index). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/get_cryptocurrency_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"size":"<integer>","start":"<integer>"}'
```

### get_latest_news

Retrieve the latest crypto news articles. Returns the first page of 10 article summaries and pagination metadata. No input parameters needed.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/get_latest_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_learn_articles

Retrieve educational articles and topics organized by category from The Block Learn. Returns learning content grouped into sections (Latest, Companies, Consensus Mechanisms, etc.) with navigation menu and page metadata.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/get_learn_articles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_news_by_category

Retrieve articles filtered by category slug. Returns paginated article summaries and category metadata. Supports page-based pagination via the page and size parameters.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug identifying the news category. |
| `page` | integer | No | Page number for pagination. |
| `size` | integer | No | Number of articles per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/get_news_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","page":"<integer>","size":"<integer>"}'
```

### get_token_price_detail

Retrieve detailed price data for a specific token by its numeric ID. Returns current price, market cap, 24h high/low, price change percentages, and price history. Use get_cryptocurrency_prices to discover token IDs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `token_id` | string | Yes | Numeric token ID (e.g. '248348' for Bitcoin, '248349' for Ethereum). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/get_token_price_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"token_id":"<string>"}'
```

### search_articles

Full-text search over articles by keyword. Returns matching articles ordered by relevance. The count field indicates total matches found (capped at 10000).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or phrase. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-theblock-co-api-2492271f/search_articles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
