curl --max-time 120 -X GET 'https://api.justoneapi.com/api/tiktok/get-post-comment/v1?token=YOUR_API_KEY&awemeId=VALUE'
text
JustOneAPI의 "게시물 댓글 (V1)" API를 사용하고 싶습니다.기본 URL: https://api.justoneapi.com.API 경로: /api/tiktok/get-post-comment/v1?token=YOUR_API_KEY&awemeId=VALUEAPI 주소: BASE_URL + /api/tiktok/get-post-comment/v1?token=YOUR_API_KEY&awemeId=VALUEHTTP 메서드: GET인증: URL에 "token" 쿼리 파라미터를 추가하세요.OpenAPI 정의: https://docs.justoneapi.com/openapi/tiktok/post-comments-v1-ko.json요청 파라미터:- token (query): API 접근에 사용하는 보안 토큰입니다. (필수)- awemeId (query): TikTok 게시물의 고유 ID(awemeId)입니다. (필수)- cursor (query): 페이지네이션 커서입니다. '0'부터 시작하세요.응답 형식: 실제 Content-Type에 따라 JSON 또는 텍스트를 안전하게 처리하세요.응답 처리 및 오류 코드1. 응답 본문의 "code" 필드에서 처리 결과를 확인하세요. 0은 성공을 뜻합니다.2. 권장 요청 제한 시간은 120초입니다. 120초가 너무 길다면 최소 60초로 설정하세요. 일부 요청은 응답을 받기 전에 시간 초과될 수 있습니다.3. API 결과 코드 - 0: 성공 - 100: 유효하지 않거나 비활성화된 토큰 - 301: 데이터 수집에 실패했습니다. 다시 시도해 주세요. - 302: 호출 빈도 제한 초과 - 303: 일일 호출 한도 초과 - 400: 잘못된 파라미터 - 500: 서버 내부 오류 - 600: 호출 권한 없음 - 601: 계정 잔액 부족 - 602: API 토큰의 누적 예산 한도 초과4. 601은 공유 계정 잔액이 부족하다는 뜻입니다. 602는 현재 API 토큰의 누적 예산 한도에 도달했다는 뜻입니다. 토큰 예산을 설정해도 공유 계정 잔액은 별도로 배정되지 않습니다.제가 사용하는 프로그래밍 언어로 이 API를 호출하고 응답을 처리하는 스크립트를 작성해 주세요.
python
import requestsBASE_URL = "https://api.justoneapi.com" # OpenAPI 서버 설정에서 제공url = BASE_URL + "/api/tiktok/get-post-comment/v1?token=YOUR_API_KEY&awemeId=VALUE"response = requests.get(url, timeout=120)print(response.status_code)if response.content: content_type = response.headers.get("content-type", "").lower() if "json" in content_type: try: print(response.json()) except ValueError: print(response.text) elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}: print(response.text) else: with open("response.bin", "wb") as output: output.write(response.content) print(f"Saved {len(response.content)} bytes to response.bin")
TikTok 게시물 댓글 API (V1)
TikTok 게시물 댓글을 조회합니다. 커서 기반 페이지네이션으로 시청자 토론을 살펴보고 다음 페이지를 조회하거나 특정 게시물의 댓글을 분석할 수 있습니다.
요청 파라미터
tokenstringawemeIdstringcursorstring0코드 예제
응답 필드
성공 응답(
code = 0)의 주요 필드입니다.댓글 내용필드 10개
data.comments[]요청된 게시물에 대한 하나의 최상위 댓글입니다.
cidstringaweme_idstringtextstringcreate_timeintegercomment_languagestringcontent_typeintegertext_extraarrayimage_listis_comment_translatablebooleanstatusinteger페이지 번호 및 상태필드 7개
data이 댓글과 관련된 TikTok 게시물 댓글 결과 및 페이지당 정보.
cursorintegerhas_moreintegertotalintegerhas_filtered_commentsintegerstatus_codeintegerstatus_msgstringcommentsarray | null댓글 참여도필드 6개
data.comments[]digg_countintegeris_author_diggedbooleanauthor_pinbooleanreply_idstringreply_to_reply_idstringreply_comment_totalinteger댓글 작성자필드 12개
data.comments[]userobjectuser.uidstringuser.sec_uidstringuser.unique_idstringuser.nicknamestringuser.avatar_uristringuser.avatar_thumbobjectuser.avatar_thumb.uristringuser.avatar_thumb.widthintegeruser.avatar_thumb.heightintegeruser.avatar_thumb.url_listarrayuser.avatar_thumb.url_list[]string라벨 및 공유필드 8개
data.comments[]share_infoobjectshare_info.titlestringshare_info.descstringshare_info.urlstringlabel_listarray | nulllabel_list[]objectlabel_list[].textstringlabel_list[].typeinteger답변 미리보기필드 35개
data.comments[]reply_commentarray | nullreply_comment[]objectreply_comment[].cidstringreply_comment[].aweme_idstringreply_comment[].textstringreply_comment[].create_timeintegerreply_comment[].comment_languagestringreply_comment[].content_typeintegerreply_comment[].text_extraarrayreply_comment[].image_listreply_comment[].digg_countintegerreply_comment[].is_author_diggedbooleanreply_comment[].author_pinbooleanreply_comment[].is_comment_translatablebooleanreply_comment[].statusintegerreply_comment[].share_infoobjectreply_comment[].share_info.titlestringreply_comment[].share_info.descstringreply_comment[].share_info.urlstringreply_comment[].userobjectreply_comment[].user.uidstringreply_comment[].user.sec_uidstringreply_comment[].user.unique_idstringreply_comment[].user.nicknamestringreply_comment[].user.avatar_uristringreply_comment[].user.avatar_thumbobjectreply_comment[].user.avatar_thumb.uristringreply_comment[].user.avatar_thumb.widthintegerreply_comment[].user.avatar_thumb.heightintegerreply_comment[].user.avatar_thumb.url_listarrayreply_comment[].user.avatar_thumb.url_list[]stringreply_comment[].reply_idstringreply_comment[].reply_to_reply_idstringreply_comment[].label_textstringreply_comment[].label_typeinteger응답 예시