API Documentation

Detailed API reference and usage guide

Trends

GET

Description

Get Twitter trending topics

Endpoint URL

https://api.twtapi.com/api/v1/twitter/Trends

Parameters

NameTypeRequiredDescription
woeidnumberYesWhere On Earth ID for the region. Common values: 1=Worldwide, 23424819=Japan, 23424977=USA, 2151849=Hong Kong, 23424775=Australia

Response Example

{
  "success": true,
  "data": {
    "trends": [
      {
        "name": "#Bitcoin",
        "url": "https://twitter.com/search?q=%23Bitcoin",
        "tweet_volume": 125400
      }
    ]
  }
}

Error Codes

Common business error codes returned by the backend. All APIs use the unified response format: { code, msg, data }.

Note: `code` is the business status code in response body and may differ from HTTP status.

CodeNameDescriptionRecommendation
200SuccessRequest processed successfully.Use `data` for business payload.
400Bad RequestInvalid parameters or business validation failed.Check required fields, value ranges, and request format.
401UnauthorizedAuthentication failed (login required, missing/invalid API key).Re-login or provide a valid `X-API-Key`.
402Insufficient BalanceInsufficient balance or call quota for this request.Recharge or upgrade your plan and retry.
403ForbiddenYou do not have permission or account status is restricted.Check account status and endpoint permission.
404Not FoundRequested resource does not exist.Verify IDs/order numbers and whether data exists.
429Rate Limit ExceededRequest frequency exceeded per-second/per-hour/monthly limits.Use retry with backoff or lower request frequency.
500Internal Server ErrorServer-side processing failed.Retry later and contact support if it persists.
502Service Temporarily UnavailableThe service request failed to be processed.Please try again later.
503Service BusySystem is busy or global protection limit is triggered.Retry after a short wait.

Code Generator

curl -X GET "https://api.twtapi.com/api/v1/twitter/Trends?lang=en" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Lang: en"

Test API

Request Parameters