X (Twitter) Profile
POST /api/v1/x/profile
Get a public X (Twitter) profile: name, handle, bio, followers, following, verified status, and profile picture.
Overview
Get a public X (Twitter) profile: name, handle, bio, followers, following, verified status, and profile picture.
POST /api/v1/x/profile
Method: POST Path: /api/v1/x/profile Category: Social Media
Request Parameters
Endpoint Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| profile_url | string | Required | Public X profile URL or username, e.g. https://x.com/elonmusk |
Request Example
X (Twitter) Profile Request Examples
curl -X POST "https://api.dataguru.cc/api/v1/x/profile" \ -H "Authorization: Api-Key YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"profile_url": "example"}'
Response Example
200 OK
Typical 200 OK JSON response structure with envelope metadata.
{ "user_profile": { "username": "string", "full_name": "string", "biography": "string", "external_link": "https://example.com/...", "follower_count": 0, "following_count": 0, "total_post_count": 0, "account_category": "string", "verified_badge": false, "profile_picture_hd_url": "https://example.com/...", "unique_id": "1234567890", "nickname": "string", "total_heart_like_count": 0, "video_count": 0, "screen_name": "string", "location": "string", "join_date": "2026-01-01T12:00:00Z", "verified_type": "Blue", "pinned_tweet_id": "1234567890" }, "_metadata": { "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e", "execution_time_ms": 842, "endpoint": "X (Twitter) Profile", "mode": "live", "format": "json", "timestamp": "2026-01-01T12:00:00+00:00" } }
Response Schema
Fields returned in a successful response. Nested fields use dot notation and `[]` marks items of a list. Fields that are not required can be missing or `null` when the source does not provide them. Every response also includes a `_metadata` block.
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
| user_profile | object | Yes | Public profile data for the requested X account. |
| user_profile.username | string | Yes | Account handle without the '@' (e.g. 'elonmusk'). |
| user_profile.full_name | string | Yes | Display name; falls back to the handle when not found. |
| user_profile.biography | string | Yes | Profile bio text. Empty string when not found. |
| user_profile.external_link | string | Yes | Expanded website link from the bio. Empty string when none. |
| user_profile.follower_count | integer | null | Yes | Number of followers. |
| user_profile.following_count | integer | null | Yes | Number of accounts followed. |
| user_profile.total_post_count | integer | null | Yes | Total number of posts (tweets). |
| user_profile.account_category | string | Yes | Affiliate label or account category. Empty string when none. |
| user_profile.verified_badge | boolean | Yes | True if the account has any verification badge (blue, government or business). |
| user_profile.profile_picture_hd_url | string | Yes | Profile picture URL at 400x400 resolution. |
| user_profile.unique_id | string | Yes | Numeric X user ID (rest ID) as a string. Empty string when not found. |
| user_profile.nickname | string | Yes | Display name (same as full_name). |
| user_profile.total_heart_like_count | integer | null | Yes | Number of posts the account has liked. |
| user_profile.video_count | integer | null | Yes | Number of media posts. |
| user_profile.screen_name | string | Yes | Account handle (same as username). |
| user_profile.location | string | Yes | Location from the profile. Empty string when none. |
| user_profile.join_date | string | Yes | Date the account joined, YYYY-MM-DD (day is 01 when only month and year are known). Empty string when not found. |
| user_profile.verified_type | string | Yes | Badge type: 'Blue', 'Government' or 'Business'. Empty string when not verified. |
| user_profile.pinned_tweet_id | string | Yes | ID of the pinned post. Empty string when none. |
Asynchronous Requests
Long-running requests can be processed in the background. Add `?async=true` (or the `Prefer: respond-async` header) to receive a `job_id` immediately, then poll the job until its status is `COMPLETED`.
Async Workflow
curl -X POST "https://api.dataguru.cc/api/v1/x/profile?async=true" \ -H "Authorization: Api-Key YOUR_API_KEY" # 202 Accepted { "success": true, "status": "SUBMITTED", "job_id": "0ca215ce-244f-4b28-b481-dc1b551983c8", "status_url": "/api/v1/jobs/0ca215ce-244f-4b28-b481-dc1b551983c8/" }
Batch Processing
To run many requests at half price, upload them as a CSV file: one row per request, with the parameter names above as the header row. Rows run in the background within 24 hours (up to 7 days for large files) and each successful row costs 50% of the price below. Poll /api/v1/batches/{batch_id}/ for progress and download results.json when it has finished. See the Batch Processing guide for details.
Batch Workflow
profile_url example
Pricing & Rate Limits
Endpoint Pricing
$0.0025 / per successful request (USD)
Consumed per successful call: 1 request unit(s), 1 credit(s).
Endpoint Rate Limits
Common Errors
Common HTTP Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | A required parameter is missing or malformed. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | INSUFFICIENT_BALANCE | Your balance cannot cover this request. |
| 403 | ENDPOINT_DISABLED | This endpoint is currently unavailable. |
| 405 | METHOD_NOT_ALLOWED | The endpoint was called with the wrong HTTP method. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. See the Retry-After header. |
| 502 | PROVIDER_ERROR | The upstream data source failed. Retry with exponential backoff. |