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

# Get a TikTok user’s posts

> List the videos and photo posts on a public TikTok account by username. Each post includes the caption, view, like, comment, share and save counts, sound, hashtags and cover image. Page through results with the `cursor` from the previous response's `nextCursor`. Costs 1 credit per result returned, with a minimum of 1 credit per request.



## OpenAPI

````yaml /openapi.json post /tiktok/get-user-posts
openapi: 3.1.0
info:
  title: Bridgly API
  description: >-
    Web scraping API for LinkedIn, X (Twitter), Reddit, GitHub, Instagram and
    TikTok. Authenticated endpoints accept a Bridgly API key (`bgly_…`) via
    `Authorization: Bearer <token>`.
  version: 1.0.0
servers:
  - url: https://api.bridgly.app
    description: Production
security: []
tags:
  - name: LinkedIn
    description: Scrape LinkedIn profiles, companies, posts, and search.
  - name: Reddit
    description: Scrape Reddit posts, subreddits, users, and search.
  - name: X (Twitter)
    description: Scrape tweets and search X.
  - name: GitHub
    description: >-
      Fetch GitHub profiles, pinned repos, contributions, repositories, stars,
      and projects via GitHub's GraphQL API.
  - name: Instagram
    description: Scrape Instagram profiles, posts, followers, and search.
  - name: TikTok
    description: Fetch TikTok profiles.
paths:
  /tiktok/get-user-posts:
    post:
      tags:
        - TikTok
      summary: Get a TikTok user’s posts
      description: >-
        List the videos and photo posts on a public TikTok account by username.
        Each post includes the caption, view, like, comment, share and save
        counts, sound, hashtags and cover image. Page through results with the
        `cursor` from the previous response's `nextCursor`. Costs 1 credit per
        result returned, with a minimum of 1 credit per request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cursor:
                  description: >-
                    The previous response's `nextCursor`, to fetch the next
                    page.
                  type: string
                uniqueId:
                  type: string
                  pattern: ^@?[A-Za-z0-9_.]{1,24}$
                  description: TikTok username, with or without @, for example "tiktok".
                count:
                  default: 35
                  description: >-
                    Most results to return per page (1–35). Defaults to 35. A
                    page can hold fewer, so keep paging while `nextCursor` is
                    set.
                  type: integer
                  minimum: 1
                  maximum: 35
              required:
                - uniqueId
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeMs:
                    type: number
                    description: >-
                      Wall-clock time the request took to complete, in
                      milliseconds.
                  creditsCost:
                    type: number
                    description: Number of account credits this request consumed.
                  data:
                    type: object
                    properties:
                      videos:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              description: TikTok post ID.
                            url:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Link to the post on TikTok.
                            description:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Caption text.
                            createTime:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Publish time in Unix seconds.
                            language:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Caption language code.
                            duration:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Video length in seconds.
                            width:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Video width in pixels.
                            height:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Video height in pixels.
                            coverUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Cover image URL.
                            animatedCoverUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Animated cover image URL, when available.
                            images:
                              anyOf:
                                - type: array
                                  items:
                                    type: string
                                - type: 'null'
                              description: Image URLs of a photo post; null for videos.
                            subtitles:
                              anyOf:
                                - type: array
                                  items:
                                    type: object
                                    properties:
                                      language:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                        description: Subtitle language, for example "eng-US".
                                      format:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                        description: File format, for example "webvtt".
                                      autoGenerated:
                                        anyOf:
                                          - type: boolean
                                          - type: 'null'
                                        description: >-
                                          Whether TikTok generated the subtitles
                                          from speech.
                                      url:
                                        type: string
                                        description: Subtitle file URL.
                                    required:
                                      - language
                                      - format
                                      - autoGenerated
                                      - url
                                    additionalProperties: false
                                - type: 'null'
                              description: Subtitle files, when the video has captions.
                            stats:
                              type: object
                              properties:
                                playCount:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Number of views.
                                likeCount:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Number of likes.
                                commentCount:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Number of comments.
                                shareCount:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Number of shares.
                                saveCount:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: >-
                                    Number of times the post was saved to
                                    favorites.
                                repostCount:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Number of reposts.
                              required:
                                - playCount
                                - likeCount
                                - commentCount
                                - shareCount
                                - saveCount
                                - repostCount
                              additionalProperties: false
                              description: Engagement counts.
                            author:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                      description: TikTok account ID.
                                    uniqueId:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Username without the @ prefix.
                                    nickname:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Display name.
                                    avatarUrl:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Profile image URL.
                                    signature:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Profile biography.
                                    verified:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                      description: Whether the account is verified.
                                    secUid:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: TikTok secondary account identifier.
                                    privateAccount:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                      description: Whether the account is private.
                                    followerCount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Number of followers.
                                    followingCount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Number of accounts followed.
                                    heartCount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Total likes received.
                                    videoCount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Number of published videos.
                                  required:
                                    - id
                                    - uniqueId
                                    - nickname
                                    - avatarUrl
                                    - signature
                                    - verified
                                    - secUid
                                    - privateAccount
                                    - followerCount
                                    - followingCount
                                    - heartCount
                                    - videoCount
                                  additionalProperties: false
                                - type: 'null'
                              description: The post’s creator.
                            sound:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                      description: TikTok sound ID.
                                    title:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Sound title.
                                    authorName:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Name of the sound’s creator.
                                    original:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                      description: >-
                                        Whether this is an original sound
                                        recorded by a creator.
                                    duration:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: Length in seconds.
                                    coverUrl:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Cover image URL.
                                    playUrl:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Audio file URL.
                                    album:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Album name, when provided.
                                    copyrighted:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                      description: >-
                                        Whether the sound is a licensed,
                                        copyrighted track.
                                    videoCount:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: >-
                                        Number of videos using the sound. Only
                                        returned when fetching a sound.
                                  required:
                                    - id
                                    - title
                                    - authorName
                                    - original
                                    - duration
                                    - coverUrl
                                    - playUrl
                                    - album
                                    - copyrighted
                                    - videoCount
                                  additionalProperties: false
                                - type: 'null'
                              description: The sound used in the post.
                            hashtags:
                              type: array
                              items:
                                type: string
                              description: 'Hashtags in the caption, without the #.'
                            mentions:
                              type: array
                              items:
                                type: string
                              description: >-
                                Usernames mentioned in the caption, without the
                                @.
                            location:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: TikTok place ID.
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Place name.
                                    address:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Street address.
                                    city:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: City name.
                                    category:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Place category.
                                  required:
                                    - id
                                    - name
                                    - address
                                    - city
                                    - category
                                  additionalProperties: false
                                - type: 'null'
                              description: Tagged place, when the creator added one.
                            playlistId:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                ID of the creator playlist the post belongs to,
                                if any.
                            isAd:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                              description: Whether the post is an ad.
                            duetEnabled:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                              description: Whether others can duet the post.
                            stitchEnabled:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                              description: Whether others can stitch the post.
                          required:
                            - id
                            - url
                            - description
                            - createTime
                            - language
                            - duration
                            - width
                            - height
                            - coverUrl
                            - animatedCoverUrl
                            - images
                            - subtitles
                            - stats
                            - author
                            - sound
                            - hashtags
                            - mentions
                            - location
                            - playlistId
                            - isAd
                            - duetEnabled
                            - stitchEnabled
                          additionalProperties: false
                        description: Posts on this page.
                      nextCursor:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Pass as `cursor` to fetch the next page; null when
                          there are no more results.
                    required:
                      - videos
                      - nextCursor
                    additionalProperties: false
                required:
                  - timeMs
                  - creditsCost
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: Bridgly SDK
          source: |-
            import { Bridgly } from '@bridgly/sdk';

            const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });

            const res = await client.tiktok.getUserPosts({
              uniqueId: "string",
              count: 35,
            });
            if (res.type === 'success') console.log(res.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````

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