scrapebadger 0.24.2 → 0.26.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/README.md CHANGED
@@ -87,6 +87,7 @@ const client = new ScrapeBadger();
87
87
  | **YouTube** | 39 endpoints — search, autocomplete, video detail/related/comments/replies/transcript/captions/streams/live chat/batch, channel detail/videos/shorts/streams/playlists/community/about/subscriber count/search/resolve, playlist detail/items, mixes, trending/shorts, hashtags, home, shorts detail/by sound, community posts/comments, music search, oEmbed, categories/languages/regions/markets | [YouTube Guide](docs/youtube.md) |
88
88
  | **Immobiliare** | 8 endpoints across 4 markets (it, es, gr, lu) — autocomplete, search, listing detail, agency profile/listings, price stats, markets, reference | [Immobiliare Guide](docs/immobiliare.md) |
89
89
  | **LoopNet** | 5 endpoints across loopnet.com/.ca/.co.uk/.fr/.es — commercial-real-estate search (for-lease/for-sale/auctions), listing detail, broker profile, markets, property types | [LoopNet Guide](docs/loopnet.md) |
90
+ | **ChatGPT** | Prompt the real chatgpt.com anonymously — structured answer with citations anchored to character offsets, the full retrieved search trail, and AEO/GEO brand-visibility analysis | [ChatGPT Guide](docs/chatgpt.md) |
90
91
 
91
92
  ## Error Handling
92
93
 
@@ -52,6 +52,22 @@ declare class BaseClient {
52
52
  * Make an HTTP request to the API.
53
53
  */
54
54
  request<T>(path: string, options?: RequestOptions): Promise<T>;
55
+ /**
56
+ * POST and return the undecoded response body.
57
+ *
58
+ * For endpoints that answer with something other than JSON — currently
59
+ * `/v1/web/scrape` with `raw_content: true`, which returns the scraped body
60
+ * itself. The normal path funnels a non-JSON response into
61
+ * `{ detail: await response.text() }`, which both loses the result and, for
62
+ * a binary payload, corrupts it: `text()` decodes bytes as UTF-8.
63
+ *
64
+ * Returns the raw bytes plus the response headers.
65
+ */
66
+ postBinary(path: string, options?: RequestOptions): Promise<{
67
+ bytes: Uint8Array;
68
+ headers: Headers;
69
+ status: number;
70
+ }>;
55
71
  /**
56
72
  * Make an HTTP request and return both data and rate limit headers.
57
73
  */
@@ -52,6 +52,22 @@ declare class BaseClient {
52
52
  * Make an HTTP request to the API.
53
53
  */
54
54
  request<T>(path: string, options?: RequestOptions): Promise<T>;
55
+ /**
56
+ * POST and return the undecoded response body.
57
+ *
58
+ * For endpoints that answer with something other than JSON — currently
59
+ * `/v1/web/scrape` with `raw_content: true`, which returns the scraped body
60
+ * itself. The normal path funnels a non-JSON response into
61
+ * `{ detail: await response.text() }`, which both loses the result and, for
62
+ * a binary payload, corrupts it: `text()` decodes bytes as UTF-8.
63
+ *
64
+ * Returns the raw bytes plus the response headers.
65
+ */
66
+ postBinary(path: string, options?: RequestOptions): Promise<{
67
+ bytes: Uint8Array;
68
+ headers: Headers;
69
+ status: number;
70
+ }>;
55
71
  /**
56
72
  * Make an HTTP request and return both data and rate limit headers.
57
73
  */