Skip to main content
POST
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content
/
search
Search Content
curl --request POST \
  --url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {},
  "filter.status": {},
  "filter.name": {},
  "filter.typeId": {},
  "filter.isTemplate": {},
  "filter.tags": {},
  "filter.updatedAt": {},
  "filter.hasPublishedVersion": {},
  "sort": [
    {}
  ],
  "pagination": {},
  "query": "<string>"
}
'
Search content using filters. Supports both GET (query parameters) and POST (request body) methods.

GET Method

GET/app/v1/organizations//projects//content/search
Use query parameters for simple searches.

POST Method

POST/app/v1/organizations//projects//content/search
Use request body for advanced filtering with operators.

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID

Query Parameters (GET)

status
string
Filter by status: draft, published, modified, deleted
name
string
Filter by name (minimum 3 characters)
type
string
Filter by content type ID
isTemplate
string
Filter templates: true or false
tag
string | string[]
Filter by tag(s)
from
string
Filter by updated date (from)
to
string
Filter by updated date (to)
query
string
Natural language query for semantic search (1-500 characters)
sort
string
Sort field and order (e.g., updatedAt:desc)
page
string
Page number
limit
string
Items per page (max 100)

Request Body (POST)

filter
object
Filter conditions
filter.status
object
Status filter with operators: eq, neq, in
filter.name
object
Name filter with operators: eq, neq, like
filter.typeId
object
Content type filter with operators: eq, neq, in
filter.isTemplate
object
Template filter with operators: eq, neq
filter.tags
object
Tags filter with operators: eq, any, all
filter.updatedAt
object
Updated date filter with operators: lt, lte, gt, gte
filter.hasPublishedVersion
object
Filter by whether content has a published version: eq
sort
array
Sort configuration array
pagination
object
Pagination options with page, limit
query
string
Natural language query for semantic search

Example Request (POST)

{
  "filter": {
    "status": { "eq": "published" },
    "typeId": { "in": ["ct-article", "ct-blog"] },
    "tags": { "any": ["featured", "trending"] }
  },
  "sort": [
    { "field": "updatedAt", "order": "desc" }
  ],
  "pagination": {
    "limit": 20,
    "page": 1
  }
}

Response

{
  "data": [
    {
      "id": "cont123",
      "name": "Getting Started Guide",
      "typeId": "ct-article",
      "status": "published",
      "version": 3,
      "lastPublishedVersion": 3,
      "content": { ... },
      "tags": ["featured", "guide"],
      "isTemplate": false,
      "metadata": { ... },
      "createdAt": "2024-03-20T10:00:00Z",
      "updatedAt": "2024-03-22T10:00:00Z"
    }
  ],
  "pagination": {
    "lastKey": "eyJwayI6Ik9SR..."
  }
}

Filter Operators

OperatorDescriptionExample
eqEquals{"status": {"eq": "published"}}
neqNot equals{"status": {"neq": "deleted"}}
likeContains (case-insensitive){"name": {"like": "guide"}}
inIn array{"typeId": {"in": ["ct1", "ct2"]}}
anyHas any of tags{"tags": {"any": ["featured"]}}
allHas all of tags{"tags": {"all": ["featured", "guide"]}}
ltLess than{"updatedAt": {"lt": "2024-03-22"}}
lteLess than or equal{"updatedAt": {"lte": "2024-03-22"}}
gtGreater than{"updatedAt": {"gt": "2024-03-20"}}
gteGreater than or equal{"updatedAt": {"gte": "2024-03-20"}}

Code Examples

curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content/search?status=published&limit=20" \
  -H "Authorization: Bearer YOUR_JWT"