> ## Documentation Index
> Fetch the complete documentation index at: https://docs.osintcat.net/llms.txt
> Use this file to discover all available pages before exploring further.

# X (Twitter) Profile

> Public X profile, recent posts and an automated summary

Returns the public profile of an X (Twitter) account and an automated, best-effort summary of its recent public posts (topics, language, tone, posting pattern). Treat the summary as unverified.

## Parameters

<ParamField query="query" type="string" required>
  The X username, with or without `@`.
</ParamField>

## Headers

<ParamField header="X-API-KEY" type="string" required>
  Your API key.
</ParamField>

## Usage

Counts as one lookup against your plan's daily allowance (Max: unlimited). When the allowance is used up, the lookup can continue at a per-lookup price charged to your balance (the module's page in the dashboard shows the price); a lookup that finds nothing is not charged.

## Example request

<RequestExample>
  ```bash cURL theme={null}
  curl "https://www.osintcat.net/api/twitter-osint?query=jack" \
       -H "X-API-KEY: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  url = "https://www.osintcat.net/api/twitter-osint"
  params = {"query": "jack"}
  headers = {"X-API-KEY": "YOUR_API_KEY"}

  response = requests.get(url, params=params, headers=headers, timeout=60)
  print(response.status_code, response.json())
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://www.osintcat.net/api/twitter-osint?query=jack", {
    headers: { "X-API-KEY": "YOUR_API_KEY" },
  });
  console.log(response.status, await response.json());
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init("https://www.osintcat.net/api/twitter-osint?query=jack");
  curl_setopt_array($curl, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => ["X-API-KEY: YOUR_API_KEY"],
  ]);
  $response = curl_exec($curl);
  $status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
  curl_close($curl);
  echo $status . " " . $response;
  ```

  ```go Go theme={null}
  package main

  import (
      "fmt"
      "io"
      "net/http"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/twitter-osint?query=jack", nil)
      req.Header.Set("X-API-KEY", "YOUR_API_KEY")
      resp, err := http.DefaultClient.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(resp.StatusCode, string(body))
  }
  ```
</RequestExample>

## Response

<ResponseField name="status" type="string">
  `success`.
</ResponseField>

<ResponseField name="profile" type="object">
  The public profile.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Account ID.
    </ResponseField>

    <ResponseField name="username" type="string">
      Handle.
    </ResponseField>

    <ResponseField name="name" type="string">
      Display name.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Account creation.
    </ResponseField>

    <ResponseField name="followers" type="number">
      Followers.
    </ResponseField>

    <ResponseField name="following" type="number">
      Following.
    </ResponseField>

    <ResponseField name="tweets_count" type="number">
      Posts.
    </ResponseField>

    <ResponseField name="description" type="string">
      Bio.
    </ResponseField>

    <ResponseField name="profile_image" type="string">
      Profile picture.
    </ResponseField>

    <ResponseField name="banner_image" type="string">
      Banner.
    </ResponseField>

    <ResponseField name="verified" type="boolean">
      Verified.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="recent_tweets_scraped" type="number">
  How many recent posts the summary is based on.
</ResponseField>

<ResponseField name="ai_analysis" type="object">
  The automated summary (interests, language, likely region, tone, activity pattern, authenticity estimate). Empty when no summary could be made.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "status": "success",
    "profile": {
      "id": "12",
      "username": "jack",
      "name": "jack",
      "created_at": "2006-03-21",
      "followers": 6500000,
      "following": 3,
      "tweets_count": 30000,
      "verified": true
    },
    "recent_tweets_scraped": 30,
    "ai_analysis": {
      "dominant_language": "English"
    }
  }
  ```
</ResponseExample>

## Errors

| Status | Error | When |
| - | - | - |
| 404 | `User '...' not found on X (Twitter).` | No account with that username. Not charged. |

See [Errors](/api-reference/introduction#errors) for the responses every endpoint can return.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.