Skip to content

List blog tags

GET
/public/stores/{storeRef}/blog/tags
curl --request GET \
--url 'https://apibase.ecomweb.app/api/v1/public/stores/example/blog/tags?sort_order=asc' \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns a page of the store’s blog tags with their post counts. Page with limit and offset, search by name with search, and sort with sort_by and sort_order.

storeRef
required
string

The store’s ref, as returned by GET /stores.

search
string

Free-text search over name and slug.

sort_by
string

Field to sort by: name, slug, created_at or post_count. Defaults to name.

sort_order
string
Allowed values: asc desc

Sort direction.

limit
number
>= 1

Maximum number of items to return, at least 1. Defaults to 20 on the store list.

offset
number

Number of items to skip. Defaults to 0.

include_post_counts
boolean

Include each item’s post_count. The store list always includes it.

Media typeapplication/json
object
data
required
Array<object>
object
id
required

Tag ID.

number
name
required

Display name.

string
slug
required

URL slug, unique within the store.

string
post_count

Number of posts with the tag. Present when post counts are included; always present on the paginated list.

number
created_at

When the tag was created, as an ISO 8601 timestamp.

string
nullable
meta
required
object
total
required

Total number of items matching the request.

number
limit
required

Maximum number of items in this page.

number
offset
required

Number of items skipped before this page.

number
page
required

Current page number, starting at 1.

number
totalPages
required

Total number of pages.

number
hasNext
required

Whether a next page exists.

boolean
hasPrev
required

Whether a previous page exists.

boolean

Example generated

{
"data": [
{
"id": 1,
"name": "example",
"slug": "example",
"post_count": 1,
"created_at": "example"
}
],
"meta": {
"total": 1,
"limit": 1,
"offset": 1,
"page": 1,
"totalPages": 1,
"hasNext": true,
"hasPrev": true
}
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}