getTagBySlug( )


Gets a tag by the specified slug.

The getTagBySlug() function returns a Promise that resolves to a tag whose slug matches the specified slug.

The slug is the end of a tag's URL that refers to a specific tag. For example, if a tag's URL is https://example.com/blog/tag/{my-tag-slug}, the slug is my-tag-slug. The slug is case-sensitive and derived from the tag's label.

Permissions
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
slugstringRequired

Slug of the tag to retrieve.


optionsGetTagBySlugOptions

Options specifying which additional fields to return.

Returns
Return Type:Promise<GetTagBySlugResponse>
Was this helpful?
Yes
No