Skip to main content
GET
/
v1
/
posts
/
tag
/
{tag}
Get posts by tag with pagination
import { ParagraphAPI } from "@paragraph-com/sdk"

const api = new ParagraphAPI()
const { items, pagination } = await api.posts.get({ tag: "crypto", limit: 20 })
{
  "items": [
    {
      "id": "<string>",
      "title": "<string>",
      "slug": "<string>",
      "imageUrl": "<string>",
      "publishedAt": "<string>",
      "updatedAt": "<string>",
      "subtitle": "<string>",
      "staticHtml": "<string>",
      "json": "<string>",
      "markdown": "<string>",
      "coinId": "<string>"
    }
  ],
  "pagination": {
    "hasMore": true,
    "cursor": "<string>",
    "total": 123
  }
}

Path Parameters

tag
string
required

Tag to filter posts by

Minimum string length: 1

Query Parameters

cursor
string

Cursor for pagination

limit
integer
default:10

Maximum number of items to return (1-100, default: 10)

Required range: 1 <= x <= 100
includeContent
boolean | null

Include full content fields (json, staticHtml, markdown) in the post. Default: false

Response

Posts retrieved successfully

items
object[]
required

Array of items in this page

pagination
object
required