# TikTok / Hashtag Videos

Fetch videos for a hashtag. Provide exactly one of id (from Hashtag) or name.

```
GET /api/v1/tiktok/hashtag-videos
```

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
Credits: 1 credit per request

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `name` | no | Exactly one of name or id. Prefer name. Hashtag without #. | `comedy` |
| `id` | no | Hashtag id from Hashtag (not video id; alternative to name). | `1606334392378370` |
| `cursor` | no | Pagination cursor from a previous response. |  |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/tiktok/hashtag-videos?name=comedy' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `videos` | array | Videos for this page. |
| `videos[].id` | string | Video id. |
| `videos[].url` | string | Video URL. |
| `videos[].caption` | string | Caption. |
| `videos[].created_at` | number | Unix publish timestamp. |
| `videos[].plays` | number | Play count. |
| `videos[].likes` | number | Like count. |
| `videos[].comments` | number | Comment count. |
| `videos[].shares` | number | Share count. |
| `videos[].duration` | number | Duration in seconds. |
| `videos[].cover` | string | Cover image URL. |
| `videos[].author` | object | Author username and id. |
| `cursor` | string | Pass as cursor for the next page. |
## Sample response

Successful lookups wrap the payload in `{ ok, platform, resource, params, data, meta }`. `data` is shown below.

```json
{
  "ok": true,
  "platform": "tiktok",
  "resource": "hashtag-videos",
  "params": {
    "name": "comedy"
  },
  "data": {
    "cursor": "20",
    "videos": [
      {
        "author": {
          "id": "7119601",
          "username": "daviddobrik"
        },
        "caption": "classic bit",
        "comments": 2100,
        "cover": "https://p16-sign-va.tiktokcdn.com/example.jpeg",
        "created_at": 1667843879,
        "duration": 28,
        "id": "7165262254722534698",
        "likes": 410000,
        "plays": 5400000,
        "shares": 18000,
        "url": "https://www.tiktok.com/@daviddobrik/video/7165262254722534698"
      }
    ]
  },
  "meta": {
    "credits_charged": 1,
    "latency_ms": 420,
    "platform": "tiktok",
    "resource": "hashtag-videos",
    "path": "/api/v1/tiktok/hashtag-videos"
  }
}
```

## Links

- HTML docs: https://trysocify.com/docs/api/tiktok/hashtag-videos
- SEO page: https://trysocify.com/tiktok/hashtag-videos
- OpenAPI: https://trysocify.com/openapi.json
- Catalog: https://trysocify.com/catalog.json
