Build with the API
Pick an endpoint. Open the JSON. Start building.
Base URL This site’s origin +
/apiNo authCORS *No cacheEndpoints 3
GET/api/articlesList articles
Query parameters
| Parameter | Default | Range |
|---|---|---|
limit | 12 | Integer 1–100 |
offset | 0 | Integer ≥ 0 |
Returns ArticleSummary[]. No body.
12 fixtures. Past the last item? Returns [].
?limit=2&offset=0200 Example item in the array
[
{
"id": "bitcoin-finds-its-footing",
"title": "Bitcoin finds its footing as investors take the long view",
"category": "Markets",
"publishedAt": "2026-09-05T08:00:00Z",
"image": {
"url": "https://<api-host>/images/bitcoin.jpg",
"alt": "Bitcoin coins"
}
}
]GET/api/articles/:idFull article
Path parameter
| Parameter | Value |
|---|---|
id required | Exact ID from the article list |
Returns Article: summary fields + body.
Unknown ID → 404.
200 Example article
{
"id": "bitcoin-finds-its-footing",
"title": "Bitcoin finds its footing as investors take the long view",
"category": "Markets",
"publishedAt": "2026-09-05T08:00:00Z",
"image": {
"url": "https://<api-host>/images/bitcoin.jpg",
"alt": "Bitcoin coins"
},
"body": "<p>Article text…</p><h2>A longer view</h2>"
}GET/api/prices6 assets · updates every 5s
No parameters required
Returns Price[]: BTC, ETH, SOL, XRP, DOGE, USDC.
Poll every 5 seconds for new simulated quotes.
| Field | Read as |
|---|---|
price | Decimal string |
decimals | USD precision: ETH → $2,635.56 |
change24h | "0.87" → +0.87% |
BTC / ETH / SOL: 2 decimals · XRP / USDC: 4 · DOGE: 5. USDC stays near $1.
Open JSON200 Example item in the array
[
{
"symbol": "ETH",
"name": "Ethereum",
"price": "2635.56000000",
"decimals": 2,
"change24h": "0.87"
}
]Four fields to notice
- publishedAt
- ISO UTC.
- image
nullor{ url, alt }. Absolute URL.- body
- HTML string. Title & hero are separate.
- price
- String. Format with the asset’s
decimals.
The API reflects the state of the world. Handle what it gives you.
Test loading & errors
Works on every endpoint. Combine with &.
?latency=30003s delay ↗Integer milliseconds · 0–10000 · default 0
?fail=1HTTP 500 ↗Failure follows the requested delay.
Error codes & response
| Status | Meaning |
|---|---|
| 400 | Invalid numeric parameter |
| 404 | Unknown article ID |
| 500 | Simulated failure |
{ "error": "Simulated API failure" }TypeScript types
Copy into your project.
export type ArticleSummary = {
id: string;
title: string;
category: string;
publishedAt: string; // ISO 8601, UTC
image: { url: string; alt: string } | null;
};
export type Article = ArticleSummary & {
body: string; // HTML
};
export type Price = {
symbol: string;
name: string;
price: string; // full precision
decimals: number; // digits to display
change24h: string; // percent
};Response headers: Access-Control-Allow-Origin: * · Cache-Control: no-store