Skip to main content
GET
/
v1
/
discover
/
search
Search posts
import { ParagraphAPI } from "@paragraph-com/sdk"

const api = new ParagraphAPI()
const results = await api.discover.searchPosts({ q: "web3 publishing" })
[
  {
    "post": {
      "postId": "<string>",
      "blogId": "<string>",
      "createdAt": "<string>",
      "publishedAt": "<string>",
      "title": "<string>",
      "subtitle": "<string>",
      "postPreview": "<string>",
      "coverImageUrl": "<string>",
      "slug": "<string>",
      "coinId": "<string>"
    },
    "blog": {
      "blogId": "<string>",
      "userId": "<string>",
      "name": "<string>",
      "url": "<string>",
      "slug": "<string>",
      "logoUrl": "<string>",
      "coinId": "<string>",
      "customDomain": "<string>",
      "summary": "<string>"
    },
    "user": {
      "userId": "<string>",
      "name": "<string>",
      "bio": "<string>",
      "avatarUrl": "<string>",
      "walletAddress": "<string>"
    }
  }
]

Query Parameters

q
string

Search query string

blogId
string

Optional publication ID to restrict search to a specific publication

Response

Post search results

post
object
required

The matched post

blog
object
required

The publication this post belongs to

user
object
required

The author of the post