Tags

Search

GET /search/tags
Parameter Type Default Required Description
query string - Tag label to search by.
exclude string - Specify one or more tags which should be excluded from the search.
used_only boolean false Deprecated. Specify whether only tags which are used in at least one question should be included. This flag should not be used, because tags that are only connected to solutions or used otherwise, are ignored.
limit int 10 Sets how many tags are returned at once.
offset int 0 Offset from the first tag.

Text search on all tags.

{
    "total": 1,
    "_links": {
        "self": {
            "href": "/search/tags?query=Sherlock"
        }
    },
    "items": [
        "Sherlock",
        ...
    ]
}

Tag Suggestions

GET /search/tags/suggestions is deprecated from version 0.18.0. Use the POST endpoint instead, which allows descriptions of unlimited length.

POST /search/tags/suggestions

This request tries to find tags that fit well with the provided title and description texts. The response may contain both tags that already exist in the network, as well as new tags that are extracted from the given text.

The title text is weighted stronger than the description text.

The response contains an ordered list of tags, with the most relevant tags at the start of the list.

Parameter Type Default Required Description
title string - Title text.
description string (HTML + mentioning markup) - Description text.
excluded_tags array of strings [] A list of tags that are excluded from the search.
limit int 10 The maximum number of tags that are returned.

Json Payload

{
    "title": "Is Sherlock Holmes really dead?",
    "description": "<p>Post any information to 221B Baker Street, London.</p>",
    "excluded_tags": ["Holmes"],
    "limit": 2
}

Response

{
    "total": 2,
    "items": [
        "Sherlock",
        "London"
    ]
}