# Get query suggestions

Get TikTok Get query suggestions data via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no cookies required. Powered by TikHub, pass parameters such as code, data, params, and retrieve structured data including business status code, search query, returned msg field, reported count, and returned scenario field for content research and account lookup, and integration reference.

Documentation: https://openany.si/market/apis/tiktok/tiktok-get-query-suggestions/?offering=24201d0e-cb9f-4440-890f-483196efc89f
API ID: 24201d0e-cb9f-4440-890f-483196efc89f
Provider: tikhub
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/tikhub/api/v1/tiktok/ads/get_query_suggestions
Page update time: 2026-12-03T02:52:51.451Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.001 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:52:50.824Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "1000",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Get query suggestions request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "场景1留空返回热门建议；场景2传入关键词/Empty for scenario 1; input a keyword for scenario 2"
        },
        "count": {
          "type": "integer",
          "description": "建议数量/Suggestion count"
        },
        "scenario": {
          "type": "integer",
          "description": "场景类型：1热门建议，2关键词联想/1 popular, 2 related suggestions"
        },
        "country_code": {
          "type": "string",
          "description": "可选国家/地区代码/Optional country code"
        },
        "cookie": {
          "type": "string",
          "description": "自定义Cookie字符串（可选）/Custom Cookie string (optional)"
        }
      }
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer"
    },
    "data": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer"
        },
        "data": {
          "type": "object",
          "properties": {
            "query": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "msg": {
          "type": "string"
        }
      }
    },
    "params": {
      "type": "object",
      "properties": {
        "count": {
          "type": "string"
        },
        "scenario": {
          "type": "string"
        }
      }
    },
    "router": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example (HTTP assumed)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/tikhub/api/v1/tiktok/ads/get_query_suggestions' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "code": 200,
  "data": {
    "code": 0,
    "data": {
      "query": [
        "shop now",
        "50% off"
      ]
    },
    "msg": "OK"
  },
  "params": {
    "count": "50",
    "scenario": "1"
  },
  "router": "/api/v1/tiktok/ads/get_query_suggestions"
}'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Configured HTTP 200; actual status is unverified.
```json
{
  "code": 200,
  "data": {
    "code": 0,
    "data": {
      "query": [
        "shop now",
        "50% off"
      ]
    },
    "msg": "OK"
  },
  "params": {
    "count": "50",
    "scenario": "1"
  },
  "router": "/api/v1/tiktok/ads/get_query_suggestions"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- tikhub: https://openany.si/market/apis/tiktok/tiktok-get-query-suggestions/?offering=24201d0e-cb9f-4440-890f-483196efc89f

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
