API Documentation

TikTok Hashtag Posts API

Query public TikTok data synchronously; empty results and failures are free.

Test API

Results return directly in the same request; no task submission or polling is needed.

Open product page and API Tester

Endpoint and authentication

GET https://api.goanyapi.com/api/v1/tiktok/hashtag-posts

Authenticate with Authorization: Bearer YOUR_API_KEY. Supply query-string parameters; there is no request body.

Input parameters

ParameterTypeLocationRequiredConstraints / defaultDescription
AuthorizationstringHeaderYesBearer YOUR_API_KEYAPI key for the current account
challenge_namestringQueryOne of two^[^#\s]+$Hashtag name. Example: fyp. Supply the hashtag name without #.
urlstringQueryOne of two^https://(www\.)?tiktok\.com/tag/[^/?#\s\\]+/?(?:\?[^#\s]*)?(?:#[^\s]*)?$Full TikTok hashtag URL. Example: https://www.tiktok.com/tag/fyp. Supply either url or challenge_name, never both. Sharing parameters and fragments are removed. Short links are unsupported. URL resolution adds no separate credit charge.
cursorstringQueryNoDefault: 0Collection cursor. Use nextCursor only when returned; never infer an offset.
countintegerQueryNoDefault: 20; Fixed: 20Fixed page size 20; actual returned records may be fewer.

Full URL supported: https://www.tiktok.com/tag/fyp. Supply either url or challenge_name, never both. Sharing parameters, fragments and trailing slashes are removed; short links are unsupported. URL format handling adds no separate charge.

Supply either url or challenge_name=fyp, never both. Accepts a hashtag URL or name without #. No ID lookup is required. Identifier handling is automatic and adds no separate charge. Only the final non-empty successful posts result is billed once; empty results and failures are free. Keep the URL or name unchanged and update cursor for subsequent pages. Replace legacy challenge_id inputs with a URL or name.

Query by name:

GET /api/v1/tiktok/hashtag-posts?challenge_name=fyp&cursor=0
Authorization: Bearer YOUR_API_KEY

Request example

GET /api/v1/tiktok/hashtag-posts?url=https%3A%2F%2Fwww.tiktok.com%2Ftag%2Ffyp&cursor=0&count=20
Authorization: Bearer YOUR_API_KEY

Output parameters

Success returns HTTP 200. Null, empty and missing business fields are preserved; a zero statistic is valid. Only documented public fields are returned.

FieldTypeDescription
codestringok on success
messagestringRequest message
data.creditsUsednumberCredits charged for this request; zero for empty results
data.remainingCreditsnumberAccount balance after settlement
data.itemsarrayPosts on this page; [] for empty results
data.hasMorebooleanWhether more records are reported; does not guarantee a cursor
data.nextCursorstring | nullReturned next cursor, or null when unavailable; never invent a cursor even when hasMore=true
data.pageSizeintegerFixed requested maximum 20
data.items[].idstringPost ID
data.items[].descstringPost description
data.items[].createTimenumberUnix timestamp in seconds
data.items[].isAdbooleanAdvertisement indicator
data.items[].authorobjectAuthor information
data.items[].statsobjectEngagement statistics
data.items[].statsV2objectString statistics
data.items[].videoobjectVideo media information
data.items[].author.idstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.uniqueIdstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.nicknamestring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.signaturestring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.secUidstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.avatarThumbstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.avatarMediumstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.avatarLargerstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.verifiedstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.privateAccountstring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].author.createTimestring | number | boolean | nullReturned public author field; may be absent or empty
data.items[].video.idstring | number | nullReturned public media field; may be absent or empty
data.items[].video.descstring | number | nullReturned public media field; may be absent or empty
data.items[].video.createTimestring | number | nullReturned public media field; may be absent or empty
data.items[].video.durationstring | number | nullReturned public media field; may be absent or empty
data.items[].video.widthstring | number | nullReturned public media field; may be absent or empty
data.items[].video.heightstring | number | nullReturned public media field; may be absent or empty
data.items[].video.ratiostring | number | nullReturned public media field; may be absent or empty
data.items[].video.coverstring | number | nullReturned public media field; may be absent or empty
data.items[].video.originCoverstring | number | nullReturned public media field; may be absent or empty
data.items[].video.dynamicCoverstring | number | nullReturned public media field; may be absent or empty
data.items[].video.playAddrstring | number | nullReturned public media field; may be absent or empty
data.items[].video.downloadAddrstring | number | nullReturned public media field; may be absent or empty
data.items[].stats.diggCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.shareCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.commentCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.playCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.collectCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.followerCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.followingCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.heartCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.heartnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.videoCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.friendCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].stats.viewCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.diggCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.shareCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.commentCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.playCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.collectCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.followerCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.followingCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.heartCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.heartnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.videoCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.friendCountnumber | string | nullReturned statistic; may be absent or empty
data.items[].statsV2.viewCountnumber | string | nullReturned statistic; may be absent or empty

Real response example

Saved from a real successful response and projected to public fields. Lists show only the first two records. Account balance and request charges are omitted; live responses also contain creditsUsed and remainingCredits based on current configuration. Displaying the example sends no query and charges no credits.

{
  "code": "ok",
  "message": "ok",
  "data": {
    "items": [
      {
        "id": "7707082010908445982",
        "desc": "#avengers #avengersdoomsday #marvel #fyp #viral ",
        "createTime": 1794444880,
        "isAd": false,
        "author": {
          "id": "7688534553996198926",
          "uniqueId": "dr.marvel_editz",
          "nickname": "Dr.Marvel",
          "signature": "Marvel edits and\nmovie clips🎥🍿",
          "secUid": "MS4wLjABAAAAq-xpocSSyvz0mdYicQNi2jF4J940TKwA8FiS0djC3_ZjAX3YLgs7JlmB7k3ifBO9",
          "avatarThumb": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/50a0add99deaee9f97a35f6dd74d65da~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=c2ad5917&x-expires=1794646800&x-signature=FeqJ9wUHswMJ80Q64rrnMSc%2BYH0%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
          "avatarMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/50a0add99deaee9f97a35f6dd74d65da~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=0a622be8&x-expires=1794646800&x-signature=GZUqiLElmz%2FGBu7qMtXkJDIOcTk%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
          "avatarLarger": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/50a0add99deaee9f97a35f6dd74d65da~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=9640&refresh_token=d356516e&x-expires=1794646800&x-signature=XQLkoDB4mFXcuenIv8wMtpNmh3o%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
          "verified": false,
          "privateAccount": false
        },
        "stats": {
          "diggCount": 141800,
          "shareCount": 18200,
          "commentCount": 951,
          "playCount": 1200000,
          "collectCount": 29900
        },
        "statsV2": {
          "diggCount": "141800",
          "shareCount": "18200",
          "commentCount": "951",
          "playCount": "1200000",
          "collectCount": "29905"
        },
        "video": {
          "id": "7707082010908445982",
          "duration": 532,
          "width": 720,
          "height": 1280,
          "ratio": "720p",
          "cover": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oEp2IV4frDAlD8FobQFtERqC3EpArBc9IqfQ1E~tplv-tiktokx-origin.image?dr=9636&x-expires=1794646800&x-signature=9HKZcDjc9b2NTUsjBomHxnet2UQ%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
          "originCover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oEEOqdREIEAflIL1AqiA84fpVBF2rD9DQkKr9t~tplv-tiktokx-origin.image?dr=9636&x-expires=1794646800&x-signature=C5ck5%2B%2FpNzx%2B7W76gwo%2BJD2OADY%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
          "dynamicCover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oIAA1Fpr29flDDU6Rf8BQQEtAVEhETPIrqRqI4~tplv-tiktokx-origin.image?dr=9636&x-expires=1794646800&x-signature=n1snMYbRTlFGrtxp5vuRQeJWwgQ%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
          "playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-ve-0068c004-tx2/oYD8bEtQ2ED9rFvErVofnq007pQ4BRAf1qIQAE/?a=1988&bti=ODszNWYuMDE6&&bt=253&ft=4KJMyMzm8Zmo03LjMa4jVhHzdpWrKsd.&mime_type=video_mp4&rc=OzU2NDo3Ozg1ZWk5ODdpZkBpM2VkeXA5cmRqZTMzaTczNEAzNF5eYGEwXmMxXy8tMV4vYSNwZzJzMmRzb25hLS1kMTJzcw%3D%3D&expire=1794649443&l=20261112093511E6E5A8A5913BB5016BAD&ply_type=2&policy=2&signature=6de96ad74f5131987c506208694d1b24&tk=tt_chain_token&btag=e000a0000",
          "downloadAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-ve-0068c001-tx2/o8qm6gcjvgfqIQyIQVhAatM3WX8AACd8fRfqXu/?a=1988&bti=ODszNWYuMDE6&&bt=232&ft=4KJMyMzm8Zmo03LjMa4jVhHzdpWrKsd.&mime_type=video_mp4&rc=M2U8NWdnZWllaTVnO2k7M0BpM2VkeXA5cmRqZTMzaTczNEA2YGJhMi02NjUxLTFiMi1eYSNwZzJzMmRzb25hLS1kMTJzcw%3D%3D&expire=1794649443&l=20261112093511E6E5A8A5913BB5016BAD&ply_type=2&policy=2&signature=018098579617bd34435af940f77fadeb&tk=tt_chain_token&btag=e000a0000"
        }
      },
      {
        "id": "7517227615535533334",
        "desc": "#######foruyou #####foeyoupage ######forupage ##########forupage viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral viral kro 🥺🥺",
        "createTime": 1750240948,
        "isAd": false,
        "author": {
          "id": "7400363394282669088",
          "uniqueId": "user01karmavle",
          "nickname": "Hafiza",
          "signature": "♥️Allahmudiallah ♥️ Hafizy Quran ♥️🥰 \ndream 10k followings",
          "secUid": "MS4wLjABAAAA1wnxAwse6pe1mjIHAwfEDgZJWuQC6znPE6Ck-YRamUVt9PtSCQBD2-ISr5_qoh-7",
          "avatarThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-maliva-avt-0068/207639ea1e038c59e78cbb485b0468b8~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=04bd6c7e&x-expires=1794646800&x-signature=SzLk6l3SDIfqgekFVEmHvGrpSEE%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
          "avatarMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-maliva-avt-0068/207639ea1e038c59e78cbb485b0468b8~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=a8e5b588&x-expires=1794646800&x-signature=8aFcPyaXbqg%2FXkTRJYdPhx4MBI4%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
          "avatarLarger": "https://p16-common-sign.tiktokcdn-us.com/tos-maliva-avt-0068/207639ea1e038c59e78cbb485b0468b8~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=9640&refresh_token=057fcef2&x-expires=1794646800&x-signature=Y87Tn%2BseJCj2C8M1zO3tlqX0f38%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
          "verified": false,
          "privateAccount": false
        },
        "stats": {
          "diggCount": 129,
          "shareCount": 19,
          "commentCount": 10,
          "playCount": 14900,
          "collectCount": 17
        },
        "statsV2": {
          "diggCount": "129",
          "shareCount": "19",
          "commentCount": "10",
          "playCount": "14900",
          "collectCount": "17"
        },
        "video": {
          "id": "7517227615535533334",
          "duration": 7,
          "width": 576,
          "height": 1024,
          "ratio": "540p",
          "cover": "https://p19-common-sign.tiktokcdn-us.com/tos-no1a-p-0037-no/ogxEvjfrIBxEk0UBRSZDfFWRyyAFBsogMF6oIL~tplv-tiktokx-origin.image?dr=9636&x-expires=1794646800&x-signature=w5TSRnB0K3A%2FWyF%2FRihVDQpguhY%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
          "originCover": "https://p16-common-sign.tiktokcdn-us.com/tos-no1a-p-0037-no/oUqLlWMwXMilpHl05jHsADeIEEfQQIC8AQRueQ~tplv-tiktokx-origin.image?dr=9636&x-expires=1794646800&x-signature=kiu%2Bbn9gtjCJYpxWXdIH1tAUdNs%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
          "dynamicCover": "https://p16-common-sign.tiktokcdn-us.com/tos-no1a-p-0037-no/ocqXRYEIIFgoyyUfLjFkSIJfWryvYEABDBoRBx~tplv-tiktokx-origin.image?dr=9636&x-expires=1794646800&x-signature=b%2BHH4BFKxgu7Q3WJ%2BOvUZW%2BKjJI%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
          "playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/no1a/tos-no1a-ve-0068c001-no/oEFyIkEDDBfFfxnMjooSERWErsF9LRAUvyBEHg/?a=1988&bti=ODszNWYuMDE6&&bt=917&ft=4KJMyMzm8Zmo03LjMa4jVhHzdpWrKsd.&mime_type=video_mp4&rc=ZTloOGczZztkaTgzOjlpZUBpM2t5PHI5cmY7NDMzbzczNUBfXmAuNGFfXjMxXmFeM181YSNfcmJkMmRrbTZhLS1kMTFzcw%3D%3D&expire=1794648918&l=20261112093511E6E5A8A5913BB5016BAD&ply_type=2&policy=2&signature=821923e6815ec2b92d27ef7f22303651&tk=tt_chain_token&btag=e000b0000",
          "downloadAddr": "https://video-useast5-bp.us.tiktok.com/b0441178e8ae85224b68f39e38ac196e/6af82b56/kmoat/mps/logo/v2/r/p/v24044gl0000d198pcnog65og9evuhb0/9d6d6c5673754f01bca95fc8a445574e/b1ff870bcba54deab4b7c81707f48c22/mp4/main.mp4?a=1988&bti=ODszNWYuMDE6&&bt=0&eid=1286&ft=4KUERMzm8Zmo03LjMa4jVhHzdpWrKsd.&mime_type=video_mp4&rc=cnF8b2hsc2d3SkBwaHIxaDFybndmaDo4NztpPGY0aTg2OWZnZ0BpM2t5PHI5cmY7NDMzbzczNUBjRl5Nc3FePmJKYSNvYF90aHFmOiMxMjFeYDJeXy0xNDQyMzM2YSNfcmJkMmRrbTZhLS1kMTFzcw%3D%3D&definition=720p&du=7&item_id=7517227615535533334&l=20261112093511E6E5A8A5913BB5016BAD&logo_type=tiktok_m&ply_type=2&policy=eyJ2bSI6MiwiY2siOiJ0dF9jaGFpbl90b2tlbiJ9&user_text=user01karmavle&btag=e000b0000"
        }
      }
    ],
    "hasMore": false,
    "nextCursor": "2",
    "pageSize": 20
  }
}

Pagination

Each request asks for up to 20 records. Actual counts may be smaller. Continue only when hasMore=true and nextCursor is a valid string; pass it as cursor. Never infer an offset from record counts. When hasMore=true but nextCursor=null, this response cannot supply a subsequent page. Each next page is a separate billed request; pages are not fetched automatically.

Billing

With the current configuration, each successful request costs 1 credit.

Non-empty successful results use the currently configured rate; empty results and failures are free. Sufficient balance is required before requesting. A concurrent settlement with insufficient balance also returns 402 without delivering unsettled paid results. Empty or null details and lists without meaningful records are empty; individual empty fields do not make a populated result empty.

Errors

400: invalid parameters; 401: invalid authentication; 402: insufficient credits; 429: rate limit; 502: request failed; 503: API or pricing not configured. Errors contain code and message without internal addresses or credentials.

{"code":"invalid_params","message":"Invalid parameter"}