scrapebadger 0.52.0 → 0.53.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.
@@ -2098,6 +2098,15 @@ declare class PermissionDeniedError extends AuthenticationError {
2098
2098
  readonly allowedScopes: string[];
2099
2099
  constructor(message?: string, requiredScope?: string, allowedScopes?: string[]);
2100
2100
  }
2101
+ /**
2102
+ * Raised when the API key is restricted to IP addresses and this request came
2103
+ * from another one (HTTP 403, `error: "ip_not_allowed"`). Not charged.
2104
+ */
2105
+ declare class IPNotAllowedError extends PermissionDeniedError {
2106
+ /** The address ScrapeBadger saw (null when relayed, e.g. via the hosted MCP server) */
2107
+ readonly clientIp: string | null;
2108
+ constructor(message?: string, clientIp?: string | null);
2109
+ }
2101
2110
  /**
2102
2111
  * Raised when rate limit is exceeded.
2103
2112
  */
@@ -3166,4 +3175,4 @@ declare class TwitterClient {
3166
3175
  removeWebhookFromMonitor(webhookId: string, body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
3167
3176
  }
3168
3177
 
3169
- export { type Place as $, AuthenticationError as A, BaseClient as B, ConflictError as C, type UserAbout as D, type UserIds as E, type List as F, GeoClient as G, type Hashtag as H, InsufficientCreditsError as I, type CommunityBanner as J, type CommunityRule as K, ListsClient as L, type Media as M, NotFoundError as N, type Community as O, PermissionDeniedError as P, type QueryType as Q, type ResolvedConfig as R, type ScrapeBadgerConfig as S, TwitterClient as T, UsersClient as U, ValidationError as V, WebSocketStreamError as W, type CommunityMember as X, type Trend as Y, type Location as Z, type PlaceTrends as _, ScrapeBadgerError as a, type Article as a0, type CommunityNote as a1, type Space as a2, type Broadcast as a3, type ApiResponse as a4, type ListResponse as a5, type MonitorStatus as a6, type StreamMonitor as a7, type StreamMonitorList as a8, type CreateMonitorParams as a9, type UpdateMonitorParams as aa, type StreamTweet as ab, type ConnectedEvent as ac, type PingEvent as ad, type TweetEvent as ae, type ErrorEvent as af, type StreamEvent as ag, type StreamEventType as ah, type DeliveryLog as ai, type DeliveryLogList as aj, type BillingLog as ak, type BillingLogList as al, type ConnectOptions as am, type FilterRuleStatus as an, type FilterRuleResponse as ao, type FilterRuleCreate as ap, type FilterRuleUpdate as aq, type FilterRulePricingTier as ar, type FilterRuleListResponse as as, type FilterRuleValidateResponse as at, type FilterRuleDeliveryLog as au, type FilterRuleDeliveryLogListResponse as av, type FilterRulePricingTiersResponse as aw, RateLimitError as b, ServerError as c, TimeoutError as d, AccountRestrictedError as e, type PaginatedResponse as f, type PaginationOptions as g, type IteratorOptions as h, collectAll as i, TweetsClient as j, CommunitiesClient as k, TrendsClient as l, type GeoSearchOptions as m, StreamClient as n, type StreamEmitter as o, SpacesClient as p, type TrendCategory as q, type CommunityTweetType as r, type PollOption as s, type Poll as t, type Url as u, verifyWebhookSignature as v, type UserMention as w, type TweetPlace as x, type Tweet as y, type User as z };
3178
+ export { type PlaceTrends as $, AuthenticationError as A, BaseClient as B, ConflictError as C, type User as D, type UserAbout as E, type UserIds as F, GeoClient as G, type Hashtag as H, InsufficientCreditsError as I, type List as J, type CommunityBanner as K, ListsClient as L, type Media as M, NotFoundError as N, type CommunityRule as O, PermissionDeniedError as P, type QueryType as Q, type ResolvedConfig as R, type ScrapeBadgerConfig as S, TwitterClient as T, UsersClient as U, ValidationError as V, WebSocketStreamError as W, type Community as X, type CommunityMember as Y, type Trend as Z, type Location as _, ScrapeBadgerError as a, type Place as a0, type Article as a1, type CommunityNote as a2, type Space as a3, type Broadcast as a4, type ApiResponse as a5, type ListResponse as a6, type MonitorStatus as a7, type StreamMonitor as a8, type StreamMonitorList as a9, type CreateMonitorParams as aa, type UpdateMonitorParams as ab, type StreamTweet as ac, type ConnectedEvent as ad, type PingEvent as ae, type TweetEvent as af, type ErrorEvent as ag, type StreamEvent as ah, type StreamEventType as ai, type DeliveryLog as aj, type DeliveryLogList as ak, type BillingLog as al, type BillingLogList as am, type ConnectOptions as an, type FilterRuleStatus as ao, type FilterRuleResponse as ap, type FilterRuleCreate as aq, type FilterRuleUpdate as ar, type FilterRulePricingTier as as, type FilterRuleListResponse as at, type FilterRuleValidateResponse as au, type FilterRuleDeliveryLog as av, type FilterRuleDeliveryLogListResponse as aw, type FilterRulePricingTiersResponse as ax, RateLimitError as b, ServerError as c, TimeoutError as d, AccountRestrictedError as e, IPNotAllowedError as f, type PaginatedResponse as g, type PaginationOptions as h, type IteratorOptions as i, collectAll as j, TweetsClient as k, CommunitiesClient as l, TrendsClient as m, type GeoSearchOptions as n, StreamClient as o, type StreamEmitter as p, SpacesClient as q, type TrendCategory as r, type CommunityTweetType as s, type PollOption as t, type Poll as u, verifyWebhookSignature as v, type Url as w, type UserMention as x, type TweetPlace as y, type Tweet as z };
@@ -2098,6 +2098,15 @@ declare class PermissionDeniedError extends AuthenticationError {
2098
2098
  readonly allowedScopes: string[];
2099
2099
  constructor(message?: string, requiredScope?: string, allowedScopes?: string[]);
2100
2100
  }
2101
+ /**
2102
+ * Raised when the API key is restricted to IP addresses and this request came
2103
+ * from another one (HTTP 403, `error: "ip_not_allowed"`). Not charged.
2104
+ */
2105
+ declare class IPNotAllowedError extends PermissionDeniedError {
2106
+ /** The address ScrapeBadger saw (null when relayed, e.g. via the hosted MCP server) */
2107
+ readonly clientIp: string | null;
2108
+ constructor(message?: string, clientIp?: string | null);
2109
+ }
2101
2110
  /**
2102
2111
  * Raised when rate limit is exceeded.
2103
2112
  */
@@ -3166,4 +3175,4 @@ declare class TwitterClient {
3166
3175
  removeWebhookFromMonitor(webhookId: string, body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
3167
3176
  }
3168
3177
 
3169
- export { type Place as $, AuthenticationError as A, BaseClient as B, ConflictError as C, type UserAbout as D, type UserIds as E, type List as F, GeoClient as G, type Hashtag as H, InsufficientCreditsError as I, type CommunityBanner as J, type CommunityRule as K, ListsClient as L, type Media as M, NotFoundError as N, type Community as O, PermissionDeniedError as P, type QueryType as Q, type ResolvedConfig as R, type ScrapeBadgerConfig as S, TwitterClient as T, UsersClient as U, ValidationError as V, WebSocketStreamError as W, type CommunityMember as X, type Trend as Y, type Location as Z, type PlaceTrends as _, ScrapeBadgerError as a, type Article as a0, type CommunityNote as a1, type Space as a2, type Broadcast as a3, type ApiResponse as a4, type ListResponse as a5, type MonitorStatus as a6, type StreamMonitor as a7, type StreamMonitorList as a8, type CreateMonitorParams as a9, type UpdateMonitorParams as aa, type StreamTweet as ab, type ConnectedEvent as ac, type PingEvent as ad, type TweetEvent as ae, type ErrorEvent as af, type StreamEvent as ag, type StreamEventType as ah, type DeliveryLog as ai, type DeliveryLogList as aj, type BillingLog as ak, type BillingLogList as al, type ConnectOptions as am, type FilterRuleStatus as an, type FilterRuleResponse as ao, type FilterRuleCreate as ap, type FilterRuleUpdate as aq, type FilterRulePricingTier as ar, type FilterRuleListResponse as as, type FilterRuleValidateResponse as at, type FilterRuleDeliveryLog as au, type FilterRuleDeliveryLogListResponse as av, type FilterRulePricingTiersResponse as aw, RateLimitError as b, ServerError as c, TimeoutError as d, AccountRestrictedError as e, type PaginatedResponse as f, type PaginationOptions as g, type IteratorOptions as h, collectAll as i, TweetsClient as j, CommunitiesClient as k, TrendsClient as l, type GeoSearchOptions as m, StreamClient as n, type StreamEmitter as o, SpacesClient as p, type TrendCategory as q, type CommunityTweetType as r, type PollOption as s, type Poll as t, type Url as u, verifyWebhookSignature as v, type UserMention as w, type TweetPlace as x, type Tweet as y, type User as z };
3178
+ export { type PlaceTrends as $, AuthenticationError as A, BaseClient as B, ConflictError as C, type User as D, type UserAbout as E, type UserIds as F, GeoClient as G, type Hashtag as H, InsufficientCreditsError as I, type List as J, type CommunityBanner as K, ListsClient as L, type Media as M, NotFoundError as N, type CommunityRule as O, PermissionDeniedError as P, type QueryType as Q, type ResolvedConfig as R, type ScrapeBadgerConfig as S, TwitterClient as T, UsersClient as U, ValidationError as V, WebSocketStreamError as W, type Community as X, type CommunityMember as Y, type Trend as Z, type Location as _, ScrapeBadgerError as a, type Place as a0, type Article as a1, type CommunityNote as a2, type Space as a3, type Broadcast as a4, type ApiResponse as a5, type ListResponse as a6, type MonitorStatus as a7, type StreamMonitor as a8, type StreamMonitorList as a9, type CreateMonitorParams as aa, type UpdateMonitorParams as ab, type StreamTweet as ac, type ConnectedEvent as ad, type PingEvent as ae, type TweetEvent as af, type ErrorEvent as ag, type StreamEvent as ah, type StreamEventType as ai, type DeliveryLog as aj, type DeliveryLogList as ak, type BillingLog as al, type BillingLogList as am, type ConnectOptions as an, type FilterRuleStatus as ao, type FilterRuleResponse as ap, type FilterRuleCreate as aq, type FilterRuleUpdate as ar, type FilterRulePricingTier as as, type FilterRuleListResponse as at, type FilterRuleValidateResponse as au, type FilterRuleDeliveryLog as av, type FilterRuleDeliveryLogListResponse as aw, type FilterRulePricingTiersResponse as ax, RateLimitError as b, ServerError as c, TimeoutError as d, AccountRestrictedError as e, IPNotAllowedError as f, type PaginatedResponse as g, type PaginationOptions as h, type IteratorOptions as i, collectAll as j, TweetsClient as k, CommunitiesClient as l, TrendsClient as m, type GeoSearchOptions as n, StreamClient as o, type StreamEmitter as p, SpacesClient as q, type TrendCategory as r, type CommunityTweetType as s, type PollOption as t, type Poll as u, verifyWebhookSignature as v, type Url as w, type UserMention as x, type TweetPlace as y, type Tweet as z };
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BaseClient, T as TwitterClient, S as ScrapeBadgerConfig } from './index-BzPGfcwJ.cjs';
2
- export { e as AccountRestrictedError, a4 as ApiResponse, a0 as Article, A as AuthenticationError, ak as BillingLog, al as BillingLogList, a3 as Broadcast, k as CommunitiesClient, O as Community, J as CommunityBanner, X as CommunityMember, a1 as CommunityNote, K as CommunityRule, r as CommunityTweetType, C as ConflictError, am as ConnectOptions, ac as ConnectedEvent, a9 as CreateMonitorParams, ai as DeliveryLog, aj as DeliveryLogList, af as ErrorEvent, ap as FilterRuleCreate, au as FilterRuleDeliveryLog, av as FilterRuleDeliveryLogListResponse, as as FilterRuleListResponse, ar as FilterRulePricingTier, aw as FilterRulePricingTiersResponse, ao as FilterRuleResponse, an as FilterRuleStatus, aq as FilterRuleUpdate, at as FilterRuleValidateResponse, G as GeoClient, m as GeoSearchOptions, H as Hashtag, I as InsufficientCreditsError, h as IteratorOptions, F as List, a5 as ListResponse, L as ListsClient, Z as Location, M as Media, a6 as MonitorStatus, N as NotFoundError, f as PaginatedResponse, g as PaginationOptions, P as PermissionDeniedError, ad as PingEvent, $ as Place, _ as PlaceTrends, t as Poll, s as PollOption, Q as QueryType, b as RateLimitError, R as ResolvedConfig, a as ScrapeBadgerError, c as ServerError, a2 as Space, p as SpacesClient, n as StreamClient, o as StreamEmitter, ag as StreamEvent, ah as StreamEventType, a7 as StreamMonitor, a8 as StreamMonitorList, ab as StreamTweet, d as TimeoutError, Y as Trend, q as TrendCategory, l as TrendsClient, y as Tweet, ae as TweetEvent, x as TweetPlace, j as TweetsClient, aa as UpdateMonitorParams, u as Url, z as User, D as UserAbout, E as UserIds, w as UserMention, U as UsersClient, V as ValidationError, W as WebSocketStreamError, i as collectAll, v as verifyWebhookSignature } from './index-BzPGfcwJ.cjs';
1
+ import { B as BaseClient, T as TwitterClient, S as ScrapeBadgerConfig } from './index-DBk60c2e.cjs';
2
+ export { e as AccountRestrictedError, a5 as ApiResponse, a1 as Article, A as AuthenticationError, al as BillingLog, am as BillingLogList, a4 as Broadcast, l as CommunitiesClient, X as Community, K as CommunityBanner, Y as CommunityMember, a2 as CommunityNote, O as CommunityRule, s as CommunityTweetType, C as ConflictError, an as ConnectOptions, ad as ConnectedEvent, aa as CreateMonitorParams, aj as DeliveryLog, ak as DeliveryLogList, ag as ErrorEvent, aq as FilterRuleCreate, av as FilterRuleDeliveryLog, aw as FilterRuleDeliveryLogListResponse, at as FilterRuleListResponse, as as FilterRulePricingTier, ax as FilterRulePricingTiersResponse, ap as FilterRuleResponse, ao as FilterRuleStatus, ar as FilterRuleUpdate, au as FilterRuleValidateResponse, G as GeoClient, n as GeoSearchOptions, H as Hashtag, f as IPNotAllowedError, I as InsufficientCreditsError, i as IteratorOptions, J as List, a6 as ListResponse, L as ListsClient, _ as Location, M as Media, a7 as MonitorStatus, N as NotFoundError, g as PaginatedResponse, h as PaginationOptions, P as PermissionDeniedError, ae as PingEvent, a0 as Place, $ as PlaceTrends, u as Poll, t as PollOption, Q as QueryType, b as RateLimitError, R as ResolvedConfig, a as ScrapeBadgerError, c as ServerError, a3 as Space, q as SpacesClient, o as StreamClient, p as StreamEmitter, ah as StreamEvent, ai as StreamEventType, a8 as StreamMonitor, a9 as StreamMonitorList, ac as StreamTweet, d as TimeoutError, Z as Trend, r as TrendCategory, m as TrendsClient, z as Tweet, af as TweetEvent, y as TweetPlace, k as TweetsClient, ab as UpdateMonitorParams, w as Url, D as User, E as UserAbout, F as UserIds, x as UserMention, U as UsersClient, V as ValidationError, W as WebSocketStreamError, j as collectAll, v as verifyWebhookSignature } from './index-DBk60c2e.cjs';
3
3
  import 'node:events';
4
4
 
5
5
  /**
@@ -1499,8 +1499,10 @@ interface LensSearchParams {
1499
1499
  gl?: string;
1500
1500
  hl?: string;
1501
1501
  /**
1502
- * NOT YET SUPPORTED. Accepted for API compatibility and echoed in the
1503
- * response's `warnings` array; it does not change the results.
1502
+ * Return only the tiles Google marked as buyable — those carrying a price
1503
+ * chip and stock status — drawn from the same grid with no extra request.
1504
+ * When the image has no shoppable matches the full grid is returned and
1505
+ * `warnings` says so.
1504
1506
  */
1505
1507
  product?: boolean;
1506
1508
  /**
@@ -1511,8 +1513,8 @@ interface LensSearchParams {
1511
1513
  /**
1512
1514
  * Return just the pages hosting this image, each flagged `exact_match`,
1513
1515
  * instead of the broad visual grid — what a copyright or provenance
1514
- * check needs. Google exposes this set for most images but not all (6-7
1515
- * of 10 in our sampling); when it is unavailable the full grid is
1516
+ * check needs. Google exposes this set for most images but not all (8 of 10
1517
+ * in our sampling); when it is unavailable the full grid is
1516
1518
  * returned and `warnings` says the filter was not applied.
1517
1519
  */
1518
1520
  exact_matches?: boolean;
@@ -1807,8 +1809,8 @@ declare class JobsClient {
1807
1809
  * Also carries a `warnings` array naming any parameter that could not be
1808
1810
  * applied. `exact_matches: true` returns just the pages hosting the image,
1809
1811
  * flagged `exact_match`, for most images; when Google does not expose that
1810
- * set the grid comes back and `warnings` says so. `product` is still not
1811
- * supported and always lands in `warnings`.
1812
+ * set the grid comes back and `warnings` says so. `product: true` narrows the same grid to the tiles Google marked
1813
+ * buyable.
1812
1814
  *
1813
1815
  * @example
1814
1816
  * ```typescript
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BaseClient, T as TwitterClient, S as ScrapeBadgerConfig } from './index-BzPGfcwJ.js';
2
- export { e as AccountRestrictedError, a4 as ApiResponse, a0 as Article, A as AuthenticationError, ak as BillingLog, al as BillingLogList, a3 as Broadcast, k as CommunitiesClient, O as Community, J as CommunityBanner, X as CommunityMember, a1 as CommunityNote, K as CommunityRule, r as CommunityTweetType, C as ConflictError, am as ConnectOptions, ac as ConnectedEvent, a9 as CreateMonitorParams, ai as DeliveryLog, aj as DeliveryLogList, af as ErrorEvent, ap as FilterRuleCreate, au as FilterRuleDeliveryLog, av as FilterRuleDeliveryLogListResponse, as as FilterRuleListResponse, ar as FilterRulePricingTier, aw as FilterRulePricingTiersResponse, ao as FilterRuleResponse, an as FilterRuleStatus, aq as FilterRuleUpdate, at as FilterRuleValidateResponse, G as GeoClient, m as GeoSearchOptions, H as Hashtag, I as InsufficientCreditsError, h as IteratorOptions, F as List, a5 as ListResponse, L as ListsClient, Z as Location, M as Media, a6 as MonitorStatus, N as NotFoundError, f as PaginatedResponse, g as PaginationOptions, P as PermissionDeniedError, ad as PingEvent, $ as Place, _ as PlaceTrends, t as Poll, s as PollOption, Q as QueryType, b as RateLimitError, R as ResolvedConfig, a as ScrapeBadgerError, c as ServerError, a2 as Space, p as SpacesClient, n as StreamClient, o as StreamEmitter, ag as StreamEvent, ah as StreamEventType, a7 as StreamMonitor, a8 as StreamMonitorList, ab as StreamTweet, d as TimeoutError, Y as Trend, q as TrendCategory, l as TrendsClient, y as Tweet, ae as TweetEvent, x as TweetPlace, j as TweetsClient, aa as UpdateMonitorParams, u as Url, z as User, D as UserAbout, E as UserIds, w as UserMention, U as UsersClient, V as ValidationError, W as WebSocketStreamError, i as collectAll, v as verifyWebhookSignature } from './index-BzPGfcwJ.js';
1
+ import { B as BaseClient, T as TwitterClient, S as ScrapeBadgerConfig } from './index-DBk60c2e.js';
2
+ export { e as AccountRestrictedError, a5 as ApiResponse, a1 as Article, A as AuthenticationError, al as BillingLog, am as BillingLogList, a4 as Broadcast, l as CommunitiesClient, X as Community, K as CommunityBanner, Y as CommunityMember, a2 as CommunityNote, O as CommunityRule, s as CommunityTweetType, C as ConflictError, an as ConnectOptions, ad as ConnectedEvent, aa as CreateMonitorParams, aj as DeliveryLog, ak as DeliveryLogList, ag as ErrorEvent, aq as FilterRuleCreate, av as FilterRuleDeliveryLog, aw as FilterRuleDeliveryLogListResponse, at as FilterRuleListResponse, as as FilterRulePricingTier, ax as FilterRulePricingTiersResponse, ap as FilterRuleResponse, ao as FilterRuleStatus, ar as FilterRuleUpdate, au as FilterRuleValidateResponse, G as GeoClient, n as GeoSearchOptions, H as Hashtag, f as IPNotAllowedError, I as InsufficientCreditsError, i as IteratorOptions, J as List, a6 as ListResponse, L as ListsClient, _ as Location, M as Media, a7 as MonitorStatus, N as NotFoundError, g as PaginatedResponse, h as PaginationOptions, P as PermissionDeniedError, ae as PingEvent, a0 as Place, $ as PlaceTrends, u as Poll, t as PollOption, Q as QueryType, b as RateLimitError, R as ResolvedConfig, a as ScrapeBadgerError, c as ServerError, a3 as Space, q as SpacesClient, o as StreamClient, p as StreamEmitter, ah as StreamEvent, ai as StreamEventType, a8 as StreamMonitor, a9 as StreamMonitorList, ac as StreamTweet, d as TimeoutError, Z as Trend, r as TrendCategory, m as TrendsClient, z as Tweet, af as TweetEvent, y as TweetPlace, k as TweetsClient, ab as UpdateMonitorParams, w as Url, D as User, E as UserAbout, F as UserIds, x as UserMention, U as UsersClient, V as ValidationError, W as WebSocketStreamError, j as collectAll, v as verifyWebhookSignature } from './index-DBk60c2e.js';
3
3
  import 'node:events';
4
4
 
5
5
  /**
@@ -1499,8 +1499,10 @@ interface LensSearchParams {
1499
1499
  gl?: string;
1500
1500
  hl?: string;
1501
1501
  /**
1502
- * NOT YET SUPPORTED. Accepted for API compatibility and echoed in the
1503
- * response's `warnings` array; it does not change the results.
1502
+ * Return only the tiles Google marked as buyable — those carrying a price
1503
+ * chip and stock status — drawn from the same grid with no extra request.
1504
+ * When the image has no shoppable matches the full grid is returned and
1505
+ * `warnings` says so.
1504
1506
  */
1505
1507
  product?: boolean;
1506
1508
  /**
@@ -1511,8 +1513,8 @@ interface LensSearchParams {
1511
1513
  /**
1512
1514
  * Return just the pages hosting this image, each flagged `exact_match`,
1513
1515
  * instead of the broad visual grid — what a copyright or provenance
1514
- * check needs. Google exposes this set for most images but not all (6-7
1515
- * of 10 in our sampling); when it is unavailable the full grid is
1516
+ * check needs. Google exposes this set for most images but not all (8 of 10
1517
+ * in our sampling); when it is unavailable the full grid is
1516
1518
  * returned and `warnings` says the filter was not applied.
1517
1519
  */
1518
1520
  exact_matches?: boolean;
@@ -1807,8 +1809,8 @@ declare class JobsClient {
1807
1809
  * Also carries a `warnings` array naming any parameter that could not be
1808
1810
  * applied. `exact_matches: true` returns just the pages hosting the image,
1809
1811
  * flagged `exact_match`, for most images; when Google does not expose that
1810
- * set the grid comes back and `warnings` says so. `product` is still not
1811
- * supported and always lands in `warnings`.
1812
+ * set the grid comes back and `warnings` says so. `product: true` narrows the same grid to the tiles Google marked
1813
+ * buyable.
1812
1814
  *
1813
1815
  * @example
1814
1816
  * ```typescript
package/dist/index.js CHANGED
@@ -39,6 +39,16 @@ var PermissionDeniedError = class _PermissionDeniedError extends AuthenticationE
39
39
  Object.setPrototypeOf(this, _PermissionDeniedError.prototype);
40
40
  }
41
41
  };
42
+ var IPNotAllowedError = class _IPNotAllowedError extends PermissionDeniedError {
43
+ /** The address ScrapeBadger saw (null when relayed, e.g. via the hosted MCP server) */
44
+ clientIp;
45
+ constructor(message = "This API key may not be used from this IP address.", clientIp = null) {
46
+ super(message);
47
+ this.name = "IPNotAllowedError";
48
+ this.clientIp = clientIp;
49
+ Object.setPrototypeOf(this, _IPNotAllowedError.prototype);
50
+ }
51
+ };
42
52
  var RateLimitError = class _RateLimitError extends ScrapeBadgerError {
43
53
  /** Unix timestamp when the rate limit resets */
44
54
  retryAfter;
@@ -354,6 +364,9 @@ var BaseClient = class _BaseClient {
354
364
  case 402:
355
365
  throw new InsufficientCreditsError(message, errorData.credits_balance);
356
366
  case 403:
367
+ if (errorData.error === "ip_not_allowed") {
368
+ throw new IPNotAllowedError(message, errorData.client_ip ?? null);
369
+ }
357
370
  if (errorData.error === "insufficient_scope") {
358
371
  throw new PermissionDeniedError(
359
372
  message,
@@ -9117,6 +9130,7 @@ exports.GoogleShoppingClient = ShoppingClient;
9117
9130
  exports.GoogleShortsClient = ShortsClient;
9118
9131
  exports.GoogleTrendsClient = TrendsClient2;
9119
9132
  exports.GoogleVideosClient = VideosClient;
9133
+ exports.IPNotAllowedError = IPNotAllowedError;
9120
9134
  exports.ImmobiliareClient = ImmobiliareClient;
9121
9135
  exports.InstagramAudioClient = AudioClient;
9122
9136
  exports.InstagramClient = InstagramClient;