curl --max-time 120 -X GET 'https://api.justoneapi.com/api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUE'
text
JustOneAPI의 "대댓글 (V1)" API를 사용하고 싶습니다.기본 URL: https://api.justoneapi.com.API 경로: /api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUEAPI 주소: BASE_URL + /api/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=VALUEHTTP 메서드: GET인증: URL에 "token" 쿼리 파라미터를 추가하세요.OpenAPI 정의: https://docs.justoneapi.com/openapi/douyin-tiktok-china/comment-replies-v1-ko.json요청 파라미터:- token (query): 이 API 서비스의 액세스 토큰입니다. (필수)- commentId (query): 최상위 댓글의 고유 식별자입니다. (필수)- page (query): 페이지 번호입니다. 1부터 시작합니다.응답 형식: 실제 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/douyin/get-video-sub-comment/v1?token=YOUR_API_KEY&commentId=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 China) 대댓글 API (V1)
더우인(TikTok China) 동영상 최상위 댓글의 대댓글을 페이지별로 조회합니다. 댓글 스레드를 살펴보거나 특정 댓글의 반응을 검토할 수 있습니다.
요청 파라미터
tokenstringcommentIdstringpageinteger1코드 예제
응답 필드
성공 응답(
code = 0)의 주요 필드입니다.결과 및 페이지당 항목 수필드 6개
data요청된 최상위 Douyin 댓글 아래에 하나의 답변 페이지가 있습니다.
status_codeintegercursorintegerhas_moreintegertotalintegercommentsarray | nullcomments[]object답변 세부 정보 및 참여도필드 12개
data.comments[]cidstringaweme_idstringtextstringcreate_timeintegerdigg_countintegerstatusintegerlevelintegercomment_reply_totalintegeris_hotbooleanis_foldedbooleanis_author_diggedbooleancontent_typeinteger답변 관계필드 5개
data.comments[]reply_idstringreply_to_reply_idstringreply_to_usernamestringreply_to_useridstringreply_to_user_sec_idstring답변 작성자필드 45개
data.comments[]userobjectuser.uidstringuser.sec_uidstringuser.short_idstringuser.unique_idstringuser.nicknamestringuser.avatar_thumbobjectuser.avatar_thumb.uristringuser.avatar_thumb.url_listarrayuser.avatar_thumb.url_list[]stringuser.avatar_thumb.widthintegeruser.avatar_thumb.heightintegeruser.avatar_mediumobjectuser.avatar_medium.uristringuser.avatar_medium.url_listarrayuser.avatar_medium.url_list[]stringuser.avatar_medium.widthintegeruser.avatar_medium.heightintegeruser.avatar_largerobjectuser.avatar_larger.uristringuser.avatar_larger.url_listarrayuser.avatar_larger.widthintegeruser.avatar_larger.heightintegeruser.avatar_168x168objectuser.avatar_168x168.uristringuser.avatar_168x168.url_listarrayuser.avatar_168x168.widthintegeruser.avatar_168x168.heightintegeruser.avatar_300x300objectuser.avatar_300x300.uristringuser.avatar_300x300.url_listarrayuser.avatar_300x300.widthintegeruser.avatar_300x300.heightintegeruser.is_verifiedbooleanuser.verification_typeintegeruser.custom_verifystringuser.enterprise_verify_reasonstringuser.aweme_countintegeruser.follower_countintegeruser.follower_count_strstringuser.following_countintegeruser.favoriting_countintegeruser.total_favoritedintegeruser.room_idintegeruser.room_id_strstring텍스트 엔티티 및 레이블필드 15개
data.comments[]text_extraarraytext_extra[]objecttext_extra[].startintegertext_extra[].endintegertext_extra[].typeintegertext_extra[].user_idstringtext_extra[].sec_uidstringtext_extra[].hashtag_idstringtext_extra[].hashtag_namestringlabel_textstringlabel_typeintegerlabel_listarray | nulllabel_list[]objectlabel_list[].typeintegerlabel_list[].textstring스티커필드 19개
data.comments[]stickerobjectsticker.idintegersticker.id_strstringsticker.widthintegersticker.heightintegersticker.static_urlobjectsticker.static_url.uristringsticker.static_url.url_listarraysticker.static_url.url_list[]stringsticker.static_url.widthintegersticker.static_url.heightintegersticker.animate_urlobjectsticker.animate_url.uristringsticker.animate_url.url_listarraysticker.animate_url.url_list[]stringsticker.animate_url.widthintegersticker.animate_url.heightintegersticker.sticker_typeintegersticker.origin_package_idinteger응답 예시