# Get Tokens by Creator

### Endpoint

```
GET https://clanker.world/api/search-creator
```

### Query Parameters

| Parameter     | Type    | Required | Default | Description                                                                  |
| ------------- | ------- | -------- | ------- | ---------------------------------------------------------------------------- |
| `q`           | string  | Yes      | -       | Search query: Farcaster username (e.g., `dish`) or wallet address (0x...)    |
| `limit`       | integer | No       | 20      | Number of results per page (1-50)                                            |
| `offset`      | integer | No       | 0       | Pagination offset for loading more results                                   |
| `sort`        | string  | No       | `desc`  | Sort order by deployment date: `asc` (oldest first) or `desc` (newest first) |
| `trustedOnly` | boolean | No       | false   | When `true`, only returns verified/trusted tokens                            |

### Response

#### Success Response (200 OK)

```json
{
  "tokens": [
    {
      "contract_address": "0x...",
      "name": "Token Name",
      "symbol": "TKN",
      "img_url": "https://...",
      "chain_id": 8453,
      "deployed_at": "2024-01-15T10:30:00.000Z",
      "created_at": "2024-01-15T10:30:00.000Z",
      "msg_sender": "0x...",
      "social_context": {
        "platform": "farcaster",
        "id": "12345"
      },
      "related": {
        "market": {
          "marketCap": 50000,
          "price": 0.0001
        }
      },
      "trustStatus": {
        "isTrustedDeployer": false,
        "isTrustedClanker": false,
        "fidMatchesDeployer": true,
        "verifiedAddresses": ["0x..."]
      }
    }
  ],
  "user": {
    "fid": 12345,
    "username": "alice",
    "displayName": "Alice",
    "pfpUrl": "https://...",
    "verifiedAddresses": ["0x..."]
  },
  "searchedAddress": "0x...",
  "total": 42,
  "hasMore": true
}
```

#### Response Fields

| Field             | Type    | Description                                                 |
| ----------------- | ------- | ----------------------------------------------------------- |
| `tokens`          | array   | Array of token objects with trust status                    |
| `user`            | object  | Farcaster user info if found (may be `undefined`)           |
| `searchedAddress` | string  | The wallet address used for searching (may be `undefined`)  |
| `total`           | integer | Total number of tokens matching the query (after filtering) |
| `hasMore`         | boolean | Whether more results are available for pagination           |

#### Trust Status

Each token includes a `trustStatus` object indicating verification level:

| Field                | Type    | Description                                                      |
| -------------------- | ------- | ---------------------------------------------------------------- |
| `isTrustedDeployer`  | boolean | Token was deployed by a known trusted deployer address           |
| `isTrustedClanker`   | boolean | Token contract is on the allowlist                               |
| `fidMatchesDeployer` | boolean | Creator's verified Farcaster address matches the deployer wallet |
| `verifiedAddresses`  | array   | The token creator's verified Farcaster addresses                 |

**Trust Levels (in order of priority):**

1. **Allowlisted** - Token is on the trusted clanker allowlist
2. **Trusted Deployer** - Deployed by an official clanker deployer contract
3. **FID Verified** - Creator's Farcaster verified address matches the deployer
4. **Unverified** - None of the above (exercise caution)

#### Error Responses

**400 Bad Request**

```json
{
  "error": "Query parameter \"q\" is required"
}
```

**500 Internal Server Error**

```json
{
  "error": "Failed to search"
}
```

### Examples

#### Search by Farcaster Username

```bash
curl "https://clanker.world/api/search-creator?q=dish"
```

#### Search by Wallet Address

```bash
curl "https://clanker.world/api/search-creator?q=0x1234567890abcdef1234567890abcdef12345678"
```

#### Paginated Request

```bash
# First page
curl "https://clanker.world/api/search-creator?q=alice&limit=20&offset=0"

# Second page
curl "https://clanker.world/api/search-creator?q=alice&limit=20&offset=20"
```

#### Filter Trusted Only, Sorted by Oldest

```bash
curl "https://clanker.world/api/search-creator?q=alice&trustedOnly=true&sort=asc"
```

### Notes

* The API searches tokens by:
  * Farcaster FID (from username lookup)
  * Deployer address (`msg_sender`)
  * Admin address
* Results are deduplicated by contract address
* Invalid `limit`/`offset` values are automatically corrected to safe defaults
* Maximum 50 results per request
* Results are optimized for creators with up to \~1000 tokens

### Rate Limits

Standard API rate limits apply. Contact support for higher limits.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clanker.gitbook.io/documentation/public/get-tokens-by-creator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
