Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.twitterapi.io/llms.txt

Use this file to discover all available pages before exploring further.

Skip writing auth + pagination boilerplate — install the official AI agent skill and let Claude Code, Cursor, Copilot, etc. handle it:
npx skills add kaitoInfra/twitterapi-io

API Authentication

Every API request requires authentication using an API key in the HTTP headers.

Getting Your API Key

  1. Log in to your TwitterApiIO Dashboard
  2. Find your API key displayed on the dashboard homepage

Using Your API Key

All API requests must include the x-api-key header for authentication. Header format:
x-api-key: YOUR_API_KEY
Example requests:

cURL

curl --location 'https://api.twitterapi.io/twitter/user/followings?userName=KaitoEasyAPI' \
--header 'x-api-key: my_test_xxxxx'

Python

import requests

url = 'https://api.twitterapi.io/twitter/user/followings?userName=KaitoEasyAPI'
headers = {'x-api-key': 'my_test_xxxxx'}
response = requests.get(url, headers=headers)
print(response.json())

Java

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
    .url("https://api.twitterapi.io/twitter/user/followings?userName=KaitoEasyAPI")
    .addHeader("x-api-key", "my_test_xxxxx")
    .build();

try (Response response = client.newCall(request).execute()) {
    System.out.println(response.body().string());
} catch (Exception e) {
    e.printStackTrace();
}