List tags
Log in to add to favouritesPage last updated 02 July 2025
Get a list of all tags, tags belonging to a particular group, or supply options to find tags with a simple query or provide additional refinements.
Call signatures
list(): Promise<PagedList<Tag>>;
list(groupId: string): Promise<PagedList<Tag>>;
list({
groupId?: string;
language?: string;
order?: string[];
pageOptions?: PageOptions;
q?: string;
}: TagListOptions): Promise<PagedList<Tag>>;Parameters
| Name | Type | Description |
|---|---|---|
| groupId | string | The tag GUID identifier |
| options | TagListOptions | An options object to find tags with a simple query, in a specific groupId or language, provide paging options or to order results by specific tag fields |
Returns
Remarks
Throws any error that is returned by the API for any unsuccessful request echoing the HTTP status returned from the API
Examples
const tags = await client.tags.list();
console.log(`Found ${tags.totalCount} tags`);
if (tags.totalCount > tags.pageSize)
console.log(`Showing the first ${tags.pageSize}/${tags.totalCount}`);
for (const tag of tags.items) {
console.log(`${tag.groupId}: ${tag.value} ${tag.label['en-GB']}`);
}const tags = await client.tags.list("topics");
console.log(`Found ${tags.totalCount} tags in Topics`);const tags = await client.tags.list({
groupId: "topics",
q: "Books",
language: "en-GB",
pageOptions: {
pageSize: 100,
pageIndex: 1
},
order: ["label", "-version.modifed"]
});
console.log(`Page ${tags.pageIndex + 1} of ${tags.pageCount}`);
for (const tag of tags.items) {
console.log(`${tag.value} ${tag.label['en-GB']}`);
}