Skip to main content
GET
/
v1
/
posts
List posts
curl --request GET \
  --url https://api.marblecms.com/v1/posts \
  --header 'Authorization: <api-key>'
{
  "posts": [
    {
      "id": "cryitfjp5678mn09qrstuvwx",
      "slug": "getting-started-with-nextjs",
      "title": "Getting Started with Next.js",
      "status": "published",
      "featured": false,
      "coverImage": "https://media.marblecms.com/cover.jpg",
      "description": "A beginner's guide to Next.js",
      "publishedAt": "2024-01-15T10:00:00Z",
      "updatedAt": "2024-01-16T12:00:00Z",
      "attribution": {
        "author": "John Doe",
        "url": "https://original-source.com/article"
      },
      "authors": [
        {
          "id": "cryitfjp1234jl04vdnycek8",
          "name": "John Doe",
          "image": "https://media.marblecms.com/avatar.jpg",
          "bio": "Technical writer and developer",
          "role": "Editor",
          "slug": "john-doe",
          "socials": [
            {
              "url": "https://twitter.com/johndoe",
              "platform": "twitter"
            }
          ]
        }
      ],
      "category": {
        "id": "cryitfjp1234jl04vdnycek8",
        "name": "Technology",
        "slug": "technology",
        "description": "Tech news and tutorials"
      },
      "tags": [
        {
          "id": "cryitfjp1234jl04vdnycek8",
          "name": "JavaScript",
          "slug": "javascript",
          "description": "JavaScript tutorials"
        }
      ],
      "fields": {
        "release_date": "2024-01-15",
        "priority_score": 5,
        "hashtags": [
          "#javascript",
          "#nextjs"
        ]
      },
      "content": "<p>Hello world</p>"
    }
  ],
  "pagination": {
    "limit": 10,
    "currentPage": 1,
    "nextPage": 2,
    "previousPage": null,
    "totalPages": 5,
    "totalItems": 42
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.marblecms.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Marble API key

Query Parameters

limit
integer

Number of posts per page (1-100)

Example:

10

page
integer

Page number

Example:

1

order
enum<string>
default:desc

Sort order by publishedAt

Available options:
asc,
desc
Example:

"desc"

categories
string[]

Category slugs to include

Example:
["tech", "news"]
excludeCategories
string[]

Category slugs to exclude

Example:
["changelog"]
tags
string[]

Tag slugs to include

Example:
["javascript", "react"]
excludeTags
string[]

Tag slugs to exclude

Example:
["outdated"]
query
string

Search query for title and content

Example:

"nextjs"

format
enum<string>

Content format (html or markdown)

Available options:
html,
markdown
Example:

"html"

Filter by featured status

Available options:
true,
false
Example:

"true"

status
enum<string>
default:published

Filter by post status. Use 'published' for live posts, 'draft' for unpublished posts, or 'all' for both.

Available options:
published,
draft,
all
Example:

"published"

Response

Paginated list of posts

posts
object[]
required
pagination
object
required