@getanyapi/sdk 0.159.3 → 0.161.0

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.
package/dist/index.d.cts CHANGED
@@ -3086,7 +3086,7 @@ declare class AmazonNamespace {
3086
3086
  *
3087
3087
  * Pull customer reviews for any Amazon product by ASIN or URL: rating, title, text, date, and verified-purchase badge.
3088
3088
  *
3089
- * Price: $0.016 per request.
3089
+ * Price: $0.0013 per request.
3090
3090
  *
3091
3091
  * @example
3092
3092
  * const res = await client.amazon.reviews({ product: "B07PXGQC1Q", limit: 3 });
@@ -3097,7 +3097,7 @@ declare class AmazonNamespace {
3097
3097
  *
3098
3098
  * Search Amazon from any search or category URL and get up to 20 matching products (title, price, rating, and thumbnail) in one normalized response.
3099
3099
  *
3100
- * Price: $0.0013 per request.
3100
+ * Price: $0.00075 per request.
3101
3101
  *
3102
3102
  * @example
3103
3103
  * const res = await client.amazon.search({ url: "https://www.amazon.com/s?k=laptop", limit: 3 });
@@ -12638,6 +12638,10 @@ interface DouyinProfileInput {
12638
12638
  * Range: minimum 1.
12639
12639
  */
12640
12640
  preferLatencyUnderMs?: number;
12641
+ /**
12642
+ * Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `shortId`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a profile that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
12643
+ */
12644
+ requireFields?: "shortId"[];
12641
12645
  /**
12642
12646
  * Douyin sec_user_id for the public account.
12643
12647
  */
@@ -13268,7 +13272,7 @@ declare class DouyinNamespace {
13268
13272
  *
13269
13273
  * Look up a public Douyin profile by sec_user_id and return normalized profile statistics.
13270
13274
  *
13271
- * Price: $0.0012 per request.
13275
+ * Price: $0.001 per request.
13272
13276
  *
13273
13277
  * @example
13274
13278
  * const res = await client.douyin.profile({ secUserId: "MS4wLjABAAAANXSltcLCzDGmdNFI2Q_QixVTr67NiYzjKOIP5s03CAE" });
@@ -13301,7 +13305,7 @@ declare class DouyinNamespace {
13301
13305
  *
13302
13306
  * Fetch a public Douyin video by share URL with normalized author and engagement data.
13303
13307
  *
13304
- * Price: $0.0012 per request.
13308
+ * Price: $0.001 per request.
13305
13309
  *
13306
13310
  * @example
13307
13311
  * const res = await client.douyin.video({ url: "https://www.douyin.com/video/6894784055775071503" });
@@ -19002,7 +19006,10 @@ interface FacebookProfileData {
19002
19006
  * UTC epoch timestamp in seconds (Unix time) the page was created. Multiply by 1000 for a JS Date in milliseconds.
19003
19007
  */
19004
19008
  createdUtc?: number;
19005
- followers: number;
19009
+ /**
19010
+ * Follower count, or null when Facebook does not show it (age-restricted Pages).
19011
+ */
19012
+ followers: number | null;
19006
19013
  /**
19007
19014
  * Numeric Facebook id of the page or profile.
19008
19015
  */
@@ -24024,7 +24031,7 @@ declare class GoogleNamespace {
24024
24031
  *
24025
24032
  * Ask Google Search a prompt and receive the AI Overview it generated for that scrape, with every source Google listed. Google regenerates the overview per search, so the same prompt can return different wording and a different source list.
24026
24033
  *
24027
- * Price: $0.0048 per request.
24034
+ * Price: $0.0018 per request.
24028
24035
  *
24029
24036
  * @example
24030
24037
  * const res = await client.google.aiOverview({ prompt: "How does photosynthesis work?" });
@@ -32032,7 +32039,7 @@ declare class InstagramNamespace {
32032
32039
  *
32033
32040
  * List an Instagram account's story highlight reels by handle.
32034
32041
  *
32035
- * Price: $0.0012 per request.
32042
+ * Price: $0.001 per request.
32036
32043
  *
32037
32044
  * @example
32038
32045
  * const res = await client.instagram.userHighlights({ handle: "nasa" });
@@ -75967,6 +75974,10 @@ interface YoutubeChannelPlaylistsInput {
75967
75974
  * Range: minimum 1.
75968
75975
  */
75969
75976
  preferLatencyUnderMs?: number;
75977
+ /**
75978
+ * Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `videoId`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a playlist that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
75979
+ */
75980
+ requireFields?: ("videoId" | "videoUrl")[];
75970
75981
  /**
75971
75982
  * Optional and experimental: its behavior may change. We recommend leaving it out and letting automatic routing choose: routing serves the cheapest source, uses cheaper sources as they are added, and fails over to another source when one fails, so your requests are not tied to the uptime of one source. To control cost, set a price ceiling instead: on requests paid from your AnyAPI wallet, the `max_cost_usd` REST query parameter or MCP `run_api` argument skips any source that would charge more, and refuses the request with no charge if none is left. Avoid pinning a single source, especially with `allowFallbacks` false: when that source has an outage your requests fail while others are served. If you send it, list source ids from this endpoint's `lanes[].source.id` in /catalog or /apis; they are tried first in the order given, then the others, unless `allowFallbacks` is false. You are charged for the source that serves, plus any source tried before it that charged for its attempt, and never more than the most this endpoint can cost with the sources that may serve. An id that does not serve this endpoint is rejected as invalid input with no charge; a listed source that is not serving right now is refused with no charge, so omit `source` to be served by another. On a paginated walk, later pages must include the source that served page one, or omit `source`.
75972
75983
  */
@@ -77430,7 +77441,7 @@ declare class YoutubeNamespace {
77430
77441
  *
77431
77442
  * List a YouTube channel's Shorts by handle or channel ID with cursor pagination, views, and publish timestamps.
77432
77443
  *
77433
- * Price: $0.0012 per request.
77444
+ * Price: $0.001 per request.
77434
77445
  *
77435
77446
  * @example
77436
77447
  * const res = await client.youtube.channelShorts({ handle: "@zachking", sort: "latest" });
package/dist/index.d.ts CHANGED
@@ -3086,7 +3086,7 @@ declare class AmazonNamespace {
3086
3086
  *
3087
3087
  * Pull customer reviews for any Amazon product by ASIN or URL: rating, title, text, date, and verified-purchase badge.
3088
3088
  *
3089
- * Price: $0.016 per request.
3089
+ * Price: $0.0013 per request.
3090
3090
  *
3091
3091
  * @example
3092
3092
  * const res = await client.amazon.reviews({ product: "B07PXGQC1Q", limit: 3 });
@@ -3097,7 +3097,7 @@ declare class AmazonNamespace {
3097
3097
  *
3098
3098
  * Search Amazon from any search or category URL and get up to 20 matching products (title, price, rating, and thumbnail) in one normalized response.
3099
3099
  *
3100
- * Price: $0.0013 per request.
3100
+ * Price: $0.00075 per request.
3101
3101
  *
3102
3102
  * @example
3103
3103
  * const res = await client.amazon.search({ url: "https://www.amazon.com/s?k=laptop", limit: 3 });
@@ -12638,6 +12638,10 @@ interface DouyinProfileInput {
12638
12638
  * Range: minimum 1.
12639
12639
  */
12640
12640
  preferLatencyUnderMs?: number;
12641
+ /**
12642
+ * Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `shortId`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a profile that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
12643
+ */
12644
+ requireFields?: "shortId"[];
12641
12645
  /**
12642
12646
  * Douyin sec_user_id for the public account.
12643
12647
  */
@@ -13268,7 +13272,7 @@ declare class DouyinNamespace {
13268
13272
  *
13269
13273
  * Look up a public Douyin profile by sec_user_id and return normalized profile statistics.
13270
13274
  *
13271
- * Price: $0.0012 per request.
13275
+ * Price: $0.001 per request.
13272
13276
  *
13273
13277
  * @example
13274
13278
  * const res = await client.douyin.profile({ secUserId: "MS4wLjABAAAANXSltcLCzDGmdNFI2Q_QixVTr67NiYzjKOIP5s03CAE" });
@@ -13301,7 +13305,7 @@ declare class DouyinNamespace {
13301
13305
  *
13302
13306
  * Fetch a public Douyin video by share URL with normalized author and engagement data.
13303
13307
  *
13304
- * Price: $0.0012 per request.
13308
+ * Price: $0.001 per request.
13305
13309
  *
13306
13310
  * @example
13307
13311
  * const res = await client.douyin.video({ url: "https://www.douyin.com/video/6894784055775071503" });
@@ -19002,7 +19006,10 @@ interface FacebookProfileData {
19002
19006
  * UTC epoch timestamp in seconds (Unix time) the page was created. Multiply by 1000 for a JS Date in milliseconds.
19003
19007
  */
19004
19008
  createdUtc?: number;
19005
- followers: number;
19009
+ /**
19010
+ * Follower count, or null when Facebook does not show it (age-restricted Pages).
19011
+ */
19012
+ followers: number | null;
19006
19013
  /**
19007
19014
  * Numeric Facebook id of the page or profile.
19008
19015
  */
@@ -24024,7 +24031,7 @@ declare class GoogleNamespace {
24024
24031
  *
24025
24032
  * Ask Google Search a prompt and receive the AI Overview it generated for that scrape, with every source Google listed. Google regenerates the overview per search, so the same prompt can return different wording and a different source list.
24026
24033
  *
24027
- * Price: $0.0048 per request.
24034
+ * Price: $0.0018 per request.
24028
24035
  *
24029
24036
  * @example
24030
24037
  * const res = await client.google.aiOverview({ prompt: "How does photosynthesis work?" });
@@ -32032,7 +32039,7 @@ declare class InstagramNamespace {
32032
32039
  *
32033
32040
  * List an Instagram account's story highlight reels by handle.
32034
32041
  *
32035
- * Price: $0.0012 per request.
32042
+ * Price: $0.001 per request.
32036
32043
  *
32037
32044
  * @example
32038
32045
  * const res = await client.instagram.userHighlights({ handle: "nasa" });
@@ -75967,6 +75974,10 @@ interface YoutubeChannelPlaylistsInput {
75967
75974
  * Range: minimum 1.
75968
75975
  */
75969
75976
  preferLatencyUnderMs?: number;
75977
+ /**
75978
+ * Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `videoId`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a playlist that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
75979
+ */
75980
+ requireFields?: ("videoId" | "videoUrl")[];
75970
75981
  /**
75971
75982
  * Optional and experimental: its behavior may change. We recommend leaving it out and letting automatic routing choose: routing serves the cheapest source, uses cheaper sources as they are added, and fails over to another source when one fails, so your requests are not tied to the uptime of one source. To control cost, set a price ceiling instead: on requests paid from your AnyAPI wallet, the `max_cost_usd` REST query parameter or MCP `run_api` argument skips any source that would charge more, and refuses the request with no charge if none is left. Avoid pinning a single source, especially with `allowFallbacks` false: when that source has an outage your requests fail while others are served. If you send it, list source ids from this endpoint's `lanes[].source.id` in /catalog or /apis; they are tried first in the order given, then the others, unless `allowFallbacks` is false. You are charged for the source that serves, plus any source tried before it that charged for its attempt, and never more than the most this endpoint can cost with the sources that may serve. An id that does not serve this endpoint is rejected as invalid input with no charge; a listed source that is not serving right now is refused with no charge, so omit `source` to be served by another. On a paginated walk, later pages must include the source that served page one, or omit `source`.
75972
75983
  */
@@ -77430,7 +77441,7 @@ declare class YoutubeNamespace {
77430
77441
  *
77431
77442
  * List a YouTube channel's Shorts by handle or channel ID with cursor pagination, views, and publish timestamps.
77432
77443
  *
77433
- * Price: $0.0012 per request.
77444
+ * Price: $0.001 per request.
77434
77445
  *
77435
77446
  * @example
77436
77447
  * const res = await client.youtube.channelShorts({ handle: "@zachking", sort: "latest" });
package/dist/index.js CHANGED
@@ -1278,7 +1278,7 @@ var AmazonNamespace = class {
1278
1278
  *
1279
1279
  * Pull customer reviews for any Amazon product by ASIN or URL: rating, title, text, date, and verified-purchase badge.
1280
1280
  *
1281
- * Price: $0.016 per request.
1281
+ * Price: $0.0013 per request.
1282
1282
  *
1283
1283
  * @example
1284
1284
  * const res = await client.amazon.reviews({ product: "B07PXGQC1Q", limit: 3 });
@@ -1291,7 +1291,7 @@ var AmazonNamespace = class {
1291
1291
  *
1292
1292
  * Search Amazon from any search or category URL and get up to 20 matching products (title, price, rating, and thumbnail) in one normalized response.
1293
1293
  *
1294
- * Price: $0.0013 per request.
1294
+ * Price: $0.00075 per request.
1295
1295
  *
1296
1296
  * @example
1297
1297
  * const res = await client.amazon.search({ url: "https://www.amazon.com/s?k=laptop", limit: 3 });
@@ -2084,7 +2084,7 @@ var DouyinNamespace = class {
2084
2084
  *
2085
2085
  * Look up a public Douyin profile by sec_user_id and return normalized profile statistics.
2086
2086
  *
2087
- * Price: $0.0012 per request.
2087
+ * Price: $0.001 per request.
2088
2088
  *
2089
2089
  * @example
2090
2090
  * const res = await client.douyin.profile({ secUserId: "MS4wLjABAAAANXSltcLCzDGmdNFI2Q_QixVTr67NiYzjKOIP5s03CAE" });
@@ -2123,7 +2123,7 @@ var DouyinNamespace = class {
2123
2123
  *
2124
2124
  * Fetch a public Douyin video by share URL with normalized author and engagement data.
2125
2125
  *
2126
- * Price: $0.0012 per request.
2126
+ * Price: $0.001 per request.
2127
2127
  *
2128
2128
  * @example
2129
2129
  * const res = await client.douyin.video({ url: "https://www.douyin.com/video/6894784055775071503" });
@@ -3485,7 +3485,7 @@ var GoogleNamespace = class {
3485
3485
  *
3486
3486
  * Ask Google Search a prompt and receive the AI Overview it generated for that scrape, with every source Google listed. Google regenerates the overview per search, so the same prompt can return different wording and a different source list.
3487
3487
  *
3488
- * Price: $0.0048 per request.
3488
+ * Price: $0.0018 per request.
3489
3489
  *
3490
3490
  * @example
3491
3491
  * const res = await client.google.aiOverview({ prompt: "How does photosynthesis work?" });
@@ -4726,7 +4726,7 @@ var InstagramNamespace = class {
4726
4726
  *
4727
4727
  * List an Instagram account's story highlight reels by handle.
4728
4728
  *
4729
- * Price: $0.0012 per request.
4729
+ * Price: $0.001 per request.
4730
4730
  *
4731
4731
  * @example
4732
4732
  * const res = await client.instagram.userHighlights({ handle: "nasa" });
@@ -9541,7 +9541,7 @@ var YoutubeNamespace = class {
9541
9541
  *
9542
9542
  * List a YouTube channel's Shorts by handle or channel ID with cursor pagination, views, and publish timestamps.
9543
9543
  *
9544
- * Price: $0.0012 per request.
9544
+ * Price: $0.001 per request.
9545
9545
  *
9546
9546
  * @example
9547
9547
  * const res = await client.youtube.channelShorts({ handle: "@zachking", sort: "latest" });