> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skayle.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Articles

> Retrieve a paginated list of articles or collection items.

## Endpoints

```bash theme={null}
GET /articles
GET /posts                                 # backward-compatible alias
GET /collections/:collection-slug/items    # for specific enabled collections
```

Plan note:

* `Articles` are available on all plans.
* Additional non-article collections require the `Authority` plan.

## Query parameters

| Parameter    | Type    | Default     | Description                                                                          |
| ------------ | ------- | ----------- | ------------------------------------------------------------------------------------ |
| `page`       | integer | `1`         | Page number                                                                          |
| `per_page`   | integer | `10`        | Items per page (max `100`)                                                           |
| `offset`     | integer | -           | Zero-based item offset; overrides the offset derived from `page`                     |
| `status`     | string  | `published` | Status filter (`published`, `draft`, `scheduled`, `all`)                             |
| `search`     | string  | -           | Search in title, excerpt, content, slug, canonical URL, or external URL              |
| `categories` | string  | -           | Comma-separated category IDs                                                         |
| `tags`       | string  | -           | Comma-separated tag IDs                                                              |
| `authors`    | string  | -           | Comma-separated author IDs                                                           |
| `orderby`    | string  | `date`      | Sort field (`date`, `publish_at`, `created_at`, `updated_at`, `title`, `slug`, `id`) |
| `order`      | string  | `desc`      | Sort direction (`asc`, `desc`)                                                       |
| `_fields`    | string  | -           | Comma-separated list of response attributes to return                                |
| `include`    | string  | -           | Include related resources (`categories,tags,authors`)                                |

## Example request (root articles)

```bash theme={null}
curl "https://api.skayle.ai/v1/ORG_ID/articles?status=published&page=1&per_page=2&include=categories,tags,authors&orderby=date&order=desc"
```

To retrieve a custom slice ordered by its public publishing date:

```bash theme={null}
curl "https://api.skayle.ai/v1/ORG_ID/articles?status=published&offset=10&per_page=12&orderby=publish_at&order=desc"
```

To find an article by its slug or a full URL:

```bash theme={null}
curl "https://api.skayle.ai/v1/ORG_ID/articles?search=https%3A%2F%2Fexample.com%2Fblog%2Fb2b-saas-content-strategy-2026"
```

## Example request (collection items)

```bash theme={null}
curl "https://api.skayle.ai/v1/ORG_ID/collections/answers/items?status=published&page=1&per_page=20"
```

## Example response

```json theme={null}
{
  "data": [
    {
      "id": "post_01HZX2...",
      "type": "articles",
      "attributes": {
        "title": "B2B SaaS Content Strategy for 2026",
        "slug": "b2b-saas-content-strategy-2026",
        "excerpt": "A practical framework for demand capture and category coverage.",
        "content": "...",
        "content_html": "<h2>...</h2>",
        "comparison_screenshots": [
          {
            "section_heading": "Acme vs Competitor A",
            "section_slug": "acme-vs-competitor-a",
            "competitor_name": "Competitor A",
            "source_url": "https://competitor-a.com/",
            "screenshot_url": "https://cdn.example.com/comparison-screenshots/org/post/acme-vs-competitor-a.webp",
            "captured_at": "2026-02-25T13:02:11.000Z",
            "status": "captured"
          }
        ],
        "status": "published",
        "word_count": 1860,
        "seo_title": "B2B SaaS Content Strategy for 2026",
        "meta_description": "Framework for planning and publishing ranking-focused content.",
        "featured_image_url": "https://cdn.example.com/hero.jpg",
        "faq": [],
        "schema_json_ld": {},
        "publish_at": "2026-02-01T00:00:00.000Z",
        "created_at": "2026-01-28T12:15:01.000Z",
        "updated_at": "2026-02-01T09:20:11.000Z",
        "edited_at": null
      },
      "relationships": {
        "categories": {
          "data": [{ "type": "categories", "id": "cat_01HZX..." }]
        },
        "tags": {
          "data": [{ "type": "tags", "id": "tag_01HZX..." }]
        },
        "authors": {
          "data": [{ "type": "authors", "id": "author_01HZX..." }]
        }
      },
      "links": {
        "self": "/v1/ORG_ID/articles/post_01HZX2..."
      }
    }
  ],
  "included": [
    {
      "id": "cat_01HZX...",
      "type": "categories",
      "attributes": {
        "name": "Content Strategy",
        "slug": "content-strategy"
      }
    }
  ],
  "links": {
    "self": "/v1/ORG_ID/articles?page=1&per_page=2",
    "prev": null,
    "next": "/v1/ORG_ID/articles?page=2&per_page=2"
  },
  "meta": {
    "total": 42,
    "per_page": 2,
    "page": 1
  }
}
```

## Notes

* `status` defaults to `published` for list requests.
* `status=scheduled` is supported.
* Legacy scheduled rows represented as `draft + publish_at` are returned as `scheduled`.
* `status=draft` excludes those legacy scheduled rows.
* `categories`, `tags`, and `authors` filters are ID-based.
* `/posts` is backward-compatible, but new integrations should use `/articles`.

## Response field descriptions

| Field                                      | Type           | Description                                                                   |
| ------------------------------------------ | -------------- | ----------------------------------------------------------------------------- |
| `data[].id`                                | string         | Unique article/item ID                                                        |
| `data[].type`                              | string         | Resource type (`articles` for root feed, `items` for non-article collections) |
| `data[].attributes.title`                  | string         | Content title                                                                 |
| `data[].attributes.slug`                   | string         | URL slug                                                                      |
| `data[].attributes.excerpt`                | string \| null | Short summary                                                                 |
| `data[].attributes.content`                | string         | Main content body                                                             |
| `data[].attributes.content_html`           | string \| null | Rendered HTML content                                                         |
| `data[].attributes.comparison_screenshots` | array          | Competitor screenshot metadata for comparison sections                        |
| `data[].attributes.status`                 | string         | Content status                                                                |
| `data[].attributes.word_count`             | number \| null | Word count                                                                    |
| `data[].attributes.faq`                    | array          | FAQ items                                                                     |
| `data[].attributes.schema_json_ld`         | object \| null | JSON-LD schema payload                                                        |
| `data[].attributes.created_at`             | string         | ISO datetime                                                                  |
| `data[].attributes.updated_at`             | string         | ISO datetime                                                                  |
| `data[].relationships`                     | object         | Linked category/tag/author references                                         |
| `included[]`                               | array          | Included resources requested by `include`                                     |
| `meta.total`                               | number         | Total matching rows                                                           |
| `meta.per_page`                            | number         | Page size                                                                     |
| `meta.page`                                | number         | Current page                                                                  |

## Filtering behavior

* `search` matches title, excerpt, content, slug, canonical URL, and external URL.
* A full URL also searches its decoded final path segment, allowing it to match
  a stored slug when the title differs.
* `categories`, `tags`, and `authors` accept comma-separated IDs.
* Multiple taxonomy filters are combined so results match all active filter groups.
* Comparison posts may include embedded screenshot images in `content_html` and structured screenshot metadata in `comparison_screenshots`.

## Pagination

Pagination metadata is returned in `meta` and navigation links in `links`.

Use `page` and `per_page` to page through results.

Use `offset` with `per_page` when the first page and later pages have different
sizes. `offset` takes precedence over the offset calculated from `page`.

## Error responses

### Organization not found

```json theme={null}
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Organization with ID \"ORG_ID\" not found"
    }
  ]
}
```

### API not available for this connector mode

```json theme={null}
{
  "errors": [
    {
      "status": "403",
      "title": "Forbidden",
      "detail": "This organization's content is not available via API. Skayle CMS mode must be enabled."
    }
  ]
}
```

### Collection not found or disabled

```json theme={null}
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Collection not found or not enabled"
    }
  ]
}
```
