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

# Get TikTok Profile Videos

> Retrieves a list of videos from a TikTok user profile.

## Description

This endpoint allows you to fetch a paginated list of videos from a specified TikTok user's profile. It returns comprehensive video metadata including statistics, timestamps, and pagination support for accessing more videos.

## Endpoint

**POST** `/api/v1/get-tiktok-profile-videos`

## Request Headers

| Header          | Type   | Description                                       |
| :-------------- | :----- | :------------------------------------------------ |
| `Content-Type`  | string | Must be `application/json`.                       |
| `Authorization` | string | Your API key (Bearer token). e.g. `Bearer sk_xxx` |

## Request Body

| Parameter       | Type    | Description                                                                                          | Required | Default |
| :-------------- | :------ | :--------------------------------------------------------------------------------------------------- | :------- | :------ |
| `handle`        | string  | The TikTok user handle (username).                                                                   | Yes      |         |
| `maxCursor`     | string  | Optional cursor for pagination. Pass the `max_cursor` from a previous response to get the next page. | No       |         |
| `trim`          | boolean | Whether to get a trimmed/simplified response.                                                        | No       | `false` |
| `requestSource` | string  | Optional. Source of the request (e.g., `MAKE_DOT_COM`, `ZAPIER`, `API`).                             | No       | `API`   |

<Info>
  The `handle` is the username you see on TikTok, like `stoolpresidente`. Do not include the @ symbol.
</Info>

## Responses

### Success (200 OK)

Returns a JSON object containing an array of videos and pagination information.

```json theme={null}
{
  "aweme_list": [
    {
      "aweme_id": "7460293617584139566",
      "desc": "Video description text here",
      "create_time": 1736092800,
      "statistics": {
        "comment_count": 1234,
        "digg_count": 56789,
        "download_count": 123,
        "play_count": 987654,
        "share_count": 456
      },
      "video": {
        "duration": 15,
        "cover": {
          "url_list": ["https://..."]
        }
      },
      "author": {
        "unique_id": "username",
        "nickname": "Display Name"
      }
    }
    // ... more videos
  ],
  "max_cursor": "1736092800000",
  "min_cursor": "1735488000000",
  "has_more": 1,
  "extra": {
    "now": 1736179200000
  }
}
```

**Response Headers:**

* `Content-Type: application/json`

- **X-RateLimit-Limit:** The rate limit for the user.
- **X-RateLimit-Remaining:** The remaining number of requests for the user.

### Error Responses

#### 400 Bad Request

Indicates an issue with the request parameters.

```json theme={null}
{
  "error": "'handle' parameter is required and must be a non-empty string."
}
```

Possible error messages:

* `Invalid JSON in request body`
* `'handle' parameter is required and must be a non-empty string.`
* `The video service could not process the handle.`
* `The video service reported an issue.`

#### 401 Unauthorized

API key is missing, invalid, or inactive.

```json theme={null}
{
  "error": "API key is invalid or missing."
}
```

#### 403 Forbidden

API key does not have enough credits.

```json theme={null}
{
  "error": "Insufficient credits. Please top up your account."
}
```

#### 404 Not Found

The requested TikTok profile could not be found.

```json theme={null}
{
  "error": "TikTok profile not found for handle: [handle]"
}
```

#### 500 Internal Server Error

An unexpected error occurred on the server.

```json theme={null}
{
  "error": "An unexpected server error occurred while fetching the TikTok profile videos: [specific error message]"
}
```

Possible error messages:

* `Service not configured. Please contact support.`
* `Service authentication failed. Please contact support.`
* `An unexpected server error occurred...`

#### 502 Bad Gateway

Indicates an issue with an upstream service.

```json theme={null}
{
  "error": "Received invalid data format from video service."
}
```

Possible error messages:

* `The video service is currently unavailable.`
* `Received invalid data format from video service.`
* `Error fetching video data from the upstream service.`

#### 503 Service Unavailable

Rate limit exceeded with an upstream service.

```json theme={null}
{
  "error": "Rate limit exceeded. Please try again later."
}
```

## Example Request

### cURL

```bash theme={null}
curl -X POST \
  https://app.dumplingai.com/api/v1/get-tiktok-profile-videos \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "handle": "stoolpresidente" }'
```

### Node.js (fetch)

```javascript theme={null}
async function getTikTokProfileVideos(apiKey, handle, maxCursor = null) {
  const url = 'https://app.dumplingai.com/api/v1/get-tiktok-profile-videos';
  const body = { handle };
  if (maxCursor) body.maxCursor = maxCursor;

  const options = {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${apiKey}`
    },
    body: JSON.stringify(body)
  };

  try {
    const response = await fetch(url, options);
    const data = await response.json();
    if (!response.ok) {
      console.error(`Error: ${response.status}`, data);
      return null;
    }
    console.log(`Fetched ${data.aweme_list.length} videos`);
    console.log(`Has more: ${data.has_more}`);
    return data;
  } catch (error) {
    console.error('Failed to fetch TikTok profile videos:', error);
    return null;
  }
}

// Example usage:
// getTikTokProfileVideos('YOUR_API_KEY', 'stoolpresidente');
```

## Notes

* Use the `max_cursor` field from the response to paginate through all videos.
* The `has_more` field indicates whether there are additional pages available (1 = yes, 0 = no).
* Video statistics include view counts, likes (digg\_count), comments, shares, and downloads.

## Credit Cost

This endpoint costs **10 credits** per successful request. For more details, see our [Credit Costs](/api-reference/credit-costs) page.

## Rate Limiting

This endpoint is subject to standard API rate limits. Check the `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers in the response to monitor your usage.


## OpenAPI

````yaml POST /api/v1/get-tiktok-profile-videos
openapi: 3.0.3
info:
  title: DumplingAI API
  version: 1.0.0
  description: >
    REST API for DumplingAI's content intelligence and automation platform.

    All endpoints are grouped under `/api/v1`; most are secured via Bearer API
    keys unless an operation explicitly sets `security: []`.
servers:
  - url: https://app.dumplingai.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: YouTube
    description: Access metadata, search results, and transcripts from YouTube.
  - name: TikTok
    description: Retrieve TikTok profile, video, follower, and transcript data.
  - name: LinkedIn
    description: Programmatically fetch LinkedIn company and profile data.
  - name: Search
    description: Search-orientated endpoints spanning web, news, maps, and autocomplete.
  - name: Google
    description: Integrations with Google business listings and location data.
  - name: Scraping
    description: Webpage capture, crawling, and structured content extraction utilities.
  - name: Documents
    description: Document processing, conversion, and metadata utilities.
  - name: AI
    description: DumplingAI agent and knowledge base endpoints.
  - name: Developer Tools
    description: Utilities for executing sandboxed code via API.
paths:
  /api/v1/get-tiktok-profile-videos:
    post:
      tags:
        - TikTok
      summary: List TikTok profile videos
      description: Retrieve a paginated feed of videos posted by a TikTok handle.
      operationId: listTikTokProfileVideos
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TikTokProfileVideosRequest'
      responses:
        '200':
          description: TikTok videos retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokProfileVideosResponse'
        '400':
          description: Invalid request payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
        '403':
          description: Insufficient credits to fulfill the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Videos not found for the provided handle.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Upstream video service returned an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TikTokProfileVideosRequest:
      type: object
      required:
        - handle
      properties:
        handle:
          type: string
        maxCursor:
          type: string
          description: Cursor for pagination.
        trim:
          type: boolean
          description: When true, returns a simplified payload.
        requestSource:
          $ref: '#/components/schemas/RequestSource'
    TikTokProfileVideosResponse:
      type: object
      properties:
        aweme_list:
          type: array
          items:
            $ref: '#/components/schemas/TikTokVideoSummary'
        max_cursor:
          type: string
          nullable: true
        min_cursor:
          type: string
          nullable: true
        has_more:
          type: integer
          nullable: true
        hasMore:
          type: boolean
          nullable: true
        extra:
          type: object
          additionalProperties: true
      additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable description of what went wrong.
      required:
        - error
    RequestSource:
      type: string
      description: Optional identifier describing where the API request originated.
      enum:
        - API
        - WEB
        - MAKE_DOT_COM
        - ZAPIER
        - N8N
        - PLAYGROUND
        - DEFAULT_AUTOMATION
        - AGENT_PREVIEW
        - AGENT_LIVE
        - AUTOPILOT
        - STUDIO
    TikTokVideoSummary:
      type: object
      properties:
        aweme_id:
          type: string
        id:
          type: string
        desc:
          type: string
          nullable: true
        create_time:
          type: integer
          nullable: true
        statistics:
          type: object
          additionalProperties: true
        video:
          type: object
          additionalProperties: true
        author:
          type: object
          additionalProperties: true
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````