Skip to content

Quickstart

RelayX is a REST API for public X (Twitter) data. Every request uses the same base URL and one header.

  • Base URL: https://api.relayxapi.com
  • Auth header: X-API-Key: <your key>

Create an account in the dashboard and create an API key. New accounts include free trial credits.

This example fetches a user profile by handle (no @):

Terminal window
curl "https://api.relayxapi.com/twitter/user/info?userName=jack" \
-H "X-API-Key: YOUR_KEY"

Single-object endpoints wrap the result in data:

{
"status": "success",
"msg": "",
"data": {
"type": "user",
"userName": "jack",
"id": "12",
"name": "jack",
"followers": 12281329
}
}

List endpoints return the items under a named key (such as tweets or followers), plus has_next_page and next_cursor for paging. Each response carries X-Credits-Cost and X-Credits-Remaining headers.