Find the API you need

Browse registered social-data routes across platforms, then dive into detailed reference docs

API overview

TRMesh provides cross-platform social data APIs. Use one developer key to call endpoints in the public catalog for accounts, content and other supported data. Availability and input/output contracts follow each endpoint's current documentation.

This overview covers shared integration rules. Use Quickstart for your first call and the endpoint reference for parameters, pagination and business response fields.

Service address and versions

Call TRMesh APIs over HTTPS. Append the endpoint path to this base URL; do not add /openapi twice.

https://api.trmesh.com/openapi

For example, append /api/v1/wechat_mp/v2/fetch_account_articles to obtain:

POST https://api.trmesh.com/openapi/api/v1/wechat_mp/v2/fetch_account_articles

Keep all version segments exactly as documented; do not substitute v1 or v2. The website is for browsing documentation; programmatic calls use the API domain above.

Identity and access

Every request requires a valid TRMesh developer key (project token). Its account, the key and the target endpoint must be active. A valid key alone does not guarantee sufficient balance, quota or endpoint access.

Authorization: Bearer YOUR_API_TOKEN

Read authentication details →

Request requirements

  • Use the documented HTTP method. Put query parameters in the URL and send JSON bodies with Content-Type: application/json.
  • Required fields, types, pagination and parameter locations are endpoint-specific.
  • Use UTF-8 for request text and URL-encode query values. Preserve the documented numeric, boolean, array and object types instead of converting every value to a string.
  • Page numbers, cursors, size limits and end conditions are endpoint-specific. Continue with the returned cursor where applicable; do not assume every endpoint accepts page or limit.
  • No special User-Agent is required. Keep your developer key on the server, out of public pages, repositories and URLs.

Response structure and success

Check the HTTP status before parsing JSON. A public code of 0 indicates a successful gateway response; also inspect the endpoint's business result in data. An empty list is not necessarily an error, and HTTP 200 does not guarantee the requested data exists.

FieldDescription
codePublic status code, normally 0 on success; interpret failures with the HTTP status.
msgResult or error description.
dataEndpoint-specific business data; may be absent on failure.
error_codeMachine-readable failure identifier for error handling.
meta.request_idRequest identifier to retain for troubleshooting.

Fields from an actual invalid-key response (request metadata omitted):

HTTP 401
{
  "code": 401,
  "msg": "The provided developer API key was not found.",
  "error_code": "developer_api_key_invalid"
}

Common errors and actions

HTTPAction
400Check required parameters, types and the error message before retrying.
401Check that the developer key is present and correct; do not use a login token.
403Check account, key and endpoint status and read error_code; 403 alone does not identify an invalid key.
404 / 409Check domain, path, HTTP method and endpoint availability.
429Reduce request rate, queue work and apply bounded backoff.
502 / 503 / 504The service may be temporarily unavailable or timed out; read-only queries may be retried with delays and a retry limit.

Configure connection and read timeouts. A disconnect or client timeout does not mean the server did not execute the request; retries may create new requests and charges. Confirm the original result before retrying operations with side effects. For non-JSON responses, retain the raw status, headers and body rather than hiding the cause behind a JSON parse error.

Rate limits and concurrency

RPS means requests per second, not simultaneous in-flight requests. Current limits check one-second windows by user, token and IP; your workspace settings determine the applicable limits. Coordinate request pacing across jobs or keys sharing an account. Requests rejected by TRMesh rate limiting return 429 without a charge.

Billing, free quota and failures

  • Amounts are denominated in USD. Use the current endpoint price; one endpoint's price does not apply to all endpoints.
  • Eligible endpoints use available free quota first and may show a zero charge; otherwise paid balance is used. Discounts apply only when both the user and endpoint are eligible.
  • When the gateway determines forwarding failed, reserved charges or free quota are reversed. A client timeout is not equivalent to gateway failure; check the final usage and balance records.

Troubleshooting a request

  1. Record the time and timezone, HTTP method, path, status, error identifier and meta.request_id.
  2. Find the request in workspace usage logs and check status, duration and charge; also review balance transactions for billing issues.
  3. If unresolved, provide support with these details and redacted request/response content. Never send a full key, password or cookie.

Make your first call →