Documentation Index
Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
Use this file to discover all available pages before exploring further.
The SavedSearch type represents stored search configurations that can be executed to retrieve content or assets.
Type Definition
type SavedSearch {
id: ID!
name: String!
description: String
type: SavedSearchType!
}
Fields
| Field | Type | Description |
|---|
id | ID! | Unique identifier |
name | String! | Search name |
description | String | Optional description |
type | SavedSearchType! | Search type (CONTENT or ASSET) |
SavedSearchType Enum
enum SavedSearchType {
CONTENT
ASSET
}
| Value | Description |
|---|
CONTENT | Search returns content items |
ASSET | Search returns asset items |
Example Queries
List Saved Searches
query GetSavedSearches($type: SavedSearchType, $cursor: String) {
savedSearches(type: $type, cursor: $cursor, limit: 20) {
data {
id
name
description
type
}
pagination {
cursor
hasMore
limit
}
}
}
Get Single Saved Search
query GetSavedSearch($id: ID!) {
savedSearch(id: $id) {
id
name
description
type
}
}
Response:
{
"data": {
"savedSearch": {
"id": "ss123",
"name": "Recent Tutorials",
"description": "Tutorials updated in the last 30 days",
"type": "CONTENT"
}
}
}
Execute Saved Search
query ExecuteSavedSearch($id: ID!, $cursor: String) {
executeSavedSearch(id: $id, cursor: $cursor, limit: 20) {
... on ContentList {
data {
id
name
tags
}
pagination {
cursor
hasMore
limit
}
}
... on AssetList {
data {
id
name
url
}
pagination {
cursor
hasMore
limit
}
}
}
}
SavedSearchResult Union
The executeSavedSearch query returns a union type:
union SavedSearchResult = ContentList | AssetList
Use inline fragments to handle each result type:
... on ContentList {
data { id name }
}
... on AssetList {
data { id url }
}
- Content - Content items returned by CONTENT searches
- Asset - Assets returned by ASSET searches