Skip to main content

List Saved Searches

Fetch a paginated list of saved searches, optionally filtered by type.
query GetSavedSearches($type: SavedSearchType, $cursor: String, $limit: Int) {
  savedSearches(type: $type, cursor: $cursor, limit: $limit) {
    data {
      id
      name
      description
      type
    }
    pagination {
      cursor
      hasMore
      limit
    }
  }
}

Parameters

ParameterTypeDefaultDescription
typeSavedSearchType-Filter by search type (CONTENT or ASSET)
cursorStringnullCursor for pagination
limitInt20Items per page

Example

query {
  savedSearches(type: CONTENT, limit: 10) {
    data {
      id
      name
      description
      type
    }
    pagination {
      cursor
      hasMore
    }
  }
}
Response:
{
  "data": {
    "savedSearches": {
      "data": [
        {
          "id": "ss123",
          "name": "Recent Tutorials",
          "description": "Tutorials updated in the last 30 days",
          "type": "CONTENT"
        },
        {
          "id": "ss124",
          "name": "Published Articles",
          "description": "All published blog articles",
          "type": "CONTENT"
        }
      ],
      "pagination": {
        "cursor": null,
        "hasMore": false
      }
    }
  }
}
Fetch a specific saved search by ID.
query GetSavedSearch($id: ID!) {
  savedSearch(id: $id) {
    id
    name
    description
    type
  }
}

Parameters

ParameterTypeRequiredDescription
idID!YesSaved search ID
Run a saved search and get paginated results.
query ExecuteSavedSearch($id: ID!, $cursor: String, $limit: Int) {
  executeSavedSearch(id: $id, cursor: $cursor, limit: $limit) {
    ... on ContentList {
      data {
        id
        name
        tags
        compiled
      }
      pagination {
        cursor
        hasMore
        limit
      }
    }
    ... on AssetList {
      data {
        id
        name
        type
        url
      }
      pagination {
        cursor
        hasMore
        limit
      }
    }
  }
}

Parameters

ParameterTypeRequiredDescription
idID!YesSaved search ID
cursorStringNoCursor for pagination
limitIntNoItems per page (default: 20)

Example

query {
  executeSavedSearch(id: "ss123", limit: 10) {
    ... on ContentList {
      data {
        id
        name
        tags
      }
      pagination {
        cursor
        hasMore
      }
    }
  }
}
Response:
{
  "data": {
    "executeSavedSearch": {
      "data": [
        {
          "id": "cont456",
          "name": "Getting Started Guide",
          "tags": ["tutorial", "beginner"]
        },
        {
          "id": "cont457",
          "name": "Advanced Patterns",
          "tags": ["tutorial", "advanced"]
        }
      ],
      "pagination": {
        "cursor": "eyJsYXN0SWQiOiJjb250NDU3IiwibGFzdFVwZGF0ZWRBdCI6IjIwMjQtMDEtMTVUMTA6MDA6MDBaIn0=",
        "hasMore": false
      }
    }
  }
}

Saved Search Fields

FieldTypeDescription
idID!Unique identifier
nameString!Search name
descriptionStringSearch description
typeSavedSearchType!CONTENT or ASSET

SavedSearchType Enum

ValueDescription
CONTENTSearch returns content items
ASSETSearch returns asset items
The executeSavedSearch query returns a union type. Use inline fragments (... on ContentList or ... on AssetList) to access the appropriate fields based on the saved search type.