Social API reference

Social API · Hashtags

get/v1/communities/{community_id}/search/hashtagsAuth

Prefix-search hashtags for autocomplete.

Backed by a `text_pattern_ops` partial index — sub-100ms for any prefix length up to communities with millions of tags. Results are alphabetically ordered.

Path parameters

community_id*string

Social community UUID. Must belong to the PAK's workspace.

Query parameters

q*string

Lowercase prefix (1..32 chars).

limitinteger

Maximum number of items to return (1-50, default 20).

Response · 200 Matching hashtags.

data*array

Hashtags starting with the prefix, most used first.

pagination*object

Always `null` — autocomplete returns a single bounded, ranked page (no cursor). Present for envelope consistency (task 008 / G13).

Example

Request

GET https://social.productcraft.co/v1/communities/{community_id}/search/hashtags
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
      "tag": "storymode",
      "first_used_at": "2026-05-01T12:00:00.000Z",
      "window_post_count": null
    }
  ],
  "pagination": {}
}