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
Query Parameters (GET)
Filter by status: draft, published, modified, deleted
Filter by name (minimum 3 characters)
Filter by content type ID
Filter templates: true or false
Filter by updated date (from)
Filter by updated date (to)
Natural language query for semantic search (1-500 characters)
Sort field and order (e.g., updatedAt:desc)
Request Body (POST)
Status filter with operators: eq, neq, in
Name filter with operators: eq, neq, like
Content type filter with operators: eq, neq, in
Template filter with operators: eq, neq
Tags filter with operators: eq, any, all
Updated date filter with operators: lt, lte, gt, gte
filter.hasPublishedVersion
Filter by whether content has a published version: eq
Pagination options with page, limit
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
| Operator | Description | Example |
|---|
eq | Equals | {"status": {"eq": "published"}} |
neq | Not equals | {"status": {"neq": "deleted"}} |
like | Contains (case-insensitive) | {"name": {"like": "guide"}} |
in | In array | {"typeId": {"in": ["ct1", "ct2"]}} |
any | Has any of tags | {"tags": {"any": ["featured"]}} |
all | Has all of tags | {"tags": {"all": ["featured", "guide"]}} |
lt | Less than | {"updatedAt": {"lt": "2024-03-22"}} |
lte | Less than or equal | {"updatedAt": {"lte": "2024-03-22"}} |
gt | Greater than | {"updatedAt": {"gt": "2024-03-20"}} |
gte | Greater 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"