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

# Get cached tweet style samples with the Xquik API

> Retrieve cached tweet writing samples for one X username or custom style label. Read tweet text, authors, timestamps, sample count, and ownership status.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-styles-get-200">
      ```json theme={null}
      {
        "xUsername": "elonmusk",
        "tweetCount": 50,
        "isOwnAccount": true,
        "fetchedAt": "2025-01-15T12:00:00Z",
        "tweets": [
          {
            "id": "1234567890",
            "text": "Just launched our new feature!"
          }
        ]
      }
      ```
    </Tab>

    <Tab title="401" id="response-styles-get-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="404" id="response-styles-get-404">
      ```json theme={null}
      {
        "error": "not_found",
        "message": "Resource not found."
      }
      ```
    </Tab>

    <Tab title="429" id="response-styles-get-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="circle-check" color="#16a34a">
  **Free.** This endpoint does not consume credits.
</Callout>

## Retrieve one cached tweet writing profile

Call this endpoint to retrieve stored tweet samples for one writing profile.
The request reads Xquik's existing cache. It does not contact X or refresh
tweets.

Use an analyzed X username or a saved custom label as `{id}`. Xquik lowercases
the path value before lookup. The route does not accept a numeric database ID.

The lookup stays inside the authenticated Xquik account. Another customer can
cache the same username. You cannot read their profile.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://xquik.com/api/v1/styles/elonmusk \
    -H "x-api-key: xq_YOUR_KEY_HERE" | jq
  ```

  ```javascript Node.js theme={null}
  const styleKey = "elonmusk";
  const response = await fetch(`https://xquik.com/api/v1/styles/${encodeURIComponent(styleKey)}`, {
    method: "GET",
    headers: {
      "x-api-key": "xq_YOUR_KEY_HERE",
    },
  });

  const result = await response.json();
  if (!response.ok) {
    throw new Error(`${result.error}: ${result.message}`);
  }
  ```

  ```python Python theme={null}
  from urllib.parse import quote

  import requests

  style_key = "elonmusk"
  response = requests.get(
      f"https://xquik.com/api/v1/styles/{quote(style_key, safe='')}",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
      timeout=30,
  )
  response.raise_for_status()
  result = response.json()
  ```

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

  import (
      "encoding/json"
      "fmt"
      "net/http"
      "net/url"
  )

  func main() {
      styleKey := "elonmusk"
      endpoint := "https://xquik.com/api/v1/styles/" + url.PathEscape(styleKey)
      req, err := http.NewRequest(http.MethodGet, endpoint, nil)
      if err != nil {
          panic(err)
      }
      req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")

      resp, err := http.DefaultClient.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      var result map[string]interface{}
      if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
          panic(err)
      }
      if resp.StatusCode != http.StatusOK {
          panic(fmt.Sprintf("style request failed: %v", result))
      }
  }
  ```
</CodeGroup>

## Choose the correct tweet style key

The path names the value `{id}`. The route reads
it as a profile key, not a numeric record ID.

| Profile source | Value to send in `{id}` | Example |
| - | - | - |
| [Analyze & Cache Style](/api-reference/styles/analyze) | Returned `xUsername` | `xquik` |
| [Save Custom Style](/api-reference/styles/save) | Returned lowercase `xUsername` label | `product updates` |
| [List Styles](/api-reference/styles/list) | Any listed `styles[].xUsername` | `founder voice` |

Encode spaces and punctuation in custom labels. Do not include `@` before an X
username. Keep the response's `xUsername` value for later requests.

## Read the cached tweet style response

The response contains stored tweet text and profile metadata. It does not
return a generated tone summary, vocabulary list, hook score, or sentiment
classification.

| Field | Meaning | Integration use |
| - | - | - |
| `xUsername` | Lowercase X username or custom style label | Store it as the reusable profile key. |
| `tweetCount` | Number of tweet samples recorded for the profile | Display the writing sample size. |
| `isOwnAccount` | Ownership classification stored with the profile | Label an owned or external writing profile. |
| `fetchedAt` | ISO 8601 cache timestamp | Show when Xquik refreshed or saved the profile. |
| `tweets` | Stored tweet writing samples | Use approved samples in composition or review. |

`tweetCount` describes the cached writing sample. It is not the X profile's
lifetime post count.

`fetchedAt` has 2 meanings. An analyzed profile records its last X fetch.
A custom profile records when Xquik saved its supplied tweet examples.

`isOwnAccount` is a stored snapshot. This GET request does not recompute it
after an [X identity](/api-reference/account/x-identity) change. Set the X
identity before creating or refreshing an analyzed profile.

## Parse every tweet writing sample

Each `tweets[]` entry follows the public style profile contract:

| Tweet field | Required | Meaning |
| - | - | - |
| `id` | Yes | Stored Tweet ID or generated custom-sample ID |
| `text` | Yes | Full cached tweet or custom writing example |
| `authorUsername` | No | X author username or custom style label |
| `createdAt` | No | ISO 8601 tweet or custom-sample timestamp |

Treat `id` as a string. X Tweet IDs can exceed JavaScript's safe integer
range. Do not cast them to `number`.

Custom profiles generate local sample IDs. Do not use those IDs with X tweet
lookup, reply, like, repost, or media endpoints.

```json theme={null}
{
  "xUsername": "elonmusk",
  "tweetCount": 20,
  "isOwnAccount": false,
  "fetchedAt": "2026-02-24T10:30:00.000Z",
  "tweets": [
    {
      "id": "1893456789012345678",
      "text": "The future is now.",
      "authorUsername": "elonmusk",
      "createdAt": "2026-02-24T14:22:00.000Z"
    }
  ]
}
```

## Separate tweet style from Twitter analytics

This route retrieves writing samples. It does not fetch likes, replies,
reposts, quotes, bookmarks, views, followers, or impressions.

Use [Analyze Performance](/api-reference/styles/performance) when you need live
engagement metrics for the cached tweets. Keep writing-style review separate
from Twitter analytics for another account.

| Goal | Endpoint | Result |
| - | - | - |
| Retrieve unchanged tweet samples | Get Style | Cached text, authors, and timestamps |
| Create or refresh an X profile | [Analyze Style](/api-reference/styles/analyze) | Current cached writing samples |
| Store approved examples | [Save Custom Style](/api-reference/styles/save) | A custom tweet voice profile |
| Compare 2 cached profiles | [Compare Styles](/api-reference/styles/compare) | Both stored sample sets |
| Refresh tweet engagement | [Analyze Performance](/api-reference/styles/performance) | Likes, replies, reposts, and views |

## Review a saved tweet style

1. Call [List Styles](/api-reference/styles/list) with the same credential.
2. Select one returned `xUsername` profile key.
3. URL-encode that value and call this endpoint.
4. Store `xUsername`, `fetchedAt`, and `tweetCount` with the samples.
5. Review every `tweets[].text` value before composition.
6. Refresh the profile through Analyze only when required.

Use cached samples as writing references. A sample can hold
an outdated product claim or an unapproved fact.

## Handle tweet style retrieval errors

| Status | Error | Meaning | Recovery |
| - | - | - | - |
| `200` | None | The cached tweet style exists | Read every documented field. |
| `401` | `unauthenticated` | The credential is missing or invalid | Replace the API key or bearer token. |
| `404` | `style_not_found` | This account has no matching cache key | List styles or analyze the username first. |
| `429` | `rate_limit_exceeded` | The request exceeded the rate limit | Wait for `Retry-After`, then retry once. |

The contract documents no `402` response for this cache read. A
missing balance does not block retrieval of an existing style profile.

## Path parameters

<ParamField path="id" type="string" required>
  Lowercase X username or saved custom style label. Xquik lowercases this
  value before an account-scoped lookup. It is not a numeric database ID.
</ParamField>

## Headers

Send `x-api-key` with an Xquik API key. OAuth clients can send a bearer token
through the `Authorization` header instead.

<ParamField header="x-api-key" type="string" required>
  Your Xquik API key. Generate one from the [dashboard](https://xquik.com/dashboard).
</ParamField>

## Response

### 200 OK

<ResponseField name="xUsername" type="string">Lowercase X username or custom style label.</ResponseField>
<ResponseField name="tweetCount" type="number">Number of stored tweet writing samples.</ResponseField>
<ResponseField name="isOwnAccount" type="boolean">Stored ownership classification for this profile.</ResponseField>
<ResponseField name="fetchedAt" type="string">ISO 8601 cache fetch or custom-save timestamp.</ResponseField>

<ResponseField name="tweets" type="object[]">
  Stored tweet writing samples.

  <Expandable title="Tweet sample fields">
    <ResponseField name="id" type="string">Tweet ID or generated custom-sample ID.</ResponseField>
    <ResponseField name="text" type="string">Cached tweet or supplied writing example.</ResponseField>
    <ResponseField name="authorUsername" type="string">Optional author username or custom label.</ResponseField>
    <ResponseField name="createdAt" type="string">Optional ISO 8601 sample timestamp.</ResponseField>
  </Expandable>
</ResponseField>

### 401 Unauthenticated

```json theme={null}
{ "error": "unauthenticated", "message": "Missing or invalid API key" }
```

Authentication failed. Replace the missing or invalid credential.

### 404 Style not found

```json theme={null}
{ "error": "style_not_found", "message": "No cached style found for this username" }
```

No matching cache key exists for this Xquik account. Call List Styles first.
Analyze the X username when no profile exists.

### 429 Rate limited

```json theme={null}
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Try again later.",
  "retryAfter": 1
}
```

Too many requests. Wait for `Retry-After`, then retry once.

### How do I retrieve a cached tweet writing style?

List styles, copy one `xUsername`, then send it as `{id}`. This endpoint
returns the saved tweet text without refreshing the X profile.

### Can I retrieve another account's Twitter writing style?

Yes, after your Xquik account analyzes that public username. You cannot read a
style profile cached by another Xquik customer.

### Does get style return Twitter analytics?

No. It returns tweet writing samples and cache metadata. Use Analyze
Performance for current likes, replies, reposts, and views.

### Why does get style return 404?

The credential cannot access a matching lowercase username or label. Call
List Styles, check the exact key, then analyze or save the profile.

<Note>
  **Related.** [List Styles](/api-reference/styles/list) lists profile
  keys. [Delete Style](/api-reference/styles/delete) removes a cached profile.
</Note>


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