1 credit per result returned · All plans from $0.00012/credit
Requires a connected X account. Uses user-authenticated access.
curl -G https://xquik.com/api/v1/x/dm/44196397/history \
-H "x-api-key: xq_YOUR_KEY_HERE" | jq
# Page 2
curl -G https://xquik.com/api/v1/x/dm/44196397/history \
--data-urlencode "cursor=abc123" \
-H "x-api-key: xq_YOUR_KEY_HERE" | jq
Path parameters
Target X user ID for the DM conversation (numeric string).
Query parameters
Pagination cursor. Pass the next_cursor value from the previous response to fetch older messages.
Your API key. Session cookie authentication is also supported.
Response
Array of direct messages.
Message text. Omitted if unavailable.
Sender user ID. Omitted if unavailable.
Receiver user ID. Omitted if unavailable.
ISO 8601 timestamp. Omitted if unavailable.
Whether older messages are available.
Opaque cursor for the next page. Empty string when no more messages.
{
"messages": [
{
"id": "1893456789012345678",
"text": "Hey, great tool!",
"senderId": "44196397",
"receiverId": "987654321",
"createdAt": "2026-02-24T10:00:00.000Z"
}
],
"has_next_page": true,
"next_cursor": "1893456789012345677"
}
{ "error": "invalid_user_id" }
The user ID is empty or invalid.{ "error": "unauthenticated" }
Missing or invalid API key.{ "error": "no_subscription" }
No active subscription or usage limit reached.{ "error": "x_api_unavailable" }
The X data source returned an error. Retry after a short delay.