# List articles

```text
GET https://api.seoforsaas.dev/api/v1/projects/{projectId}/content?page=1&limit=100
```

| Query | Default | |
|---|---|---|
| `page` | `1` | 1-based. |
| `limit` | `20` | At most `100`; larger values are capped. |

cURL:

```bash
curl "https://api.seoforsaas.dev/api/v1/projects/YOUR_PROJECT_ID/content?page=1&limit=100" \
  -H "Authorization: Bearer $SEOFORSAAS_CONTENT_KEY"
```

TypeScript:

```ts
import { createClient } from "./lib/seoforsaas/client";

const seoforsaas = createClient({
  projectId: process.env.SEOFORSAAS_PROJECT_ID,
  contentKey: process.env.SEOFORSAAS_CONTENT_KEY,
});

// Every published article, newest first; follows pagination for you.
const articles = await seoforsaas.listAllArticles();

// Or one page at a time (limit ≤ 100):
const { articles: first, pagination } = await seoforsaas.listArticles({ page: 1, limit: 20 });
```

Python:

```python
import os

import requests

BASE = f"https://api.seoforsaas.dev/api/v1/projects/{os.environ['SEOFORSAAS_PROJECT_ID']}/content"

session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['SEOFORSAAS_CONTENT_KEY']}"


def list_all_articles() -> list[dict]:
    """Every published article, newest first."""
    articles: list[dict] = []
    page = 1
    while True:
        res = session.get(BASE, params={"page": page, "limit": 100}, timeout=10)
        res.raise_for_status()
        body = res.json()
        articles.extend(body["data"])
        if not body["pagination"]["hasNext"]:
            return articles
        page += 1
```

## Response

```json
{
  "success": true,
  "data": [{ "id": "…", "slug": "…", "title": "…", "blocks": [], "seo": {} }],
  "pagination": { "page": 1, "limit": 100, "total": 64, "totalPages": 1, "hasNext": false, "hasPrev": false }
}
```

Each item is a full [article](/docs/api/article), blocks and SEO included, without `related` (that comes with a single read). Follow `pagination.hasNext` to read everything; the TypeScript client's `listAllArticles()` does it for you. For a sitemap, read [the sitemap endpoint](/docs/api/sitemap) instead: one request, no bodies, and the dates Google should see.
