List available tags
Fetch the public tag list for article filters and tag selectors.
Use the tags endpoint to retrieve the tag names currently available to clients. Authentication is not required, so a frontend can load the list before a user signs in and use it to populate a selector or construct an article filter.
The endpoint is part of the public demo API at https://api.realworld.show/api. It returns a JSON object with a required tags array of strings. An empty list is represented as "tags": [], not as a missing field or null.
GET /tags
/tagscurl --request GET \ --url https://api.realworld.show/api/tags
{ "tags": ["dragons", "training", "demo"] }Request
No path, query, or body parameters are defined, and no authorization header is required.
curl --request GET \
--url "https://api.realworld.show/api/tags"The successful response is an object with one required property:
| Field | Type | Meaning |
|---|---|---|
tags | array of strings | Tag names available to the client. |
The endpoint does not return article objects or counts. Use the returned strings as values for your interface, then pass the selected value to the article list operation's tag filter. See list and filter articles for the article query workflow.
Error response
An unexpected request error returns 422 Unprocessable Entity with the shared errors object. Each error key maps to an array of messages. Handle it with the same error envelope used by the other endpoints; a tags request does not need a token refresh because authentication is not part of this operation.
Use tags in a client
Keep the response order returned by the API unless your product requires a separate sort rule. A JavaScript client can read the array and render each value as a selector option:
const response = await fetch("https://api.realworld.show/api/tags");
if (!response.ok) {
throw new Error(`Tag request failed: ${response.status}`);
}
const { tags } = await response.json();
for (const tag of tags) {
addTagOption(tag);
}The observable success condition is that tags is an array and every item is a string. When a user selects a tag, URL-encode it as the tag query value in the article-list request.
Next steps
Use the tag values with list and filter articles, or review the response envelopes and resource models before mapping the response into your client.