api接口.md 15 KB

搜索用户/话题/地点/Search users/hashtags/places

  • GET https://api.tikhub.io/api/v1/instagram/v1/fetch_search Instagram-V1-API Last modified: 2 days ago OperationId: fetch_search_api_v1_instagram_v1_fetch_search_get [中文] 用途: 根据关键词搜索Instagram上的用户、话题标签或地点 参数: query: 搜索关键词 select: 筛选类型(可选) users: 仅返回用户 hashtags: 仅返回话题标签 places: 仅返回地点 不传: 返回所有类型 返回: users: 用户列表 hashtags: 话题列表 places: 地点列表 价格: 0.001 USD/请求 [English] Purpose: Search users, hashtags or places on Instagram Parameters: query: Search keyword select: Filter type (optional) users: Only return users hashtags: Only return hashtags places: Only return places omit: Return all types Return: users: Users list hashtags: Hashtags list places: Places list Price: 0.001 USD/request [示例/Example] query = "taylorswift" select = "users" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params query string Query required 搜索关键词/Search keyword Example: taylorswift select string Select optional 筛选类型:users/hashtags/places,不传则返回全部/Filter type: users/hashtags/places, omit for all Request Code Samples var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");
  • var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

    fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_search?query=taylorswift&select", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));

    根据用户名获取用户数据V3/Get user data by username V3

    • GET https://api.tikhub.io/api/v1/instagram/v1/fetch_user_info_by_username_v3 Instagram-V1-API Last modified: 2 days ago OperationId: fetch_user_info_by_username_v3_api_v1_instagram_v1_fetch_user_info_by_username_v3_get [中文] 用途: 根据Instagram用户名获取用户数据,返回更详细的信息 参数: username: Instagram用户名 返回: 用户信息对象,包含以下主要字段: pk/id: 用户ID username: 用户名 full_name: 用户全名 biography: 个人简介 bio_links: 个人简介链接列表 follower_count: 粉丝数 following_count: 关注数 media_count: 媒体数量 profile_pic_url: 头像URL hd_profile_pic_url_info: 高清头像URL信息 is_private: 是否私密账户 is_verified: 是否已认证 价格: 0.001 USD/请求 [English] Purpose: Get user data by Instagram username with more details Parameters: username: Instagram username Return: User information object with main fields: pk/id: User ID username: Username full_name: Full name biography: Bio bio_links: Bio links list follower_count: Followers count following_count: Following count media_count: Media count profile_pic_url: Profile picture URL hd_profile_pic_url_info: HD profile picture URL info is_private: Whether account is private is_verified: Whether account is verified Price: 0.001 USD/request [示例/Example] username = "instagram" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params username string Username required Instagram用户名/Instagram username Example: instagram var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");
    • var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

      fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_user_info_by_username_v3?username=instagram", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));

      获取用户Reels列表/Get user Reels list

      • GET https://api.tikhub.io/api/v1/instagram/v1/fetch_user_reels Instagram-V1-API Last modified: 2 days ago OperationId: fetch_user_reels_api_v1_instagram_v1_fetch_user_reels_get [中文] 用途: 获取用户Reels短视频列表,支持分页 参数: user_id: Instagram用户ID count: 每页数量,默认12 max_id: 分页游标,首次请求不传 返回: items: Reels列表 paging_info: 分页信息 价格: 0.001 USD/请求 [English] Purpose: Get user Reels list with pagination Parameters: user_id: Instagram user ID count: Count per page, default 12 max_id: Pagination cursor, omit for first request Return: items: Reels list paging_info: Pagination info Price: 0.001 USD/request [示例/Example] user_id = "25025320" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params user_id string User Id required Instagram用户ID/Instagram user ID Example: 25025320 count integer Count optional 每页数量/Count per page >= 1 <= 50 Default: 12 max_id string Max Id optional 分页游标,用于获取下一页/Pagination cursor for next page Request Code Samples var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");
      • var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

        fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_user_reels?user_id=25025320&count&max_id", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));

        获取用户帖子列表V2/Get user posts list V2

        • GET https://api.tikhub.io/api/v1/instagram/v1/fetch_user_posts_v2 Instagram-V1-API Last modified: 2 days ago OperationId: fetch_user_posts_v2_api_v1_instagram_v1_fetch_user_posts_v2_get [中文] 用途: 获取用户帖子列表,支持分页 参数: user_id: Instagram用户ID count: 每页数量,默认12 end_cursor: 分页游标,首次请求不传 返回: GraphQL风格响应,包含data.user.edge_owner_to_timeline_media 价格: 0.001 USD/请求 [English] Purpose: Get user posts list with pagination Parameters: user_id: Instagram user ID count: Count per page, default 12 end_cursor: Pagination cursor, omit for first request Return: GraphQL style response with data.user.edge_owner_to_timeline_media Price: 0.001 USD/request [示例/Example] user_id = "25025320" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params user_id string User Id required Instagram用户ID/Instagram user ID Example: 25025320 count integer Count optional 每页数量/Count per page >= 1 <= 50 Default: 12 end_cursor string End Cursor optional 分页游标,用于获取下一页/Pagination cursor for next page Request Code Samples var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");
        • var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

          fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_user_posts_v2?user_id=25025320&count&end_cursor", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));

          获取帖子评论列表V2/Get post comments V2

          • GET https://api.tikhub.io/api/v1/instagram/v1/fetch_post_comments_v2 Instagram-V1-API Last modified: 2 days ago OperationId: fetch_post_comments_v2_api_v1_instagram_v1_fetch_post_comments_v2_get [中文] 用途: 获取帖子评论列表,支持分页 返回的评论数据更完整,包含子评论预览和更多元数据 参数: media_id: 帖子ID(媒体ID) sort_order: 排序方式,popular(热门)/recent(最新) min_id: 分页游标,首次请求不传,从上一次响应的next_min_id字段获取 返回: comment_count: 评论总数 comments: 评论列表,每个评论包含: pk: 评论ID text: 评论内容 created_at/created_at_utc: 评论时间戳 user: 评论者信息(pk, username, full_name, is_verified, profile_pic_url等) comment_like_count: 评论点赞数 child_comment_count: 子评论数量 preview_child_comments: 子评论预览列表 is_liked_by_media_owner: 是否被帖子作者点赞 has_translation: 是否有翻译 next_min_id: 下一页游标(JSON格式字符串) has_more_headload_comments: 是否有更多评论 caption: 帖子描述信息 价格: 0.001 USD/请求 [English] Purpose: Get post comments list with pagination Returns more complete comment data including child comment previews and more metadata Parameters: media_id: Post ID (Media ID) sort_order: Sorting method, popular/recent min_id: Pagination cursor, omit for first request, get from previous response's next_min_id Return: comment_count: Total comments count comments: Comments list, each comment contains: pk: Comment ID text: Comment content created_at/created_at_utc: Comment timestamp user: Commenter info (pk, username, full_name, is_verified, profile_pic_url etc.) comment_like_count: Comment likes count child_comment_count: Child comments count preview_child_comments: Child comments preview list is_liked_by_media_owner: Whether liked by post author has_translation: Whether translation available next_min_id: Next page cursor (JSON format string) has_more_headload_comments: Whether more comments available caption: Post caption info Price: 0.001 USD/request [示例/Example] media_id = "3766120364183949816" sort_order = "recent" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params media_id string Media Id required 帖子ID(媒体ID)/Post ID (Media ID) Example: 3766120364183949816 sort_order string Sort Order optional 排序方式:popular(热门)/recent(最新)/Sorting: popular/recent Default: recent Example: recent min_id string Min Id optional 分页游标,从上一次响应的next_min_id获取/Pagination cursor from previous response's next_min_id Request Code Samples var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");
          • var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

            fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_post_comments_v2?media_id=3766120364183949816&sort_order=recent&min_id=", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));

            获取评论的子评论列表/Get comment replies

            • GET https://api.tikhub.io/api/v1/instagram/v1/fetch_comment_replies Instagram-V1-API Last modified: 2 days ago OperationId: fetch_comment_replies_api_v1_instagram_v1_fetch_comment_replies_get [中文] 用途: 获取指定评论下的子评论(二级评论/回复),支持分页 参数: media_id: 帖子ID(媒体ID) comment_id: 父评论ID(从fetch_post_comments_v2返回的评论pk字段获取) min_id: 分页游标,首次请求不传,从上一次响应的page_info.next_min_id字段获取 返回: child_comments: 子评论列表,每个评论包含: pk: 评论ID text: 评论内容 created_at/created_at_utc: 评论时间戳 user: 评论者信息(pk, username, full_name, is_verified, profile_pic_url等) comment_like_count: 评论点赞数 parent_comment_id: 父评论ID has_translation: 是否有翻译 child_comment_count: 子评论总数 has_more_tail_child_comments: 是否有更多子评论 next_min_child_cursor: 下一页游标 page_info: 分页信息汇总 价格: 0.001 USD/请求 [English] Purpose: Get child comments (replies) under a specific comment with pagination Parameters: media_id: Post ID (Media ID) comment_id: Parent comment ID (get from pk field in fetch_post_comments_v2 response) min_id: Pagination cursor, omit for first request, get from previous response's page_info.next_min_id Return: child_comments: Child comment list, each comment contains: pk: Comment ID text: Comment content created_at/created_at_utc: Comment timestamp user: Commenter info (pk, username, full_name, is_verified, profile_pic_url, etc.) comment_like_count: Comment like count parent_comment_id: Parent comment ID has_translation: Has translation child_comment_count: Total child comment count has_more_tail_child_comments: Has more child comments next_min_child_cursor: Next page cursor page_info: Pagination info summary Price: 0.001 USD/request [示例/Example] media_id = "3766120364183949816" comment_id = "17871667485468098" min_id = "" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params media_id string Media Id required 帖子ID(媒体ID)/Post ID (Media ID) Example: 3766120364183949816 comment_id string Comment Id required 父评论ID/Parent comment ID Example: 17871667485468098 min_id string Min Id optional 分页游标,从上一次响应的next_min_id获取/Pagination cursor from previous response's next_min_id Request Code Samples var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");
            • var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

              fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_comment_replies?media_id=3766120364183949816&comment_id=17871667485468098&min_id=", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));

              通过ID获取帖子详情/Get post by ID

              GET https://api.tikhub.io/api/v1/instagram/v1/fetch_post_by_id Instagram-V1-API Last modified: 2 days ago OperationId: fetch_post_by_id_api_v1_instagram_v1_fetch_post_by_id_get [中文] 用途: 通过ID获取单个帖子的详细信息 参数: post_id: 帖子ID 返回: 帖子详情对象,包含媒体、点赞数、评论等 价格: 0.001 USD/请求 [English] Purpose: Get single post details by ID Parameters: post_id: Post ID Return: Post details object with media, likes, comments etc. Price: 0.001 USD/request [示例/Example] post_id = "3742637871112032100" Request Authorization Bearer Token Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer ******************** Query Params post_id string Post Id required 帖子ID/Post ID Example: 3742637871112032100 Request Code Samples var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer ");

              var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' };

              fetch("https://api.tikhub.io/api/v1/instagram/v1/fetch_post_by_id?post_id=3742637871112032100", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));