---
name: sharddog
description: Look up ShardDog drops on NEAR, check whether an account has claimed one, claim it for them, and read what an account has collected. Use when someone shares a shard.dog link or asks about their ShardDogs.
---

# ShardDog

ShardDog drops are NFTs on NEAR that people claim from a link like
`https://shard.dog/lids-xv1`. Claiming is free for the claimer; ShardDog pays
the gas.

All endpoints are public, need no key, and are served from:

```
https://sit.shard.dog
```

(`https://shard.dog` is the website, not the API.) Full spec:
https://shard.dog/openapi.yaml

## Claim a drop for someone

The slug is the last part of the drop link (`lids-xv1` in `shard.dog/lids-xv1`).

1. Look up the drop to get its series id and contract:

```bash
curl "https://sit.shard.dog/api/channels/lids-xv1"
```

```json
{ "seriesId": "1764574026444", "contract": "treats.sharddog.near", "title": "Lids!", "inviteOnly": false, … }
```

2. Check whether the account already has it:

```bash
curl "https://sit.shard.dog/api/nft/claim-status/check?accountId=bob.near&tokenId=1764574026444&contract=treats.sharddog.near"
```

```json
{ "claimed": false, "tokenId": "1764574026444", "accountId": "bob.near" }
```

3. Claim it. The account field is `walletAddress`:

```bash
curl -X POST "https://sit.shard.dog/api/check-slugs/mint" \
  -H "Content-Type: application/json" \
  -d '{"walletAddress": "bob.near", "seriesId": "1764574026444", "slug": "lids-xv1"}'
```

```json
{ "operationId": "…", "mintResponse": { "statusCode": 200, "body": "…" } }
```

Read `mintResponse.body` and pass it on to the person. Claiming twice is safe:
the second call answers "You have already collected this ShardDog link." and
mints nothing.

Errors come back with an `error` message to show as-is:
- 400: `walletAddress` or `seriesId` missing.
- 403: the drop expired, ran out of claims, or needs an invite code (send
  `inviteCode` for invite-only drops).
- 503: try again shortly.

The account must already exist on NEAR.

```python
import requests

API = "https://sit.shard.dog"

def claim(slug: str, account: str) -> str:
    drop = requests.get(f"{API}/api/channels/{slug}").json()
    status = requests.get(f"{API}/api/nft/claim-status/check", params={
        "accountId": account, "tokenId": drop["seriesId"], "contract": drop["contract"],
    }).json()
    if status.get("claimed"):
        return f"{account} already has {drop['title']}."
    res = requests.post(f"{API}/api/check-slugs/mint", json={
        "walletAddress": account, "seriesId": drop["seriesId"], "slug": slug,
    })
    data = res.json()
    return data.get("error") or data["mintResponse"]["body"]
```

## Read what someone has

| Question | Call |
|---|---|
| What has bob.near collected? | `GET /api/getFeed?wallet=bob.near` → `{ "feed": [ { "title", "imageUrl", "date", "slug", "contract", "series_id", "count" } ] }` |
| How active a collector are they? | `GET /api/users/bob.near/stats` |
| Their sticker lid | `GET /api/lid/bob.near` |
| Who do they follow? | `GET /api/follows/bob.near` |

## Drops and creators

| Question | Call |
|---|---|
| What drops has alice.near made? | `GET /api/channels/list?owner=alice.near` |
| Her public drops and followers | `GET /api/creators/alice.near` |
| How many times has a drop been claimed? | `GET /api/channels/lids-xv1/claim-count` |

## Showing images

Many older drop images are on IPFS links that no longer load directly. To show
one, load it through the media endpoint:

```
https://sit.shard.dog/api/media?url=<the imageUrl, URL-encoded>
```

This works for IPFS and Arweave links. Use other image links as they are.

## Making drops

Drops are made on the website at https://shard.dog/owner/create. Each one
includes 333 free claims. More cost 5 NEAR per 1,000.
