Search

Search Publications

History
VersionChange
release-2024-03Added ignoreComponentConditions and componentConditions query parameters.
release-2023-07Added filters query parameter to support the Public API Search DSL.

Required scope: public-api:read

Description

This endpoint allows filtering for published documents.

Use Cases

  • Automatic teaser lists like topic pages (filtered by Metadata properties)
  • Ticker Tool

Warning

Even when it’s possible to make a full-text search to this endpoint, it’s not thought to be used by a frontend search (because of performance reasons)

Curl Example
ACCESS_TOKEN=ey1234
curl -k -X GET "https://server.livingdocs.io/api/2025-03/publications/search" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Endpoint

GET /api/2025-03/publications/search

Parameters

NameTypeRequiredNotes
?searchstringSearch term to perform a full-text search with. For exact word matches use “, e.g. search=“Ukulele”
?contentTypesstringComma separated list of content-types for which documents should be found. Content types are concatenated with OR. Example: ‘regular,author’
?categoriesstringComma separated list of category ids for which documents should be found. Categories are concatenated with OR. Example: ‘sport,fashion’
?languagesstringComma separated list of languages for which documents should be found. Languages are concatenated with OR. Example: ’en,de'
?languageGroupIdstringA GroupId used to fetch all translations of a document.
Using the ?languages param a document in a specific language can be fetched.
Example: ?languageGroupId=47&language=de
?filtersstringA JSON string which follows the search filters query DSL
?sortstringComma separated list of sort properties. Any of the Sort Fields can be used. The sort order can be reversed by prefixing the property with a -
?fieldsstringComma separated list of properties to include in the response. Defaults to systemdata,metadata,content. Use id if you only want to retrieve the ids of the published documents. Useful (and faster) if you are fully synchronizing your frontend with the publication events
?limitintegerA limit for how much published documents to retrieve. Defaults to 10. Max. 100
?offsetintegerAn offset into the query. Useful when getting more than 100 results (pagination). Max. 10000
?ignoreComponentConditionsbooleanAdded in: release-2024-03

Provides a way to opt out of component filtering and return all content regardless of whether each component passes the conditional checks.

Default: false

?componentConditionsstringAdded in: release-2024-03

JSON stringified object which contains the component conditions you would like to apply.

Default: dateTime: new Date()
Example: ?componentConditions={"dateTime":"2024-02-14T17:25:10.391Z"}

Response

200
OK
/api/2025-03/publications/search?search=Obama
[
  {
    "systemdata": {
      "projectId": 1,
      "channelId": 1,
      "documentId": 1,
      "contentType": "article",
      "documentType": "article",
      "design": {
        "name": "timeline",
        "version": "1.1.0"
      }
    },
    "metadata": {
      "title": "Obama re-elected",
      "description": "some lead",
      "dependencies": {},
      "testDependency": "li-test-dependency.onUpdate is correct"
    },
    "content": [
      {
        "id": "doc-1b8i1ksh10",
        "component": "head",
        "identifier": "timeline.head",
        "content": {
          "title": "Obama re-elected",
          "text": "some lead"
        }
      },
      {
        "id": "doc-1b8i1ksh20",
        "component": "normal",
        "identifier": "timeline.normal",
        "content": {
          "caption": "my caption"
        },
        "styles": {
          "position": "left"
        }
      },
      {
        "id": "doc-1b8i1ksh30",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "first paragraph"
        }
      },
      {
        "id": "doc-1b8i1me1d0",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "second paragraph"
        }
      }
    ]
  }
]
200
OK
/api/2025-03/publications/search?categories=sport,fashion&languages=en
[
  {
    "systemdata": {
      "projectId": 1,
      "channelId": 1,
      "documentId": 1,
      "contentType": "article",
      "documentType": "article",
      "design": {
        "name": "timeline",
        "version": "1.1.0"
      }
    },
    "metadata": {
      "title": "Bayern to win Champions League",
      "description": "some lead",
      "category": {
        "id": "sport"
      },
      "language": {
        "locale": "en"
      },
      "dependencies": {},
      "testDependency": "li-test-dependency.onUpdate is correct"
    },
    "content": [
      {
        "id": "doc-1b8i1ksh10",
        "component": "head",
        "identifier": "timeline.head",
        "content": {
          "title": "Bayern to win Champions League",
          "text": "some lead"
        }
      },
      {
        "id": "doc-1b8i1ksh20",
        "component": "normal",
        "identifier": "timeline.normal",
        "content": {
          "caption": "my caption"
        },
        "styles": {
          "position": "left"
        }
      },
      {
        "id": "doc-1b8i1ksh30",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "first paragraph"
        }
      },
      {
        "id": "doc-1b8i1me1d0",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "second paragraph"
        }
      }
    ]
  }
]
200
OK
/api/2025-03/publications/search?contentTypes=regular,gallery&limit=10&offset=10
[
  {
    "systemdata": {
      "projectId": 1,
      "channelId": 1,
      "documentId": 1,
      "contentType": "regular",
      "documentType": "article",
      "design": {
        "name": "timeline",
        "version": "1.1.0"
      }
    },
    "metadata": {
      "title": "Bayern to win Champions League",
      "description": "some lead",
      "category": {
        "id": "sport"
      },
      "language": {
        "locale": "en"
      },
      "dependencies": {},
      "testDependency": "li-test-dependency.onUpdate is correct"
    },
    "content": [
      {
        "id": "doc-1b8i1ksh10",
        "component": "head",
        "identifier": "timeline.head",
        "content": {
          "title": "Bayern to win Champions League",
          "text": "some lead"
        }
      },
      {
        "id": "doc-1b8i1ksh20",
        "component": "normal",
        "identifier": "timeline.normal",
        "content": {
          "caption": "my caption"
        },
        "styles": {
          "position": "left"
        }
      },
      {
        "id": "doc-1b8i1ksh30",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "first paragraph"
        }
      },
      {
        "id": "doc-1b8i1me1d0",
        "component": "p",
        "identifier": "timeline.p",
        "content": {
          "text": "second paragraph"
        }
      }
    ]
  }
]
200
OK
/api/2025-03/publications/search?contentTypes=article&limit=999&fields=id
[
  {
    "documentId": 1,
    "projectId": 1
  },
  {
    "documentId": 2,
    "projectId": 1
  }
]