dataxapi 1.0.0__tar.gz → 1.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataxapi
3
- Version: 1.0.0
3
+ Version: 1.1.1
4
4
  Summary: DataXAPI for Python: market data from 21 platforms (Douyin, Xiaohongshu/RedNote, TikTok, WeChat, X, YouTube...) over one interface, paid per call.
5
5
  Author-email: "DataXAPI (Aurevant LLC)" <support@dataxapi.com>
6
6
  License-Expression: MIT
@@ -22,10 +22,10 @@ Dynamic: license-file
22
22
 
23
23
  # DataXAPI for Python
24
24
 
25
- [DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 204 endpoints across 20
25
+ [DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 224 endpoints across 20
26
26
  platforms (Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more) behind one key and one response
27
27
  shape, paid per call from $0.0003, with failed calls free and $0.10 of free credit on sign-up. Social media is the
28
- largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.0.0
28
+ largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.1.0
29
29
  (October 2026); the live catalog is at [dataxapi.com/apis](https://dataxapi.com/apis/).
30
30
 
31
31
  `dataxapi` is the Python client: every endpoint is a method, generated from the catalog, with its price in its
@@ -1,9 +1,9 @@
1
1
  # DataXAPI for Python
2
2
 
3
- [DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 204 endpoints across 20
3
+ [DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 224 endpoints across 20
4
4
  platforms (Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more) behind one key and one response
5
5
  shape, paid per call from $0.0003, with failed calls free and $0.10 of free credit on sign-up. Social media is the
6
- largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.0.0
6
+ largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.1.0
7
7
  (October 2026); the live catalog is at [dataxapi.com/apis](https://dataxapi.com/apis/).
8
8
 
9
9
  `dataxapi` is the Python client: every endpoint is a method, generated from the catalog, with its price in its
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "dataxapi"
8
- version = "1.0.0"
8
+ version = "1.1.1"
9
9
  description = "DataXAPI for Python: market data from 21 platforms (Douyin, Xiaohongshu/RedNote, TikTok, WeChat, X, YouTube...) over one interface, paid per call."
10
10
  readme = "README.md"
11
11
  license = "MIT"
@@ -15,4 +15,4 @@ from ._generated import DataXAPI, ERRORS, REVISION, ROLES
15
15
  from ._runtime import CallOptions, Client, Envelope, KeyTooLongError, Meta, Page, PlatformOutcome, RunRef, UnknownRoleError
16
16
  from ._transport import APIConnectionError, DataXAPIError, FailedCall
17
17
 
18
- __version__ = "1.0.0"
18
+ __version__ = "1.1.1"
@@ -1,4 +1,4 @@
1
- # Generated by `npm run generate` from catalog revision c48ce454ae6c4c65, starting prices.
1
+ # Generated by `npm run generate` from catalog revision 0320b465c3862c54, starting prices.
2
2
  # Do not edit: change the definitions and generate again.
3
3
  from __future__ import annotations
4
4
 
@@ -7,10 +7,10 @@ from typing import Any, Dict, List, Literal, Optional, Sequence, TypedDict
7
7
  from ._runtime import CallOptions, Client, Envelope
8
8
  from ._transport import DataXAPIError
9
9
 
10
- __all__ = ["REVISION","Approximate","PostAuthor","PostMetrics","PostMentions","Post","CommentAuthor","CommentMetrics","Comment","AccountMetrics","Account","Trend","TranscriptSegments","Transcript","CreatorRatesRates","CreatorRates","CommunityMetrics","Community","ProductMetrics","ProductShop","Product","ReviewAuthor","Review","KeywordHistoryPoints","KeywordHistory","KeywordRelated","KeywordAudienceAge","KeywordAudienceGender","KeywordAudienceProvince","KeywordAudienceCity","KeywordAudienceCityTier","KeywordAudienceInterest","KeywordAudience","AccountHistoryGained","AccountHistoryChange","AccountHistoryTotals","AccountHistory","BrandHistoryPoints","BrandHistory","BrandMetricsBenchmarks","BrandMetrics","CreatorMetrics","Creator","AudienceGender","AudienceAge","AudienceProvince","AudienceCity","AudienceInterest","AudienceDevice","AudienceCityTier","AudienceCrowd","AudiencePurchaseCategory","AudiencePurchaseAmount","Audience","XingtuCreatorMetrics","XingtuCreatorPostMetrics","XingtuCreatorPost","PgyCreatorMetrics","PgyCreatorPostMetrics","PgyCreatorPost","AdAdvertiser","Ad","Advertiser","IndexCreatorMetricsAverage7d","IndexCreatorMetricsAverage30d","IndexCreatorMetricsChange7d","IndexCreatorMetricsChange30d","IndexCreatorMetrics","XingtuCreatorKeywordsKeywords","XingtuCreatorKeywords","XingtuCreatorScoresOverall","XingtuCreatorScoresReach","XingtuCreatorScoresSeeding","XingtuCreatorScoresConversion","XingtuCreatorScoresCooperation","XingtuCreatorScoresValueForMoney","XingtuCreatorScores","XingtuCreatorContentMixCategories","XingtuCreatorContentMix","XingtuCreatorConversionCategories","XingtuCreatorConversion","XingtuCampaign","ChannelsCollectionMetrics","ChannelsCollection","TopicMetrics","Topic","DouyinCommentExt","DouyinTrendExt","DouyinAccountExt","DouyinPostExt","DouyinKeywordHistoryExt","DouyinKeywordRelatedExt","DouyinCreatorExt","KuaishouAccountExt","KuaishouCommentExt","XiaohongshuPostExt","XiaohongshuCommentExt","XiaohongshuTopicExt","XiaohongshuAccountExt","XiaohongshuReviewExt","XiaohongshuKeywordRelatedExt","XiaohongshuCreatorExt","WechatMpAccountExt","WechatMpPostExt","WechatMpCommentExt","WechatPostExt","WechatChannelsPostExt","WechatChannelsAccountExt","WechatChannelsCommentExt","BilibiliPostExt","WeiboPostExt","WeiboCommentExt","XPostExt","XCommunityExt","TelegramPostExt","YoutubeAccountExt","YoutubePostExt","YoutubeCommentExt","PinterestPostExt","FacebookAccountExt","LinkedinAccountExt","LinkedinAdExt","ThreadsPostExt","RedditPostExt","RedditCommentExt","RedditCommunityExt","RedditAccountExt","ZhihuPostExt","ZhihuAccountExt","ZhihuTrendExt","TiktokPostExt","TiktokAccountExt","TiktokReviewExt","TiktokAdExt","MetaAdExtPlatforms","MetaAdExtCards","MetaAdExt","MetaAdvertiserExt","GoogleAdExtVariations","GoogleAdExt","GoogleAdvertiserExt","InstagramPostExt","InstagramAccountExt","InvalidParamsError","RequestNotServedError","MaxPriceExceededError","CursorInvalidError","CursorMismatchError","UnauthorizedError","InsufficientBalanceError","KeyBudgetExceededError","RunBudgetExceededError","AccountSuspendedError","ForbiddenError","KeyScopeDeniedError","NotFoundError","ResultNotFoundError","RunNotFoundError","UnknownEndpointError","CallInProgressError","IdempotencyConflictError","CursorExpiredError","ResultExpiredError","RunExpiredError","RateLimitedError","CostCapExceededError","UnchargedCostLimitError","SettlementUnknownError","InternalError","UpstreamFailedError","UpstreamChangedError","UpstreamUnclearError","CursorUnavailableError","UpstreamBusyError","CapabilityPausedError","OverloadedError","CallTimeoutError","ERRORS","ROLES","DataXAPI"]
10
+ __all__ = ["REVISION","Approximate","PostAuthor","PostMetrics","PostMentions","Post","CommentAuthor","CommentMetrics","Comment","AccountMetrics","Account","Trend","TranscriptSegments","Transcript","CreatorRatesRates","CreatorRates","CommunityMetrics","Community","ProductMetrics","ProductShop","Product","ReviewAuthor","Review","KeywordHistoryPoints","KeywordHistory","KeywordRelated","KeywordAudienceAge","KeywordAudienceGender","KeywordAudienceProvince","KeywordAudienceCity","KeywordAudienceCityTier","KeywordAudienceInterest","KeywordAudience","AccountHistoryGained","AccountHistoryChange","AccountHistoryTotals","AccountHistory","BrandHistoryPoints","BrandHistory","BrandMetricsBenchmarks","BrandMetrics","CreatorMetrics","Creator","AudienceGender","AudienceAge","AudienceProvince","AudienceCity","AudienceInterest","AudienceDevice","AudienceCityTier","AudienceCrowd","AudiencePurchaseCategory","AudiencePurchaseAmount","Audience","XingtuCreatorMetrics","XingtuCreatorPostMetrics","XingtuCreatorPost","PgyCreatorMetrics","PgyCreatorPostMetrics","PgyCreatorPost","AdAdvertiser","Ad","Advertiser","IndexCreatorMetricsAverage7d","IndexCreatorMetricsAverage30d","IndexCreatorMetricsChange7d","IndexCreatorMetricsChange30d","IndexCreatorMetrics","XingtuCreatorKeywordsKeywords","XingtuCreatorKeywords","XingtuCreatorScoresOverall","XingtuCreatorScoresReach","XingtuCreatorScoresSeeding","XingtuCreatorScoresConversion","XingtuCreatorScoresCooperation","XingtuCreatorScoresValueForMoney","XingtuCreatorScores","XingtuCreatorContentMixCategories","XingtuCreatorContentMix","XingtuCreatorConversionCategories","XingtuCreatorConversion","XingtuCampaign","ChannelsCollectionMetrics","ChannelsCollection","TopicMetrics","Topic","AccountOwner","Miniprogram","DouyinCommentExt","DouyinTrendExt","DouyinAccountExt","DouyinPostExt","DouyinKeywordHistoryExt","DouyinKeywordRelatedExt","DouyinCreatorExt","KuaishouAccountExt","KuaishouCommentExt","XiaohongshuPostExt","XiaohongshuCommentExt","XiaohongshuTopicExt","XiaohongshuAccountExt","XiaohongshuReviewExt","XiaohongshuKeywordRelatedExt","XiaohongshuCreatorExt","WechatMpAccountExt","WechatMpPostExt","WechatMpCommentExt","WechatPostExt","WechatChannelsPostExt","WechatChannelsAccountExt","WechatChannelsCommentExt","BilibiliPostExt","WeiboPostExt","WeiboCommentExt","XPostExt","XCommunityExt","TelegramPostExt","YoutubeAccountExt","YoutubePostExt","YoutubeCommentExt","PinterestPostExt","FacebookAccountExt","LinkedinAccountExt","LinkedinAdExt","ThreadsPostExt","RedditPostExt","RedditCommentExt","RedditCommunityExt","RedditAccountExt","ZhihuPostExt","ZhihuAccountExt","ZhihuTrendExt","TiktokPostExt","TiktokAccountExt","TiktokReviewExt","TiktokAdExt","MetaAdExtPlatforms","MetaAdExtCards","MetaAdExt","MetaAdvertiserExt","GoogleAdExtVariations","GoogleAdExt","GoogleAdvertiserExt","InstagramPostExt","InstagramAccountExt","InvalidParamsError","RequestNotServedError","MaxPriceExceededError","CursorInvalidError","CursorMismatchError","UnauthorizedError","InsufficientBalanceError","KeyBudgetExceededError","RunBudgetExceededError","AccountSuspendedError","ForbiddenError","KeyScopeDeniedError","NotFoundError","ResultNotFoundError","RunNotFoundError","UnknownEndpointError","CallInProgressError","IdempotencyConflictError","CursorExpiredError","ResultExpiredError","RunExpiredError","RateLimitedError","CostCapExceededError","UnchargedCostLimitError","SettlementUnknownError","InternalError","UpstreamFailedError","UpstreamChangedError","UpstreamUnclearError","CursorUnavailableError","UpstreamBusyError","CapabilityPausedError","OverloadedError","CallTimeoutError","ERRORS","ROLES","DataXAPI"]
11
11
 
12
12
  # The catalog revision this file was made from.
13
- REVISION = "c48ce454ae6c4c65"
13
+ REVISION = "0320b465c3862c54"
14
14
 
15
15
 
16
16
  # --- objects ---------------------------------------------------------------------------
@@ -427,8 +427,8 @@ class KeywordRelated(TypedDict, total=False):
427
427
  keyword: Optional[str]
428
428
  # The keyword it is related to: the one asked about
429
429
  related_to: Optional[str]
430
- # How it is related: query (searched together with the keyword asked about), posts (appears together with it in content), prior (searched before it), after (searched after it)
431
- relation: Optional[Literal["query", "posts", "prior", "after"]]
430
+ # How it is related: query (searched together with the keyword asked about), posts (appears together with it in content), prior (searched before it), after (searched after it), suggestion (what the platform suggests as the keyword is typed into its search box)
431
+ relation: Optional[Literal["query", "posts", "prior", "after", "suggestion"]]
432
432
  # Position by relevance among the keywords of the same relation, from 1
433
433
  rank: Optional[int]
434
434
  # How closely it is related to the keyword asked about, 0 to 1
@@ -1399,6 +1399,62 @@ class Topic(TypedDict, total=False):
1399
1399
  ext: Dict[str, Any]
1400
1400
 
1401
1401
 
1402
+ class AccountOwner(TypedDict, total=False):
1403
+ """Account owner (preview: may change, announced beforehand)"""
1404
+
1405
+ # The owner's name: the full name of a company or body, or a person's name for a personal owner
1406
+ name: Optional[str]
1407
+ # What the owner is: company, government, media, individual, or other (another kind of organisation)
1408
+ type: Optional[Literal["company", "government", "media", "individual", "other"]]
1409
+ # The number the owner is registered under (unified social credit code, business licence or organisation code); null where the platform gives none
1410
+ registration_id: Optional[str]
1411
+ # The owner's country or region, in the platform's words (standard view)
1412
+ country: Optional[str]
1413
+ # The account's verification: verified (a personal verification included), unverified, or expired
1414
+ verification: Optional[Literal["verified", "unverified", "expired"]]
1415
+ # The kind of verification, in the platform's words (such as 企业认证, company verification); null when not verified (standard view)
1416
+ verification_type: Optional[str]
1417
+ # The date the verification was granted, written as midnight UTC of that date (standard view)
1418
+ verified_at: Optional[str]
1419
+ # ID of the account asked about: this is its owner
1420
+ account_id: Optional[str]
1421
+ # The date the account asked about was registered, written as midnight UTC of that date (standard view)
1422
+ account_created_at: Optional[str]
1423
+ # Third-party services the account asked about has authorised, in the platform's words (company names) (full view)
1424
+ authorized_services: Optional[List[str]]
1425
+ # Which numbers of this item are approximate or lower bounds; absent when all are exact
1426
+ approximate: Optional[List[Approximate]]
1427
+ # The platform's own fields (full view)
1428
+ ext: Dict[str, Any]
1429
+
1430
+
1431
+ class Miniprogram(TypedDict, total=False):
1432
+ """Mini program (preview: may change, announced beforehand)"""
1433
+
1434
+ # Original ID (starting with gh_)
1435
+ id: Optional[str]
1436
+ # AppID (starting with wx), used to open or link to the mini program; null where the platform gives none
1437
+ app_id: Optional[str]
1438
+ # Name
1439
+ name: Optional[str]
1440
+ # Description
1441
+ description: Optional[str]
1442
+ # Icon (standard view)
1443
+ icon_url: Optional[str]
1444
+ # The owner's name: the company or body that runs it
1445
+ owner_name: Optional[str]
1446
+ # Whether the owner is verified (standard view)
1447
+ owner_verified: Optional[bool]
1448
+ # How many people used it lately, as the platform shows it; one shown like 1万+ is a lower bound; null where it shows none (standard view)
1449
+ recent_users: Optional[int]
1450
+ # Whether it is a mini game (standard view)
1451
+ is_game: Optional[bool]
1452
+ # Which numbers of this item are approximate or lower bounds; absent when all are exact
1453
+ approximate: Optional[List[Approximate]]
1454
+ # The platform's own fields (full view)
1455
+ ext: Dict[str, Any]
1456
+
1457
+
1402
1458
  class DouyinCommentExt(TypedDict, total=False):
1403
1459
  """What only Douyin has on a comment"""
1404
1460
 
@@ -1572,6 +1628,20 @@ class WechatMpAccountExt(TypedDict, total=False):
1572
1628
  original_articles: Optional[int]
1573
1629
  # ID of the linked Channels account (full view)
1574
1630
  channels_id: Optional[str]
1631
+ # The account's __biz: what follows __biz= in the links of its articles (full view)
1632
+ biz: Optional[str]
1633
+ # Name of the account's owner (a company or body); null for a personal account and where none is on record (full view)
1634
+ owner_name: Optional[str]
1635
+ # Estimated active followers: a third-party database's estimate from reads and the like, not a follower count the platform publishes (it publishes none), and possibly weeks to months old (full view)
1636
+ estimated_followers: Optional[int]
1637
+ # Estimated average reads of the account's lead articles: a third-party database's estimate, possibly out of date (full view)
1638
+ estimated_headline_reads: Optional[int]
1639
+ # Estimated average likes of the account's lead articles: a third-party database's estimate, possibly out of date (full view)
1640
+ estimated_headline_likes: Optional[int]
1641
+ # Estimated articles a week: as a third-party database counts them, possibly out of date (full view)
1642
+ estimated_weekly_articles: Optional[int]
1643
+ # When the account last published, as a third-party database has it; earlier than the truth when the database has not caught up (full view)
1644
+ estimated_last_published_at: Optional[str]
1575
1645
 
1576
1646
 
1577
1647
  class WechatMpPostExt(TypedDict, total=False):
@@ -1611,6 +1681,8 @@ class WechatChannelsAccountExt(TypedDict, total=False):
1611
1681
 
1612
1682
  # IP location as the platform shows it (full view)
1613
1683
  ip_location: Optional[str]
1684
+ # What the verification says, in the platform's words: the owner's name for a company or body, a role or profession for a person; null when not verified (full view)
1685
+ verification: Optional[str]
1614
1686
 
1615
1687
 
1616
1688
  class WechatChannelsCommentExt(TypedDict, total=False):
@@ -2020,7 +2092,7 @@ class InstagramAccountExt(TypedDict, total=False):
2020
2092
 
2021
2093
 
2022
2094
  class InvalidParamsError(DataXAPIError):
2023
- """400, retry: after_fix. A parameter is invalid"""
2095
+ """400, retry: after_fix, charged the endpoint's price where its data source billed the answer. A parameter is invalid"""
2024
2096
 
2025
2097
 
2026
2098
  class RequestNotServedError(DataXAPIError):
@@ -2068,7 +2140,7 @@ class KeyScopeDeniedError(DataXAPIError):
2068
2140
 
2069
2141
 
2070
2142
  class NotFoundError(DataXAPIError):
2071
- """404, retry: no. The object does not exist, is private or was deleted"""
2143
+ """404, retry: no, charged the endpoint's price where its data source billed the answer. The object does not exist, is private or was deleted"""
2072
2144
 
2073
2145
 
2074
2146
  class ResultNotFoundError(DataXAPIError):
@@ -2204,6 +2276,7 @@ ROLES: Dict[str, Dict[str, Any]] = {
2204
2276
  "weibo": "weibo.comments.replies.list",
2205
2277
  "xiaohongshu": "xiaohongshu.comments.replies.list",
2206
2278
  "youtube": "youtube.comments.replies.list",
2279
+ "wechat_channels": "wechat_channels.comments.replies.list",
2207
2280
  "zhihu": "zhihu.comments.replies.list"
2208
2281
  },
2209
2282
  "social.topics.posts.list": {
@@ -2340,11 +2413,14 @@ ROLES: Dict[str, Dict[str, Any]] = {
2340
2413
  "x": "x.users.search",
2341
2414
  "xiaohongshu": "xiaohongshu.users.search",
2342
2415
  "youtube": "youtube.channels.search",
2416
+ "wechat_mp": "wechat_mp.accounts.search",
2417
+ "wechat_channels": "wechat_channels.users.search",
2343
2418
  "zhihu": "zhihu.users.search"
2344
2419
  },
2345
2420
  "social.posts.metrics": {
2346
2421
  "douyin": "douyin.videos.metrics",
2347
- "wechat_mp": "wechat_mp.articles.metrics"
2422
+ "wechat_mp": "wechat_mp.articles.metrics",
2423
+ "wechat_channels": "wechat_channels.videos.metrics"
2348
2424
  },
2349
2425
  "social.posts.related": {
2350
2426
  "douyin": "douyin.videos.related"
@@ -2726,20 +2802,22 @@ class _DouyinUsersVideos:
2726
2802
  def __init__(self, client: Client) -> None:
2727
2803
  self._client = client
2728
2804
 
2729
- def list(self, *, id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2805
+ def list(self, *, id: Optional[str] = None, url: Optional[str] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2730
2806
  """Douyin user videos. Get a page of the videos a Douyin account has posted, newest first: caption, engagement counts, time posted.
2731
2807
 
2732
2808
  GET /v1/douyin/users/videos/list; returns a page of `post`.
2733
2809
  Price: $0.002 per call, also when the result is empty.
2734
2810
  Paging: about 20 items a page, 20 at most; next page by `cursor`, valid 3600 s.
2811
+ Give exactly one of id, url.
2735
2812
  An account that does not exist cannot be told from an account without videos: both return an empty result, not a 404, and are charged as an empty result is.
2736
2813
 
2737
- id: Account ID (the sec_uid, the string that starts with MS4w). Required.
2814
+ id: Account ID (the sec_uid, the string that starts with MS4w). With only a profile link or a share text, give it as url.
2815
+ url: Link to the profile, pasted as it is: the https://www.douyin.com/user/… web link, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which account it leads to.
2738
2816
  cursor: Cursor returned by the previous page.
2739
2817
  view: How much of each item to return. Default: standard.
2740
2818
  fields: Return only these fields.
2741
2819
  """
2742
- return self._client.call("douyin.users.videos.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
2820
+ return self._client.call("douyin.users.videos.list", {"id": id, "url": url, "cursor": cursor, "view": view, "fields": fields}, options=options)
2743
2821
 
2744
2822
 
2745
2823
  class _DouyinUsers:
@@ -2755,8 +2833,8 @@ class _DouyinUsers:
2755
2833
  Paging: none: one object a call.
2756
2834
  Give exactly one of id, url.
2757
2835
 
2758
- id: Account ID (the sec_uid, the string that starts with MS4w).
2759
- url: Long web link to the profile.
2836
+ id: Account ID (the sec_uid, the string that starts with MS4w). With only a profile link or a share text, give it as url.
2837
+ url: Link to the profile, pasted as it is: the https://www.douyin.com/user/… web link, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which account it leads to.
2760
2838
  view: How much of each item to return. Default: standard.
2761
2839
  fields: Return only these fields.
2762
2840
  """
@@ -2797,20 +2875,22 @@ class _DouyinVideosComments:
2797
2875
  def __init__(self, client: Client) -> None:
2798
2876
  self._client = client
2799
2877
 
2800
- def list(self, *, id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2878
+ def list(self, *, id: Optional[str] = None, url: Optional[str] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2801
2879
  """Douyin video comments. Get a page of comments on a Douyin video: text, commenter, likes, reply count, time posted.
2802
2880
 
2803
2881
  GET /v1/douyin/videos/comments/list; returns a page of `comment`.
2804
2882
  Price: $0.002 per call, also when the result is empty.
2805
2883
  Paging: about 20 items a page, 20 at most; next page by `cursor`, valid 3600 s.
2884
+ Give exactly one of id, url.
2806
2885
  A video that does not exist cannot be told from a video without comments: both return an empty result, not a 404, and are charged as an empty result is.
2807
2886
 
2808
- id: Video ID. Required.
2887
+ id: Video ID, a string of digits. With only a link or a share text, give it as url.
2888
+ url: Link to the video, pasted as it is: the https://www.douyin.com/video/… web link, a web link with modal_id in it, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
2809
2889
  cursor: Cursor returned by the previous page.
2810
2890
  view: How much of each item to return. Default: standard.
2811
2891
  fields: Return only these fields.
2812
2892
  """
2813
- return self._client.call("douyin.videos.comments.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
2893
+ return self._client.call("douyin.videos.comments.list", {"id": id, "url": url, "cursor": cursor, "view": view, "fields": fields}, options=options)
2814
2894
 
2815
2895
 
2816
2896
  class _DouyinVideos:
@@ -2826,25 +2906,27 @@ class _DouyinVideos:
2826
2906
  Paging: none: one object a call.
2827
2907
  Give exactly one of id, url.
2828
2908
 
2829
- id: Video ID, a string of digits.
2830
- url: Long web link to the video.
2909
+ id: Video ID, a string of digits. With only a link or a share text, give it as url.
2910
+ url: Link to the video, pasted as it is: the https://www.douyin.com/video/… web link, a web link with modal_id in it, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
2831
2911
  view: How much of each item to return. Default: standard.
2832
2912
  fields: Return only these fields.
2833
2913
  """
2834
2914
  return self._client.call("douyin.videos.get", {"id": id, "url": url, "view": view, "fields": fields}, options=options)
2835
2915
 
2836
- def metrics(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2916
+ def metrics(self, *, id: Optional[str] = None, url: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2837
2917
  """Douyin video play count. Get a Douyin video's counts as of now, by its ID: plays and likes.
2838
2918
 
2839
2919
  GET /v1/douyin/videos/metrics; returns one `post`.
2840
2920
  Price: $0.002 per call, nothing when it finds nothing.
2841
2921
  Paging: none: one object a call.
2922
+ Give exactly one of id, url.
2842
2923
 
2843
- id: Video ID, a string of digits. Required.
2924
+ id: Video ID, a string of digits. With only a link or a share text, give it as url.
2925
+ url: Link to the video, pasted as it is: the https://www.douyin.com/video/… web link, a web link with modal_id in it, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
2844
2926
  view: How much of each item to return. Default: standard.
2845
2927
  fields: Return only these fields.
2846
2928
  """
2847
- return self._client.call("douyin.videos.metrics", {"id": id, "view": view, "fields": fields}, options=options)
2929
+ return self._client.call("douyin.videos.metrics", {"id": id, "url": url, "view": view, "fields": fields}, options=options)
2848
2930
 
2849
2931
  def related(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
2850
2932
  """Douyin related videos. Get the batch of videos Douyin recommends beside a video, by its ID: caption, author, engagement counts. The recommendations may differ from call to call.
@@ -3100,6 +3182,62 @@ class _DouyinXingtu:
3100
3182
  self.campaigns = _DouyinXingtuCampaigns(client)
3101
3183
 
3102
3184
 
3185
+ class _DouyinBackupUsersVideos:
3186
+ def __init__(self, client: Client) -> None:
3187
+ self._client = client
3188
+
3189
+ def list(self, *, id: Optional[str] = None, url: Optional[str] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
3190
+ """Douyin user videos (backup). The backup of Douyin user videos, to call when the original fails upstream: the same parameters and result, at a higher price.
3191
+
3192
+ GET /v1/douyin/backup/users/videos/list; returns a page of `post`.
3193
+ Price: $0.03 per call, also when the result is empty.
3194
+ Paging: about 20 items a page, 20 at most; next page by `cursor`, valid 3600 s.
3195
+ Give exactly one of id, url.
3196
+ An account that does not exist cannot be told from an account without videos: both return an empty result, not a 404, and are charged as an empty result is.
3197
+
3198
+ id: Account ID (the sec_uid, the string that starts with MS4w). With only a profile link or a share text, give it as url.
3199
+ url: Link to the profile, pasted as it is: the https://www.douyin.com/user/… web link, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which account it leads to.
3200
+ cursor: Cursor returned by the previous page.
3201
+ view: How much of each item to return. Default: standard.
3202
+ fields: Return only these fields.
3203
+ """
3204
+ return self._client.call("douyin.backup.users.videos.list", {"id": id, "url": url, "cursor": cursor, "view": view, "fields": fields}, options=options)
3205
+
3206
+
3207
+ class _DouyinBackupUsers:
3208
+ def __init__(self, client: Client) -> None:
3209
+ self._client = client
3210
+ self.videos = _DouyinBackupUsersVideos(client)
3211
+
3212
+
3213
+ class _DouyinBackupVideos:
3214
+ def __init__(self, client: Client) -> None:
3215
+ self._client = client
3216
+
3217
+ def search(self, *, query: str, sort: Optional[Literal["relevance", "latest", "popular"]] = None, published_within: Optional[Literal["day", "week", "half_year"]] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
3218
+ """Douyin video search (backup). The backup of Douyin video search, to call when the original fails upstream: the same parameters and result, at a higher price.
3219
+
3220
+ GET /v1/douyin/backup/videos/search; returns a page of `post`.
3221
+ Price: $0.03 per call, also when the result is empty.
3222
+ Paging: about 8 items a page, 20 at most; next page by `cursor`, valid 3600 s.
3223
+
3224
+ query: Search terms. Required.
3225
+ sort: Order: the platform's ranking, newest first, most liked first. Douyin does not serve most liked within a day; with that pair, a day's results come with each page in order of likes. Default: relevance.
3226
+ published_within: Only videos posted within the last day, week or half year; any time when left out.
3227
+ cursor: Cursor returned by the previous page.
3228
+ view: How much of each item to return. Default: standard.
3229
+ fields: Return only these fields.
3230
+ """
3231
+ return self._client.call("douyin.backup.videos.search", {"query": query, "sort": sort, "published_within": published_within, "cursor": cursor, "view": view, "fields": fields}, options=options)
3232
+
3233
+
3234
+ class _DouyinBackup:
3235
+ def __init__(self, client: Client) -> None:
3236
+ self._client = client
3237
+ self.users = _DouyinBackupUsers(client)
3238
+ self.videos = _DouyinBackupVideos(client)
3239
+
3240
+
3103
3241
  class _Douyin:
3104
3242
  def __init__(self, client: Client) -> None:
3105
3243
  self._client = client
@@ -3110,6 +3248,7 @@ class _Douyin:
3110
3248
  self.users = _DouyinUsers(client)
3111
3249
  self.videos = _DouyinVideos(client)
3112
3250
  self.xingtu = _DouyinXingtu(client)
3251
+ self.backup = _DouyinBackup(client)
3113
3252
 
3114
3253
 
3115
3254
  class _BilibiliCommentsReplies:
@@ -3228,7 +3367,7 @@ class _BilibiliVideos:
3228
3367
  Give exactly one of id, url.
3229
3368
 
3230
3369
  id: The video's BV number: 12 characters starting with BV1.
3231
- url: Link to the video page (www.bilibili.com/video/BV…); b23.tv short links are not taken.
3370
+ url: Link to the video, pasted as it is: the www.bilibili.com/video/BV… page, the phone site's m.bilibili.com/video/BV…, or the b23.tv short link the app copies. A short link is opened once to see which video it leads to.
3232
3371
  view: How much of each item to return. Default: standard.
3233
3372
  fields: Return only these fields.
3234
3373
  """
@@ -3263,6 +3402,38 @@ class _BilibiliVideos:
3263
3402
  return self._client.call("bilibili.videos.trending", {"cursor": cursor, "view": view, "fields": fields}, options=options)
3264
3403
 
3265
3404
 
3405
+ class _BilibiliBackupUsersVideos:
3406
+ def __init__(self, client: Client) -> None:
3407
+ self._client = client
3408
+
3409
+ def list(self, *, id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
3410
+ """Bilibili user videos (backup). The backup of Bilibili user videos, to call when the original fails upstream: the same parameters and result (without the description and the comment count), at a higher price.
3411
+
3412
+ GET /v1/bilibili/backup/users/videos/list; returns a page of `post`.
3413
+ Price: $0.03 per call, also when the result is empty.
3414
+ Paging: about 30 items a page, 30 at most; next page by `cursor`, valid 3600 s.
3415
+ A user that does not exist cannot be told from a user without videos: both return an empty result, not a 404, and are charged as an empty result is.
3416
+
3417
+ id: User number (mid), a string of digits. Required.
3418
+ cursor: Cursor returned by the previous page.
3419
+ view: How much of each item to return. Default: standard.
3420
+ fields: Return only these fields.
3421
+ """
3422
+ return self._client.call("bilibili.backup.users.videos.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
3423
+
3424
+
3425
+ class _BilibiliBackupUsers:
3426
+ def __init__(self, client: Client) -> None:
3427
+ self._client = client
3428
+ self.videos = _BilibiliBackupUsersVideos(client)
3429
+
3430
+
3431
+ class _BilibiliBackup:
3432
+ def __init__(self, client: Client) -> None:
3433
+ self._client = client
3434
+ self.users = _BilibiliBackupUsers(client)
3435
+
3436
+
3266
3437
  class _Bilibili:
3267
3438
  def __init__(self, client: Client) -> None:
3268
3439
  self._client = client
@@ -3270,6 +3441,7 @@ class _Bilibili:
3270
3441
  self.trends = _BilibiliTrends(client)
3271
3442
  self.users = _BilibiliUsers(client)
3272
3443
  self.videos = _BilibiliVideos(client)
3444
+ self.backup = _BilibiliBackup(client)
3273
3445
 
3274
3446
 
3275
3447
  class _KuaishouCommentsReplies:
@@ -3374,20 +3546,22 @@ class _KuaishouVideosComments:
3374
3546
  def __init__(self, client: Client) -> None:
3375
3547
  self._client = client
3376
3548
 
3377
- def list(self, *, id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
3549
+ def list(self, *, id: Optional[str] = None, url: Optional[str] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
3378
3550
  """Kuaishou video comments. Get a page of top-level comments on a Kuaishou video: text, commenter, likes, time posted, IP location.
3379
3551
 
3380
3552
  GET /v1/kuaishou/videos/comments/list; returns a page of `comment`.
3381
3553
  Price: $0.002 per call, also when the result is empty.
3382
3554
  Paging: about 40 items a page, 40 at most; next page by `cursor`, valid 3600 s.
3555
+ Give exactly one of id, url.
3383
3556
  A video that does not exist cannot be told from a video without comments: both return an empty result, not a 404, and are charged as an empty result is.
3384
3557
 
3385
- id: Video ID: the part of the video's web link that starts with 3x. Required.
3558
+ id: Video ID: the part of the video's web link that starts with 3x. With only a link or a share text, give it as url.
3559
+ url: Link to the video, pasted as it is: the https://www.kuaishou.com/short-video/… web link, the v.kuaishou.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
3386
3560
  cursor: Cursor returned by the previous page.
3387
3561
  view: How much of each item to return. Default: standard.
3388
3562
  fields: Return only these fields.
3389
3563
  """
3390
- return self._client.call("kuaishou.videos.comments.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
3564
+ return self._client.call("kuaishou.videos.comments.list", {"id": id, "url": url, "cursor": cursor, "view": view, "fields": fields}, options=options)
3391
3565
 
3392
3566
 
3393
3567
  class _KuaishouVideos:
@@ -3403,8 +3577,8 @@ class _KuaishouVideos:
3403
3577
  Paging: none: one object a call.
3404
3578
  Give exactly one of id, url.
3405
3579
 
3406
- id: Video ID: the part of the video's web link that starts with 3x.
3407
- url: Long web link to the video.
3580
+ id: Video ID: the part of the video's web link that starts with 3x. With only a link or a share text, give it as url.
3581
+ url: Link to the video, pasted as it is: the https://www.kuaishou.com/short-video/… web link, the v.kuaishou.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
3408
3582
  view: How much of each item to return. Default: standard.
3409
3583
  fields: Return only these fields.
3410
3584
  """
@@ -4817,7 +4991,7 @@ class _TiktokVideosComments:
4817
4991
  A video that does not exist cannot be told from a video without comments: both return an empty result, not a 404, and are charged as an empty result is.
4818
4992
 
4819
4993
  id: Video ID, a string of digits.
4820
- url: Web link to the video.
4994
+ url: Link to the video, pasted as it is: the https://www.tiktok.com/@handle/video/… web link, the www.tiktok.com/t/… or vm.tiktok.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
4821
4995
  cursor: Cursor returned by the previous page.
4822
4996
  view: How much of each item to return. Default: standard.
4823
4997
  fields: Return only these fields.
@@ -4838,7 +5012,7 @@ class _TiktokVideosTranscript:
4838
5012
  Give exactly one of id, url.
4839
5013
 
4840
5014
  id: Video ID, a string of digits.
4841
- url: Web link to the video.
5015
+ url: Link to the video, pasted as it is: the https://www.tiktok.com/@handle/video/… web link, the www.tiktok.com/t/… or vm.tiktok.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
4842
5016
  view: How much of each item to return. Default: standard.
4843
5017
  fields: Return only these fields.
4844
5018
  """
@@ -4860,7 +5034,7 @@ class _TiktokVideos:
4860
5034
  Give exactly one of id, url.
4861
5035
 
4862
5036
  id: Video ID, a string of digits.
4863
- url: Web link to the video.
5037
+ url: Link to the video, pasted as it is: the https://www.tiktok.com/@handle/video/… web link, the www.tiktok.com/t/… or vm.tiktok.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to.
4864
5038
  view: How much of each item to return. Default: standard.
4865
5039
  fields: Return only these fields.
4866
5040
  """
@@ -5007,37 +5181,41 @@ class _WeiboPostsComments:
5007
5181
  def __init__(self, client: Client) -> None:
5008
5182
  self._client = client
5009
5183
 
5010
- def list(self, *, id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5184
+ def list(self, *, id: Optional[str] = None, url: Optional[str] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5011
5185
  """Weibo post comments. Get a page of comments on a Weibo post by post ID: text, commenter, likes, reply count, time posted, IP location.
5012
5186
 
5013
5187
  GET /v1/weibo/posts/comments/list; returns a page of `comment`.
5014
5188
  Price: $0.002 per call, also when the result is empty.
5015
5189
  Paging: about 20 items a page, 20 at most; next page by `cursor`, valid 3600 s.
5190
+ Give exactly one of id, url.
5016
5191
 
5017
- id: Post ID, a string of digits. Required.
5192
+ id: Post ID, a string of digits. With only a link or a share text, give it as url.
5193
+ url: Link to the post, pasted as it is: the site's https://weibo.com/<user>/… (digits or letters after it), the phone site's https://m.weibo.cn/detail/… or /status/…, or a whole share text with one of these in it.
5018
5194
  cursor: Cursor returned by the previous page.
5019
5195
  view: How much of each item to return. Default: standard.
5020
5196
  fields: Return only these fields.
5021
5197
  """
5022
- return self._client.call("weibo.posts.comments.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
5198
+ return self._client.call("weibo.posts.comments.list", {"id": id, "url": url, "cursor": cursor, "view": view, "fields": fields}, options=options)
5023
5199
 
5024
5200
 
5025
5201
  class _WeiboPostsLikers:
5026
5202
  def __init__(self, client: Client) -> None:
5027
5203
  self._client = client
5028
5204
 
5029
- def list(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5205
+ def list(self, *, id: Optional[str] = None, url: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5030
5206
  """Weibo post likers. Get the accounts that most recently liked a Weibo post by post ID, about 50 at a time: name, bio, avatar, verification, follower and following counts, number of posts.
5031
5207
 
5032
5208
  GET /v1/weibo/posts/likers/list; returns a page of `account`.
5033
5209
  Price: $0.002 per call, also when the result is empty.
5034
5210
  Paging: about 50 items a page, 100 at most; one page only.
5211
+ Give exactly one of id, url.
5035
5212
 
5036
- id: Post ID, a string of digits. Required.
5213
+ id: Post ID, a string of digits. With only a link or a share text, give it as url.
5214
+ url: Link to the post, pasted as it is: the site's https://weibo.com/<user>/… (digits or letters after it), the phone site's https://m.weibo.cn/detail/… or /status/…, or a whole share text with one of these in it.
5037
5215
  view: How much of each item to return. Default: standard.
5038
5216
  fields: Return only these fields.
5039
5217
  """
5040
- return self._client.call("weibo.posts.likers.list", {"id": id, "view": view, "fields": fields}, options=options)
5218
+ return self._client.call("weibo.posts.likers.list", {"id": id, "url": url, "view": view, "fields": fields}, options=options)
5041
5219
 
5042
5220
 
5043
5221
  class _WeiboPosts:
@@ -5046,18 +5224,20 @@ class _WeiboPosts:
5046
5224
  self.comments = _WeiboPostsComments(client)
5047
5225
  self.likers = _WeiboPostsLikers(client)
5048
5226
 
5049
- def get(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5227
+ def get(self, *, id: Optional[str] = None, url: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5050
5228
  """Weibo post detail. Get one Weibo post by ID: the whole text (of a long post too), author, likes, comments, reposts, reads, pictures, topics.
5051
5229
 
5052
5230
  GET /v1/weibo/posts/get; returns one `post`.
5053
5231
  Price: $0.002 per call, nothing when it finds nothing.
5054
5232
  Paging: none: one object a call.
5233
+ Give exactly one of id, url.
5055
5234
 
5056
- id: Post ID, a string of digits (the id the post lists return). Required.
5235
+ id: Post ID, a string of digits. With only a link or a share text, give it as url.
5236
+ url: Link to the post, pasted as it is: the site's https://weibo.com/<user>/… (digits or letters after it), the phone site's https://m.weibo.cn/detail/… or /status/…, or a whole share text with one of these in it.
5057
5237
  view: How much of each item to return. Default: standard.
5058
5238
  fields: Return only these fields.
5059
5239
  """
5060
- return self._client.call("weibo.posts.get", {"id": id, "view": view, "fields": fields}, options=options)
5240
+ return self._client.call("weibo.posts.get", {"id": id, "url": url, "view": view, "fields": fields}, options=options)
5061
5241
 
5062
5242
  def search(self, *, query: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5063
5243
  """Weibo realtime search. Get a page of Weibo posts for search terms, newest first: text (a long post is cut short here), author and follower count, likes, comments, reposts, pictures, topics.
@@ -5164,6 +5344,30 @@ class _WeiboUsers:
5164
5344
  return self._client.call("weibo.users.search", {"query": query, "cursor": cursor, "view": view, "fields": fields}, options=options)
5165
5345
 
5166
5346
 
5347
+ class _WeiboBackupTrends:
5348
+ def __init__(self, client: Client) -> None:
5349
+ self._client = client
5350
+
5351
+ def list(self, *, board: Optional[Literal["hot_search"]] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5352
+ """Weibo hot search board (backup). The backup of the Weibo hot search board, to call when the original fails upstream: the same parameters and result, at a higher price.
5353
+
5354
+ GET /v1/weibo/backup/trends/list; returns a page of `trend`.
5355
+ Price: $0.03 per call, also when the result is empty.
5356
+ Paging: about 50 items a page, 51 at most; one page only.
5357
+
5358
+ board: Which list: hot searches is the only one. Default: hot_search.
5359
+ view: How much of each item to return. Default: standard.
5360
+ fields: Return only these fields.
5361
+ """
5362
+ return self._client.call("weibo.backup.trends.list", {"board": board, "view": view, "fields": fields}, options=options)
5363
+
5364
+
5365
+ class _WeiboBackup:
5366
+ def __init__(self, client: Client) -> None:
5367
+ self._client = client
5368
+ self.trends = _WeiboBackupTrends(client)
5369
+
5370
+
5167
5371
  class _Weibo:
5168
5372
  def __init__(self, client: Client) -> None:
5169
5373
  self._client = client
@@ -5171,6 +5375,7 @@ class _Weibo:
5171
5375
  self.posts = _WeiboPosts(client)
5172
5376
  self.trends = _WeiboTrends(client)
5173
5377
  self.users = _WeiboUsers(client)
5378
+ self.backup = _WeiboBackup(client)
5174
5379
 
5175
5380
 
5176
5381
  class _XiaohongshuImages:
@@ -5813,7 +6018,7 @@ class _WechatChannelsUsersCollections:
5813
6018
  Price: $0.02 per call, also when the result is empty.
5814
6019
  Paging: about 7 items a page, 100 at most; one page only.
5815
6020
 
5816
- id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one. Required.
6021
+ id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one (search with wechat_channels.videos.search to find a video of it). The sph… ID the app shows is not it. Required.
5817
6022
  view: How much of each item to return. Default: standard.
5818
6023
  fields: Return only these fields.
5819
6024
  """
@@ -5831,7 +6036,7 @@ class _WechatChannelsUsersVideos:
5831
6036
  Price: $0.02 per call, also when the result is empty.
5832
6037
  Paging: about 15 items a page, 30 at most; next page by `cursor`, valid 3600 s.
5833
6038
 
5834
- id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one. Required.
6039
+ id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one (search with wechat_channels.videos.search to find a video of it). The sph… ID the app shows is not it. Required.
5835
6040
  cursor: Cursor returned by the previous page.
5836
6041
  view: How much of each item to return. Default: standard.
5837
6042
  fields: Return only these fields.
@@ -5839,11 +6044,31 @@ class _WechatChannelsUsersVideos:
5839
6044
  return self._client.call("wechat_channels.users.videos.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
5840
6045
 
5841
6046
 
6047
+ class _WechatChannelsUsersLiveReplays:
6048
+ def __init__(self, client: Client) -> None:
6049
+ self._client = client
6050
+
6051
+ def list(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6052
+ """WeChat Channels live replays. Get the replays of a WeChat Channels account's live streams by the account's ID, newest first, the first page only (up to 48 seen on one): title, time, length, cover, likes, comments, forwards, saves.
6053
+
6054
+ GET /v1/wechat_channels/users/live_replays/list; returns a page of `post`.
6055
+ Price: $0.02 per call, also when the result is empty.
6056
+ Paging: about 10 items a page, 50 at most; one page only.
6057
+ An account that does not exist cannot be told from one with no live replays: both return an empty result, not a 404, and are charged as an empty result is.
6058
+
6059
+ id: The Channels account's ID, starting with v2_ and ending in @finder; not knowing it, look the name up with wechat_channels.users.search. The sph… ID the app shows is not it. Required.
6060
+ view: How much of each item to return. Default: standard.
6061
+ fields: Return only these fields.
6062
+ """
6063
+ return self._client.call("wechat_channels.users.live_replays.list", {"id": id, "view": view, "fields": fields}, options=options)
6064
+
6065
+
5842
6066
  class _WechatChannelsUsers:
5843
6067
  def __init__(self, client: Client) -> None:
5844
6068
  self._client = client
5845
6069
  self.collections = _WechatChannelsUsersCollections(client)
5846
6070
  self.videos = _WechatChannelsUsersVideos(client)
6071
+ self.live_replays = _WechatChannelsUsersLiveReplays(client)
5847
6072
 
5848
6073
  def get(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
5849
6074
  """WeChat Channels account profile. Get a WeChat Channels account by its ID: name, signature, avatar, IP location, number of videos.
@@ -5852,12 +6077,25 @@ class _WechatChannelsUsers:
5852
6077
  Price: $0.02 per call, nothing when it finds nothing.
5853
6078
  Paging: none: one object a call.
5854
6079
 
5855
- id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one. Required.
6080
+ id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one (search with wechat_channels.videos.search to find a video of it). The sph… ID the app shows is not it. Required.
5856
6081
  view: How much of each item to return. Default: standard.
5857
6082
  fields: Return only these fields.
5858
6083
  """
5859
6084
  return self._client.call("wechat_channels.users.get", {"id": id, "view": view, "fields": fields}, options=options)
5860
6085
 
6086
+ def search(self, *, query: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6087
+ """WeChat Channels account search. Find WeChat Channels accounts by name: the name has to match exactly, and every account of that name is returned, with its ID, name, signature, avatar, whether it is verified and what the verification says. The ID can be passed to the Channels profile, video list, live replay and other endpoints.
6088
+
6089
+ GET /v1/wechat_channels/users/search; returns a page of `account`.
6090
+ Price: $0.06 per call, nothing when it finds nothing.
6091
+ Paging: about 1 items a page, 20 at most; one page only.
6092
+
6093
+ query: The Channels account's name, exactly. Required.
6094
+ view: How much of each item to return. Default: standard.
6095
+ fields: Return only these fields.
6096
+ """
6097
+ return self._client.call("wechat_channels.users.search", {"query": query, "view": view, "fields": fields}, options=options)
6098
+
5861
6099
 
5862
6100
  class _WechatChannelsVideosComments:
5863
6101
  def __init__(self, client: Client) -> None:
@@ -5890,7 +6128,7 @@ class _WechatChannelsVideos:
5890
6128
  Price: $0.02 per call, nothing when it finds nothing.
5891
6129
  Paging: none: one object a call.
5892
6130
 
5893
- id: The video's ID, a string of digits: the id a video list gives. Required.
6131
+ id: The video's ID, a string of digits: the id a video list or a search gives. Neither the letters after sph/ in a shared link nor an export/… ID is it. Required.
5894
6132
  view: How much of each item to return. Default: standard.
5895
6133
  fields: Return only these fields.
5896
6134
  """
@@ -5912,6 +6150,19 @@ class _WechatChannelsVideos:
5912
6150
  """
5913
6151
  return self._client.call("wechat_channels.videos.search", {"query": query, "sort": sort, "published_within": published_within, "cursor": cursor, "view": view, "fields": fields}, options=options)
5914
6152
 
6153
+ def metrics(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6154
+ """WeChat Channels video stats. Get the current counts of a WeChat Channels video by its ID: likes, comments, shares, saves, with its description and account. Cheaper than the whole video.
6155
+
6156
+ GET /v1/wechat_channels/videos/metrics; returns one `post`.
6157
+ Price: $0.015 per call, nothing when it finds nothing.
6158
+ Paging: none: one object a call.
6159
+
6160
+ id: The video's ID, a string of digits: the id a video list or a video gives. Required.
6161
+ view: How much of each item to return. Default: standard.
6162
+ fields: Return only these fields.
6163
+ """
6164
+ return self._client.call("wechat_channels.videos.metrics", {"id": id, "view": view, "fields": fields}, options=options)
6165
+
5915
6166
 
5916
6167
  class _WechatChannelsCollectionsVideos:
5917
6168
  def __init__(self, client: Client) -> None:
@@ -5938,12 +6189,107 @@ class _WechatChannelsCollections:
5938
6189
  self.videos = _WechatChannelsCollectionsVideos(client)
5939
6190
 
5940
6191
 
6192
+ class _WechatChannelsBackupUsersVideos:
6193
+ def __init__(self, client: Client) -> None:
6194
+ self._client = client
6195
+
6196
+ def list(self, *, id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6197
+ """WeChat Channels account videos (backup). The backup of wechat_channels.users.videos.list: the same parameters and result from another source, priced on its own.
6198
+
6199
+ GET /v1/wechat_channels/backup/users/videos/list; returns a page of `post`.
6200
+ Price: $0.06 per call, also when the result is empty.
6201
+ Paging: about 15 items a page, 30 at most; next page by `cursor`, valid 3600 s.
6202
+
6203
+ id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one (search with wechat_channels.videos.search to find a video of it). The sph… ID the app shows is not it. Required.
6204
+ cursor: Cursor returned by the previous page.
6205
+ view: How much of each item to return. Default: standard.
6206
+ fields: Return only these fields.
6207
+ """
6208
+ return self._client.call("wechat_channels.backup.users.videos.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
6209
+
6210
+
6211
+ class _WechatChannelsBackupUsers:
6212
+ def __init__(self, client: Client) -> None:
6213
+ self._client = client
6214
+ self.videos = _WechatChannelsBackupUsersVideos(client)
6215
+
6216
+ def get(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6217
+ """WeChat Channels account profile (backup). The backup of wechat_channels.users.get: the same parameters and result from another source, priced on its own. No number of videos.
6218
+
6219
+ GET /v1/wechat_channels/backup/users/get; returns one `account`.
6220
+ Price: $0.03 per call, nothing when it finds nothing.
6221
+ Paging: none: one object a call.
6222
+
6223
+ id: The Channels account's ID, starting with v2_ and ending in @finder; a video's author.id is one (search with wechat_channels.videos.search to find a video of it). The sph… ID the app shows is not it. Required.
6224
+ view: How much of each item to return. Default: standard.
6225
+ fields: Return only these fields.
6226
+ """
6227
+ return self._client.call("wechat_channels.backup.users.get", {"id": id, "view": view, "fields": fields}, options=options)
6228
+
6229
+
6230
+ class _WechatChannelsBackupVideos:
6231
+ def __init__(self, client: Client) -> None:
6232
+ self._client = client
6233
+
6234
+ def search(self, *, query: str, sort: Optional[Literal["relevance", "latest", "popular"]] = None, published_within: Optional[Literal["day", "week", "half_year"]] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6235
+ """WeChat Channels video search (backup). The backup of wechat_channels.videos.search: the same parameters and result from another source, priced on its own. No saves.
6236
+
6237
+ GET /v1/wechat_channels/backup/videos/search; returns a page of `post`.
6238
+ Price: $0.1 per call, also when the result is empty.
6239
+ Paging: about 10 items a page, 20 at most; next page by `cursor`, valid 3600 s.
6240
+
6241
+ query: Search terms. Required.
6242
+ sort: By relevance, by time published (newest first) or by how hot. Default: relevance.
6243
+ published_within: Only those published in the last day, week or half year.
6244
+ cursor: Cursor returned by the previous page.
6245
+ view: How much of each item to return. Default: standard.
6246
+ fields: Return only these fields.
6247
+ """
6248
+ return self._client.call("wechat_channels.backup.videos.search", {"query": query, "sort": sort, "published_within": published_within, "cursor": cursor, "view": view, "fields": fields}, options=options)
6249
+
6250
+
6251
+ class _WechatChannelsBackup:
6252
+ def __init__(self, client: Client) -> None:
6253
+ self._client = client
6254
+ self.users = _WechatChannelsBackupUsers(client)
6255
+ self.videos = _WechatChannelsBackupVideos(client)
6256
+
6257
+
6258
+ class _WechatChannelsCommentsReplies:
6259
+ def __init__(self, client: Client) -> None:
6260
+ self._client = client
6261
+
6262
+ def list(self, *, id: str, post_id: str, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6263
+ """WeChat Channels comment replies. Get a page of the replies under a comment on a WeChat Channels video, by the comment's and the video's IDs: text, replier, likes, time posted, IP location, which reply each answers. About 10 a page, with further pages.
6264
+
6265
+ GET /v1/wechat_channels/comments/replies/list; returns a page of `comment`.
6266
+ Price: $0.015 per call, also when the result is empty.
6267
+ Paging: about 10 items a page, 20 at most; next page by `cursor`, valid 3600 s.
6268
+ A comment that does not exist cannot be told from one with no replies: both return an empty result, not a 404, and are charged as an empty result is.
6269
+
6270
+ id: The comment's ID, a string of digits: the id a Channels video's comments give. Required.
6271
+ post_id: ID of the video the comment is on, a string of digits. Required.
6272
+ cursor: Cursor returned by the previous page.
6273
+ view: How much of each item to return. Default: standard.
6274
+ fields: Return only these fields.
6275
+ """
6276
+ return self._client.call("wechat_channels.comments.replies.list", {"id": id, "post_id": post_id, "cursor": cursor, "view": view, "fields": fields}, options=options)
6277
+
6278
+
6279
+ class _WechatChannelsComments:
6280
+ def __init__(self, client: Client) -> None:
6281
+ self._client = client
6282
+ self.replies = _WechatChannelsCommentsReplies(client)
6283
+
6284
+
5941
6285
  class _WechatChannels:
5942
6286
  def __init__(self, client: Client) -> None:
5943
6287
  self._client = client
5944
6288
  self.users = _WechatChannelsUsers(client)
5945
6289
  self.videos = _WechatChannelsVideos(client)
5946
6290
  self.collections = _WechatChannelsCollections(client)
6291
+ self.backup = _WechatChannelsBackup(client)
6292
+ self.comments = _WechatChannelsComments(client)
5947
6293
 
5948
6294
 
5949
6295
  class _WechatPosts:
@@ -5967,10 +6313,103 @@ class _WechatPosts:
5967
6313
  return self._client.call("wechat.posts.search", {"query": query, "sort": sort, "published_within": published_within, "cursor": cursor, "view": view, "fields": fields}, options=options)
5968
6314
 
5969
6315
 
6316
+ class _WechatBackupPosts:
6317
+ def __init__(self, client: Client) -> None:
6318
+ self._client = client
6319
+
6320
+ def search(self, *, query: str, sort: Optional[Literal["relevance", "latest", "popular"]] = None, published_within: Optional[Literal["day", "week", "half_year"]] = None, cursor: Optional[str] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6321
+ """WeChat Search articles and videos (backup). The backup of wechat.posts.search: the same parameters and result from another source, priced on its own. Videos come without saves.
6322
+
6323
+ GET /v1/wechat/backup/posts/search; returns a page of `post`.
6324
+ Price: $0.1 per call, also when the result is empty.
6325
+ Paging: about 20 items a page, 30 at most; next page by `cursor`, valid 3600 s.
6326
+
6327
+ query: Search terms. Required.
6328
+ sort: By relevance, by time published (newest first) or by how hot. Default: relevance.
6329
+ published_within: Only those published in the last day, week or half year.
6330
+ cursor: Cursor returned by the previous page.
6331
+ view: How much of each item to return. Default: standard.
6332
+ fields: Return only these fields.
6333
+ """
6334
+ return self._client.call("wechat.backup.posts.search", {"query": query, "sort": sort, "published_within": published_within, "cursor": cursor, "view": view, "fields": fields}, options=options)
6335
+
6336
+
6337
+ class _WechatBackup:
6338
+ def __init__(self, client: Client) -> None:
6339
+ self._client = client
6340
+ self.posts = _WechatBackupPosts(client)
6341
+
6342
+
6343
+ class _WechatIndexKeywords:
6344
+ def __init__(self, client: Client) -> None:
6345
+ self._client = client
6346
+
6347
+ def history(self, *, keyword: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6348
+ """WeChat Index. Get a keyword's WeChat Index over the last 30 days, one figure a day. The WeChat Index is WeChat's score of attention across its search, articles, Moments and more, not a count of searches, and is not comparable with Douyin's or Xiaohongshu's; days are calendar days in China time (UTC+8).
6349
+
6350
+ GET /v1/wechat/index/keywords/history; returns a page of `keyword_history` (preview: may change).
6351
+ Price: $0.1 per call, also when the result is empty.
6352
+ Paging: about 1 items a page, 1 at most; one page only.
6353
+ A keyword the WeChat Index does not cover returns an empty result, never a not-found error.
6354
+
6355
+ keyword: One keyword. Required.
6356
+ view: How much of each item to return. Default: standard.
6357
+ fields: Return only these fields.
6358
+ """
6359
+ return self._client.call("wechat.index.keywords.history", {"keyword": keyword, "view": view, "fields": fields}, options=options)
6360
+
6361
+
6362
+ class _WechatIndex:
6363
+ def __init__(self, client: Client) -> None:
6364
+ self._client = client
6365
+ self.keywords = _WechatIndexKeywords(client)
6366
+
6367
+
6368
+ class _WechatKeywords:
6369
+ def __init__(self, client: Client) -> None:
6370
+ self._client = client
6371
+
6372
+ def related(self, *, keyword: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6373
+ """WeChat Search suggestions. Get the suggestions WeChat Search lists in its search box for a keyword, in the order it lists them, about 10 at a time. The words and their places only, with no index.
6374
+
6375
+ GET /v1/wechat/keywords/related; returns a page of `keyword_related` (preview: may change).
6376
+ Price: $0.1 per call, also when the result is empty.
6377
+ Paging: about 9 items a page, 20 at most; one page only.
6378
+ A keyword WeChat Search has no suggestions for returns an empty result, never a not-found error.
6379
+
6380
+ keyword: One keyword. Required.
6381
+ view: How much of each item to return. Default: standard.
6382
+ fields: Return only these fields.
6383
+ """
6384
+ return self._client.call("wechat.keywords.related", {"keyword": keyword, "view": view, "fields": fields}, options=options)
6385
+
6386
+
6387
+ class _WechatMiniprograms:
6388
+ def __init__(self, client: Client) -> None:
6389
+ self._client = client
6390
+
6391
+ def search(self, *, query: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6392
+ """WeChat mini program search. Find WeChat mini programs for search terms through WeChat Search, the first page (about 25): name, description, icon, original ID and AppID, the owner's name and whether it is verified, how many used it lately as the platform shows it, and whether it is a mini game.
6393
+
6394
+ GET /v1/wechat/miniprograms/search; returns a page of `miniprogram` (preview: may change).
6395
+ Price: $0.1 per call, also when the result is empty.
6396
+ Paging: about 25 items a page, 40 at most; one page only.
6397
+
6398
+ query: Search terms. Required.
6399
+ view: How much of each item to return. Default: standard.
6400
+ fields: Return only these fields.
6401
+ """
6402
+ return self._client.call("wechat.miniprograms.search", {"query": query, "view": view, "fields": fields}, options=options)
6403
+
6404
+
5970
6405
  class _Wechat:
5971
6406
  def __init__(self, client: Client) -> None:
5972
6407
  self._client = client
5973
6408
  self.posts = _WechatPosts(client)
6409
+ self.backup = _WechatBackup(client)
6410
+ self.index = _WechatIndex(client)
6411
+ self.keywords = _WechatKeywords(client)
6412
+ self.miniprograms = _WechatMiniprograms(client)
5974
6413
 
5975
6414
 
5976
6415
  class _WechatMpAccountsArticles:
@@ -5984,7 +6423,7 @@ class _WechatMpAccountsArticles:
5984
6423
  Price: $0.02 per call, also when the result is empty.
5985
6424
  Paging: about 10 items a page, 20 at most; next page by `cursor`, valid 3600 s.
5986
6425
 
5987
- id: The account's original ID, starting with gh_. Required.
6426
+ id: The account's original ID, starting with gh_, not the account's name; knowing only the name, search its articles with wechat.posts.search and take author.id. Required.
5988
6427
  cursor: Cursor returned by the previous page.
5989
6428
  view: How much of each item to return. Default: standard.
5990
6429
  fields: Return only these fields.
@@ -5992,10 +6431,29 @@ class _WechatMpAccountsArticles:
5992
6431
  return self._client.call("wechat_mp.accounts.articles.list", {"id": id, "cursor": cursor, "view": view, "fields": fields}, options=options)
5993
6432
 
5994
6433
 
6434
+ class _WechatMpAccountsOwner:
6435
+ def __init__(self, client: Client) -> None:
6436
+ self._client = client
6437
+
6438
+ def get(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6439
+ """WeChat Official Account owner. Get who a WeChat Official Account is registered to, by its original ID: the owner's name, type, registration number, country, verification status, kind and date, and the account's registration date and authorised third-party services.
6440
+
6441
+ GET /v1/wechat_mp/accounts/owner/get; returns one `account_owner` (preview: may change).
6442
+ Price: $0.1 per call, nothing when it finds nothing.
6443
+ Paging: none: one object a call.
6444
+
6445
+ id: The account's original ID, starting with gh_; not knowing it, search the name with wechat_mp.accounts.search and take id. Required.
6446
+ view: How much of each item to return. Default: standard.
6447
+ fields: Return only these fields.
6448
+ """
6449
+ return self._client.call("wechat_mp.accounts.owner.get", {"id": id, "view": view, "fields": fields}, options=options)
6450
+
6451
+
5995
6452
  class _WechatMpAccounts:
5996
6453
  def __init__(self, client: Client) -> None:
5997
6454
  self._client = client
5998
6455
  self.articles = _WechatMpAccountsArticles(client)
6456
+ self.owner = _WechatMpAccountsOwner(client)
5999
6457
 
6000
6458
  def get(self, *, id: str, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6001
6459
  """WeChat Official Account profile. Get a WeChat Official Account by its original ID: name, IP location, number of original articles, the linked Channels account.
@@ -6004,12 +6462,26 @@ class _WechatMpAccounts:
6004
6462
  Price: $0.02 per call, nothing when it finds nothing.
6005
6463
  Paging: none: one object a call.
6006
6464
 
6007
- id: The account's original ID, starting with gh_; an article's author.id is one. Required.
6465
+ id: The account's original ID, starting with gh_, not the account's name; knowing only the name, search its articles with wechat.posts.search and take author.id; an article's author.id is one. Required.
6008
6466
  view: How much of each item to return. Default: standard.
6009
6467
  fields: Return only these fields.
6010
6468
  """
6011
6469
  return self._client.call("wechat_mp.accounts.get", {"id": id, "view": view, "fields": fields}, options=options)
6012
6470
 
6471
+ def search(self, *, query: str, limit: Optional[int] = None, view: Optional[Literal["compact", "standard", "full"]] = None, fields: Optional[Sequence[str]] = None, options: Optional[CallOptions] = None) -> Envelope:
6472
+ """WeChat Official Account name search. Find WeChat Official Accounts by name or keyword, closest first: original ID, WeChat ID, name, avatar, owner, and a third-party database's estimates of active followers, lead-article reads and likes, and articles a week (not official, possibly months old). Charged per account; limit sets how many (5 by default, at most 15).
6473
+
6474
+ GET /v1/wechat_mp/accounts/search; returns a page of `account`.
6475
+ Price: $0.05635 per item returned, at least $0.06 and at most $0.84525 per call, nothing when it finds nothing.
6476
+ Paging: about 5 items a page, 15 at most (set with `limit`); one page only.
6477
+
6478
+ query: The account's name, or a keyword. Required.
6479
+ limit: Items per page.
6480
+ view: How much of each item to return. Default: standard.
6481
+ fields: Return only these fields.
6482
+ """
6483
+ return self._client.call("wechat_mp.accounts.search", {"query": query, "limit": limit, "view": view, "fields": fields}, options=options)
6484
+
6013
6485
 
6014
6486
  class _WechatMpArticlesComments:
6015
6487
  def __init__(self, client: Client) -> None:
@@ -6020,9 +6492,9 @@ class _WechatMpArticlesComments:
6020
6492
 
6021
6493
  GET /v1/wechat_mp/articles/comments/list; returns a page of `comment`.
6022
6494
  Price: $0.02 per call, also when the result is empty.
6023
- Paging: about 20 items a page, 20 at most; next page by `cursor`, valid 3600 s.
6495
+ Paging: about 20 items a page, 100 at most; next page by `cursor`, valid 3600 s.
6024
6496
 
6025
- url: Link to the article: the long link with __biz, mid, idx and sn, or the short /s/ link. Required.
6497
+ url: Link to the article, pasted as it is: the long link with __biz, mid, idx and sn, the short /s/ link, or a share text with one of them in it. Required.
6026
6498
  cursor: Cursor returned by the previous page.
6027
6499
  view: How much of each item to return. Default: standard.
6028
6500
  fields: Return only these fields.
@@ -6042,7 +6514,7 @@ class _WechatMpArticles:
6042
6514
  Price: $0.02 per call, nothing when it finds nothing.
6043
6515
  Paging: none: one object a call.
6044
6516
 
6045
- url: Link to the article: the long link with __biz, mid, idx and sn, or the short /s/ link. Required.
6517
+ url: Link to the article, pasted as it is: the long link with __biz, mid, idx and sn, the short /s/ link, or a share text with one of them in it. Required.
6046
6518
  view: How much of each item to return. Default: standard.
6047
6519
  fields: Return only these fields.
6048
6520
  """
@@ -6072,6 +6544,7 @@ class _WechatMpCommentsReplies:
6072
6544
  GET /v1/wechat_mp/comments/replies/list; returns a page of `comment`.
6073
6545
  Price: $0.02 per call, also when the result is empty.
6074
6546
  Paging: about 3 items a page, 20 at most; one page only.
6547
+ A comment that does not exist is usually a 404; it may also read like a comment without replies, an empty result rather than a 404, charged as an empty result is.
6075
6548
 
6076
6549
  id: The comment's ID, a string of digits: the id a comment list gives. Required.
6077
6550
  post_id: Link to the article the comment is on (a WeChat Official Account article is named only by its link): the long link with __biz, mid, idx and sn, or the short /s/ link. Required.
@@ -6108,7 +6581,7 @@ class _RedditPostsComments:
6108
6581
  Give exactly one of id, url.
6109
6582
 
6110
6583
  id: Post ID, with its t3_ prefix.
6111
- url: Web link to the post.
6584
+ url: Link to the post, pasted as it is: the https://www.reddit.com/r/<community>/comments/… web link (phone or old site too), a redd.it short link, or the /r/<community>/s/… link the app shares. A share link is opened once to see which post it leads to.
6112
6585
  sort: Reddit's default order (best), newest first, or top score first. Default: best.
6113
6586
  cursor: Cursor returned by the previous page.
6114
6587
  view: How much of each item to return. Default: standard.
@@ -6130,7 +6603,7 @@ class _RedditPostsTranscript:
6130
6603
  Give exactly one of id, url.
6131
6604
 
6132
6605
  id: Post ID, with its t3_ prefix.
6133
- url: Web link to the post.
6606
+ url: Link to the post, pasted as it is: the https://www.reddit.com/r/<community>/comments/… web link (phone or old site too), a redd.it short link, or the /r/<community>/s/… link the app shares. A share link is opened once to see which post it leads to.
6134
6607
  view: How much of each item to return. Default: standard.
6135
6608
  fields: Return only these fields.
6136
6609
  """
@@ -6152,7 +6625,7 @@ class _RedditPosts:
6152
6625
  Give exactly one of id, url.
6153
6626
 
6154
6627
  id: Post ID, with its t3_ prefix.
6155
- url: Web link to the post.
6628
+ url: Link to the post, pasted as it is: the https://www.reddit.com/r/<community>/comments/… web link (phone or old site too), a redd.it short link, or the /r/<community>/s/… link the app shares. A share link is opened once to see which post it leads to.
6156
6629
  view: How much of each item to return. Default: standard.
6157
6630
  fields: Return only these fields.
6158
6631
  """
@@ -84,8 +84,17 @@ class DataXAPIError(Exception):
84
84
  self.status = status
85
85
  self.request_id: str = body["request_id"]
86
86
  # False: nothing was charged. None: not known (settlement_unknown);
87
- # look the call up by `request_id` before assuming either.
87
+ # look the call up by `request_id` before assuming either. True:
88
+ # `amount` was charged (below).
88
89
  self.charged: Optional[bool] = body.get("charged")
90
+ # What was charged, where `charged` is True: the endpoint's price, for
91
+ # an object not there or input refused that its source billed.
92
+ self.amount: Optional[str] = body.get("amount")
93
+ # The endpoint's backup version, when its source failed and the backup
94
+ # can be called: capability, path, per, price, note, note_zh. The same
95
+ # parameters and fields at its own price; call it with a new
96
+ # idempotency key.
97
+ self.alternative: Optional[Dict[str, Any]] = body.get("alternative")
89
98
  self.retry: str = body["retry"]
90
99
  self.retry_after_seconds: Optional[int] = body.get("retry_after_seconds")
91
100
  self.param: Optional[str] = body.get("param")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataxapi
3
- Version: 1.0.0
3
+ Version: 1.1.1
4
4
  Summary: DataXAPI for Python: market data from 21 platforms (Douyin, Xiaohongshu/RedNote, TikTok, WeChat, X, YouTube...) over one interface, paid per call.
5
5
  Author-email: "DataXAPI (Aurevant LLC)" <support@dataxapi.com>
6
6
  License-Expression: MIT
@@ -22,10 +22,10 @@ Dynamic: license-file
22
22
 
23
23
  # DataXAPI for Python
24
24
 
25
- [DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 204 endpoints across 20
25
+ [DataXAPI](https://dataxapi.com) is market data infrastructure for developers and AI agents: 224 endpoints across 20
26
26
  platforms (Douyin, Xiaohongshu (RedNote), TikTok, WeChat, X, YouTube and more) behind one key and one response
27
27
  shape, paid per call from $0.0003, with failed calls free and $0.10 of free credit on sign-up. Social media is the
28
- largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.0.0
28
+ largest category; creator rate cards, ad libraries and shop products are the others. Figures as of version 1.1.0
29
29
  (October 2026); the live catalog is at [dataxapi.com/apis](https://dataxapi.com/apis/).
30
30
 
31
31
  `dataxapi` is the Python client: every endpoint is a method, generated from the catalog, with its price in its
@@ -1,6 +1,7 @@
1
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
+ setup.cfg
4
5
  src/dataxapi/__init__.py
5
6
  src/dataxapi/_generated.py
6
7
  src/dataxapi/_runtime.py
File without changes
File without changes
File without changes