context.dev 2.3.0 → 2.5.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.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +9 -9
  4. data/lib/context_dev/models/ai_extract_product_params.rb +9 -1
  5. data/lib/context_dev/models/ai_extract_products_params.rb +18 -2
  6. data/lib/context_dev/models/brand_retrieve_params.rb +109 -22
  7. data/lib/context_dev/models/brand_retrieve_response.rb +4 -6
  8. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +32 -3
  9. data/lib/context_dev/models/industry_retrieve_naics_params.rb +11 -1
  10. data/lib/context_dev/models/industry_retrieve_sic_params.rb +11 -1
  11. data/lib/context_dev/models/monitor_create_params.rb +6 -5
  12. data/lib/context_dev/models/monitor_create_response.rb +6 -5
  13. data/lib/context_dev/models/monitor_get_credit_usage_params.rb +30 -0
  14. data/lib/context_dev/models/monitor_get_credit_usage_response.rb +59 -0
  15. data/lib/context_dev/models/monitor_get_limits_params.rb +14 -0
  16. data/lib/context_dev/models/monitor_get_limits_response.rb +52 -0
  17. data/lib/context_dev/models/monitor_list_account_changes_params.rb +16 -7
  18. data/lib/context_dev/models/monitor_list_account_changes_response.rb +2 -1
  19. data/lib/context_dev/models/monitor_list_account_runs_params.rb +7 -10
  20. data/lib/context_dev/models/monitor_list_changes_params.rb +8 -4
  21. data/lib/context_dev/models/monitor_list_changes_response.rb +2 -1
  22. data/lib/context_dev/models/monitor_list_params.rb +18 -19
  23. data/lib/context_dev/models/monitor_list_response.rb +6 -5
  24. data/lib/context_dev/models/monitor_list_runs_params.rb +7 -10
  25. data/lib/context_dev/models/monitor_retrieve_change_response.rb +2 -1
  26. data/lib/context_dev/models/monitor_retrieve_response.rb +6 -5
  27. data/lib/context_dev/models/monitor_update_params.rb +6 -5
  28. data/lib/context_dev/models/monitor_update_response.rb +6 -5
  29. data/lib/context_dev/models/parse_handle_params.rb +296 -46
  30. data/lib/context_dev/models/utility_prefetch_params.rb +9 -1
  31. data/lib/context_dev/models/web_extract_competitors_params.rb +11 -1
  32. data/lib/context_dev/models/web_extract_fonts_params.rb +14 -4
  33. data/lib/context_dev/models/web_extract_params.rb +19 -1
  34. data/lib/context_dev/models/web_extract_styleguide_params.rb +14 -4
  35. data/lib/context_dev/models/web_screenshot_params.rb +69 -18
  36. data/lib/context_dev/models/web_screenshot_response.rb +3 -2
  37. data/lib/context_dev/models/web_search_params.rb +9 -1
  38. data/lib/context_dev/models/web_web_crawl_md_params.rb +34 -1
  39. data/lib/context_dev/models/web_web_scrape_html_params.rb +268 -29
  40. data/lib/context_dev/models/web_web_scrape_images_params.rb +208 -19
  41. data/lib/context_dev/models/web_web_scrape_md_params.rb +352 -38
  42. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +45 -1
  43. data/lib/context_dev/models.rb +4 -0
  44. data/lib/context_dev/resources/ai.rb +3 -1
  45. data/lib/context_dev/resources/brand.rb +6 -2
  46. data/lib/context_dev/resources/industry.rb +6 -2
  47. data/lib/context_dev/resources/monitors.rb +70 -32
  48. data/lib/context_dev/resources/parse.rb +11 -11
  49. data/lib/context_dev/resources/utility.rb +3 -1
  50. data/lib/context_dev/resources/web.rb +104 -55
  51. data/lib/context_dev/version.rb +1 -1
  52. data/lib/context_dev.rb +4 -0
  53. data/rbi/context_dev/models/ai_extract_product_params.rbi +11 -0
  54. data/rbi/context_dev/models/ai_extract_products_params.rbi +22 -0
  55. data/rbi/context_dev/models/brand_retrieve_params.rbi +175 -64
  56. data/rbi/context_dev/models/brand_retrieve_response.rbi +8 -11
  57. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +68 -5
  58. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +15 -0
  59. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +15 -0
  60. data/rbi/context_dev/models/monitor_create_params.rbi +6 -4
  61. data/rbi/context_dev/models/monitor_create_response.rbi +6 -4
  62. data/rbi/context_dev/models/monitor_get_credit_usage_params.rbi +60 -0
  63. data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +111 -0
  64. data/rbi/context_dev/models/monitor_get_limits_params.rbi +30 -0
  65. data/rbi/context_dev/models/monitor_get_limits_response.rbi +105 -0
  66. data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +16 -0
  67. data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +2 -0
  68. data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +7 -6
  69. data/rbi/context_dev/models/monitor_list_changes_params.rbi +8 -0
  70. data/rbi/context_dev/models/monitor_list_changes_response.rbi +2 -0
  71. data/rbi/context_dev/models/monitor_list_params.rbi +23 -31
  72. data/rbi/context_dev/models/monitor_list_response.rbi +6 -4
  73. data/rbi/context_dev/models/monitor_list_runs_params.rbi +7 -6
  74. data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +2 -0
  75. data/rbi/context_dev/models/monitor_retrieve_response.rbi +6 -4
  76. data/rbi/context_dev/models/monitor_update_params.rbi +6 -4
  77. data/rbi/context_dev/models/monitor_update_response.rbi +6 -4
  78. data/rbi/context_dev/models/parse_handle_params.rbi +601 -71
  79. data/rbi/context_dev/models/utility_prefetch_params.rbi +11 -0
  80. data/rbi/context_dev/models/web_extract_competitors_params.rbi +15 -0
  81. data/rbi/context_dev/models/web_extract_fonts_params.rbi +19 -7
  82. data/rbi/context_dev/models/web_extract_params.rbi +26 -0
  83. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +19 -7
  84. data/rbi/context_dev/models/web_screenshot_params.rbi +108 -37
  85. data/rbi/context_dev/models/web_screenshot_response.rbi +4 -2
  86. data/rbi/context_dev/models/web_search_params.rbi +11 -0
  87. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +53 -0
  88. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +554 -49
  89. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +426 -30
  90. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +742 -61
  91. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +82 -0
  92. data/rbi/context_dev/models.rbi +4 -0
  93. data/rbi/context_dev/resources/ai.rbi +3 -0
  94. data/rbi/context_dev/resources/brand.rbi +9 -1
  95. data/rbi/context_dev/resources/industry.rbi +10 -0
  96. data/rbi/context_dev/resources/monitors.rbi +55 -11
  97. data/rbi/context_dev/resources/parse.rbi +44 -24
  98. data/rbi/context_dev/resources/utility.rbi +3 -0
  99. data/rbi/context_dev/resources/web.rbi +224 -48
  100. data/sig/context_dev/models/ai_extract_product_params.rbs +12 -1
  101. data/sig/context_dev/models/ai_extract_products_params.rbs +14 -0
  102. data/sig/context_dev/models/brand_retrieve_params.rbs +97 -51
  103. data/sig/context_dev/models/brand_retrieve_response.rbs +2 -2
  104. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +34 -5
  105. data/sig/context_dev/models/industry_retrieve_naics_params.rbs +7 -0
  106. data/sig/context_dev/models/industry_retrieve_sic_params.rbs +7 -0
  107. data/sig/context_dev/models/monitor_get_credit_usage_params.rbs +32 -0
  108. data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +52 -0
  109. data/sig/context_dev/models/monitor_get_limits_params.rbs +15 -0
  110. data/sig/context_dev/models/monitor_get_limits_response.rbs +43 -0
  111. data/sig/context_dev/models/monitor_list_params.rbs +8 -14
  112. data/sig/context_dev/models/parse_handle_params.rbs +297 -50
  113. data/sig/context_dev/models/utility_prefetch_params.rbs +7 -0
  114. data/sig/context_dev/models/web_extract_competitors_params.rbs +12 -1
  115. data/sig/context_dev/models/web_extract_fonts_params.rbs +10 -5
  116. data/sig/context_dev/models/web_extract_params.rbs +14 -0
  117. data/sig/context_dev/models/web_extract_styleguide_params.rbs +10 -5
  118. data/sig/context_dev/models/web_screenshot_params.rbs +41 -20
  119. data/sig/context_dev/models/web_search_params.rbs +7 -0
  120. data/sig/context_dev/models/web_web_crawl_md_params.rbs +28 -1
  121. data/sig/context_dev/models/web_web_scrape_html_params.rbs +175 -47
  122. data/sig/context_dev/models/web_web_scrape_images_params.rbs +128 -38
  123. data/sig/context_dev/models/web_web_scrape_md_params.rbs +229 -62
  124. data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +35 -1
  125. data/sig/context_dev/models.rbs +4 -0
  126. data/sig/context_dev/resources/ai.rbs +1 -0
  127. data/sig/context_dev/resources/brand.rbs +3 -1
  128. data/sig/context_dev/resources/industry.rbs +2 -0
  129. data/sig/context_dev/resources/monitors.rbs +12 -2
  130. data/sig/context_dev/resources/parse.rbs +10 -10
  131. data/sig/context_dev/resources/utility.rbs +1 -0
  132. data/sig/context_dev/resources/web.rbs +47 -26
  133. metadata +14 -2
@@ -26,7 +26,7 @@ module ContextDev
26
26
  #
27
27
  # @param mode [Symbol, ContextDev::Models::MonitorCreateParams::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
28
28
  #
29
- # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
29
+ # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
30
30
  #
31
31
  # @param webhook [ContextDev::Models::MonitorCreateParams::Webhook, nil]
32
32
  #
@@ -84,7 +84,7 @@ module ContextDev
84
84
  #
85
85
  # @param status [Symbol, ContextDev::Models::MonitorUpdateParams::Status]
86
86
  #
87
- # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
87
+ # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
88
88
  #
89
89
  # @param target [ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract] Discriminated union describing what the monitor watches.
90
90
  #
@@ -115,25 +115,25 @@ module ContextDev
115
115
  #
116
116
  # @overload list(change_detection_type: nil, cursor: nil, limit: nil, q: nil, search_by: nil, search_type: nil, status: nil, tag: nil, tags: nil, target_type: nil, request_options: {})
117
117
  #
118
- # @param change_detection_type [Symbol, ContextDev::Models::MonitorListParams::ChangeDetectionType]
118
+ # @param change_detection_type [Symbol, ContextDev::Models::MonitorListParams::ChangeDetectionType] Filter by change detection type.
119
119
  #
120
- # @param cursor [String]
120
+ # @param cursor [String] Opaque pagination cursor from a previous response.
121
121
  #
122
- # @param limit [Integer]
122
+ # @param limit [Integer] Maximum number of items to return per page (1-100). Defaults to 25.
123
123
  #
124
124
  # @param q [String] Free-text search term, matched against the fields named in `search_by`.
125
125
  #
126
- # @param search_by [Array<Symbol, ContextDev::Models::MonitorListParams::SearchBy>] Comma-separated fields to search with `q`. Defaults to all of them. Note `instru
126
+ # @param search_by [Array<Symbol, ContextDev::Models::MonitorListParams::SearchBy>, nil] Comma-separated fields to search with `q`. Defaults to all of them. Note `instru
127
127
  #
128
128
  # @param search_type [Symbol, ContextDev::Models::MonitorListParams::SearchType] `prefix` for as-you-type prefix matching (default), `exact` for full-token match
129
129
  #
130
- # @param status [Symbol, ContextDev::Models::MonitorListParams::Status] Monitor lifecycle status. `failed` means the most recent run failed (see the mon
130
+ # @param status [Symbol, ContextDev::Models::MonitorListParams::Status] Filter monitors by lifecycle status.
131
131
  #
132
132
  # @param tag [String] Filter to items that have this tag.
133
133
  #
134
- # @param tags [Array<String>] Comma-separated list of tags to filter by (matches monitors having any of them).
134
+ # @param tags [Array<String>, nil] Comma-separated list of tags to filter by (matches monitors having any of them).
135
135
  #
136
- # @param target_type [Symbol, ContextDev::Models::MonitorListParams::TargetType]
136
+ # @param target_type [Symbol, ContextDev::Models::MonitorListParams::TargetType] Filter by target type.
137
137
  #
138
138
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
139
139
  #
@@ -171,25 +171,69 @@ module ContextDev
171
171
  )
172
172
  end
173
173
 
174
+ # Returns credits charged per monitor over an optional [since, until] window,
175
+ # newest spenders first.
176
+ #
177
+ # @overload get_credit_usage(since: nil, until_: nil, request_options: {})
178
+ #
179
+ # @param since [Time] Only include items at or after this ISO 8601 timestamp.
180
+ #
181
+ # @param until_ [Time] Only include items before this ISO 8601 timestamp.
182
+ #
183
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
184
+ #
185
+ # @return [ContextDev::Models::MonitorGetCreditUsageResponse]
186
+ #
187
+ # @see ContextDev::Models::MonitorGetCreditUsageParams
188
+ def get_credit_usage(params = {})
189
+ parsed, options = ContextDev::MonitorGetCreditUsageParams.dump_request(params)
190
+ query = ContextDev::Internal::Util.encode_query_params(parsed)
191
+ @client.request(
192
+ method: :get,
193
+ path: "monitors/credit-usage",
194
+ query: query.transform_keys(until_: "until"),
195
+ model: ContextDev::Models::MonitorGetCreditUsageResponse,
196
+ options: options
197
+ )
198
+ end
199
+
200
+ # Returns how many monitors the account has and the maximum it allows.
201
+ #
202
+ # @overload get_limits(request_options: {})
203
+ #
204
+ # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
205
+ #
206
+ # @return [ContextDev::Models::MonitorGetLimitsResponse]
207
+ #
208
+ # @see ContextDev::Models::MonitorGetLimitsParams
209
+ def get_limits(params = {})
210
+ @client.request(
211
+ method: :get,
212
+ path: "monitors/limits",
213
+ model: ContextDev::Models::MonitorGetLimitsResponse,
214
+ options: params[:request_options]
215
+ )
216
+ end
217
+
174
218
  # Returns an account-wide feed of detected changes across monitors.
175
219
  #
176
220
  # @overload list_account_changes(change_detection_type: nil, cursor: nil, limit: nil, monitor_id: nil, since: nil, tag: nil, target_type: nil, until_: nil, request_options: {})
177
221
  #
178
- # @param change_detection_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::ChangeDetectionType]
222
+ # @param change_detection_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::ChangeDetectionType] Filter by change detection type.
179
223
  #
180
- # @param cursor [String]
224
+ # @param cursor [String] Opaque pagination cursor from a previous response.
181
225
  #
182
- # @param limit [Integer]
226
+ # @param limit [Integer] Maximum number of items to return per page (1-100). Defaults to 25.
183
227
  #
184
- # @param monitor_id [String]
228
+ # @param monitor_id [String] Filter changes to a single monitor.
185
229
  #
186
- # @param since [Time]
230
+ # @param since [Time] Only include items at or after this ISO 8601 timestamp.
187
231
  #
188
232
  # @param tag [String] Filter to items that have this tag.
189
233
  #
190
- # @param target_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::TargetType]
234
+ # @param target_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::TargetType] Filter by target type.
191
235
  #
192
- # @param until_ [Time]
236
+ # @param until_ [Time] Only include items before this ISO 8601 timestamp.
193
237
  #
194
238
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
195
239
  #
@@ -208,18 +252,15 @@ module ContextDev
208
252
  )
209
253
  end
210
254
 
211
- # Some parameter documentations has been truncated, see
212
- # {ContextDev::Models::MonitorListAccountRunsParams} for more details.
213
- #
214
255
  # Returns an account-wide feed of monitor runs across all monitors.
215
256
  #
216
257
  # @overload list_account_runs(cursor: nil, limit: nil, status: nil, request_options: {})
217
258
  #
218
- # @param cursor [String]
259
+ # @param cursor [String] Opaque pagination cursor from a previous response.
219
260
  #
220
- # @param limit [Integer]
261
+ # @param limit [Integer] Maximum number of items to return per page (1-100). Defaults to 25.
221
262
  #
222
- # @param status [Symbol, ContextDev::Models::MonitorListAccountRunsParams::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
263
+ # @param status [Symbol, ContextDev::Models::MonitorListAccountRunsParams::Status] Filter runs by lifecycle status.
223
264
  #
224
265
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
225
266
  #
@@ -244,15 +285,15 @@ module ContextDev
244
285
  #
245
286
  # @param monitor_id [String]
246
287
  #
247
- # @param cursor [String]
288
+ # @param cursor [String] Opaque pagination cursor from a previous response.
248
289
  #
249
- # @param limit [Integer]
290
+ # @param limit [Integer] Maximum number of items to return per page (1-100). Defaults to 25.
250
291
  #
251
- # @param since [Time]
292
+ # @param since [Time] Only include items at or after this ISO 8601 timestamp.
252
293
  #
253
294
  # @param tag [String] Filter to items that have this tag.
254
295
  #
255
- # @param until_ [Time]
296
+ # @param until_ [Time] Only include items before this ISO 8601 timestamp.
256
297
  #
257
298
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
258
299
  #
@@ -271,20 +312,17 @@ module ContextDev
271
312
  )
272
313
  end
273
314
 
274
- # Some parameter documentations has been truncated, see
275
- # {ContextDev::Models::MonitorListRunsParams} for more details.
276
- #
277
315
  # List monitor runs
278
316
  #
279
317
  # @overload list_runs(monitor_id, cursor: nil, limit: nil, status: nil, request_options: {})
280
318
  #
281
319
  # @param monitor_id [String]
282
320
  #
283
- # @param cursor [String]
321
+ # @param cursor [String] Opaque pagination cursor from a previous response.
284
322
  #
285
- # @param limit [Integer]
323
+ # @param limit [Integer] Maximum number of items to return per page (1-100). Defaults to 25.
286
324
  #
287
- # @param status [Symbol, ContextDev::Models::MonitorListRunsParams::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
325
+ # @param status [Symbol, ContextDev::Models::MonitorListRunsParams::Status] Filter runs by lifecycle status.
288
326
  #
289
327
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
290
328
  #
@@ -9,29 +9,29 @@ module ContextDev
9
9
  # Converts raw text, source code, web/data, PDF, Microsoft Office, and image bytes
10
10
  # into LLM-usable Markdown.
11
11
  #
12
- # @overload handle(body:, base_url: nil, extension: nil, filename: nil, include_images: nil, include_links: nil, ocr: nil, pdf_end: nil, pdf_start: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
12
+ # @overload handle(body:, client: nil, extension: nil, include_images: nil, include_links: nil, ocr: nil, pdf: nil, shorten_base64_images: nil, tags: nil, use_main_content_only: nil, zdr: nil, request_options: {})
13
13
  #
14
14
  # @param body [Pathname, StringIO, IO, String, ContextDev::FilePart] Body param
15
15
  #
16
- # @param base_url [String] Query param: Optional HTTP(S) source document URL used to resolve relative links
16
+ # @param client [String] Query param: Optional client identifier used for usage attribution.
17
17
  #
18
- # @param extension [String] Query param: Optional file extension hint, such as pdf, docx, xlsx, pptx, html,
18
+ # @param extension [Symbol, ContextDev::Models::ParseHandleParams::Extension] Query param: Optional file extension hint, such as pdf, docx, xlsx, pptx, html,
19
19
  #
20
- # @param filename [String] Query param: Optional filename hint used to infer the extension when extension i
20
+ # @param include_images [Boolean, Symbol, ContextDev::Models::ParseHandleParams::IncludeImages] Query param: Include image references in Markdown output
21
21
  #
22
- # @param include_images [Boolean] Query param: Include image references in Markdown output
22
+ # @param include_links [Boolean, Symbol, ContextDev::Models::ParseHandleParams::IncludeLinks] Query param: Preserve hyperlinks in Markdown output
23
23
  #
24
- # @param include_links [Boolean] Query param: Preserve hyperlinks in Markdown output
24
+ # @param ocr [Boolean, Symbol, ContextDev::Models::ParseHandleParams::Ocr] Query param: When true for PDF inputs, detect and OCR images embedded in the sel
25
25
  #
26
- # @param ocr [Boolean] Query param: When true for PDF inputs, detect and OCR images embedded in the sel
26
+ # @param pdf [ContextDev::Models::ParseHandleParams::Pdf] Query param: PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5
27
27
  #
28
- # @param pdf_end [Integer] Query param: Last 1-based PDF page to parse. When omitted, parsing ends at the l
28
+ # @param shorten_base64_images [Boolean, Symbol, ContextDev::Models::ParseHandleParams::ShortenBase64Images] Query param: Shorten base64-encoded image data in the Markdown output
29
29
  #
30
- # @param pdf_start [Integer] Query param: First 1-based PDF page to parse. When omitted, parsing starts at th
30
+ # @param tags [Array<String>] Query param: Optional comma-separated caller-defined tags for tracking this requ
31
31
  #
32
- # @param shorten_base64_images [Boolean] Query param: Shorten base64-encoded image data in the Markdown output
32
+ # @param use_main_content_only [Boolean, Symbol, ContextDev::Models::ParseHandleParams::UseMainContentOnly] Query param: Extract only the main content from HTML-like inputs
33
33
  #
34
- # @param use_main_content_only [Boolean] Query param: Extract only the main content from HTML-like inputs
34
+ # @param zdr [Symbol, ContextDev::Models::ParseHandleParams::Zdr] Query param: Set to enabled to bypass shared caches and omit request and respons
35
35
  #
36
36
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
37
37
  #
@@ -11,12 +11,14 @@ module ContextDev
11
11
  # one lookup key: a domain, or an email whose domain is extracted and validated
12
12
  # (free email providers and disposable email addresses are not allowed).
13
13
  #
14
- # @overload prefetch(identifier:, type:, timeout_ms: nil, request_options: {})
14
+ # @overload prefetch(identifier:, type:, tags: nil, timeout_ms: nil, request_options: {})
15
15
  #
16
16
  # @param identifier [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier] Identifier of the brand to prefetch. Provide exactly one of domain or email.
17
17
  #
18
18
  # @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch. Currently only 'brand' is supported.
19
19
  #
20
+ # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
21
+ #
20
22
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
21
23
  #
22
24
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -9,7 +9,7 @@ module ContextDev
9
9
  # Crawl a website, use the provided JSON Schema and instructions to prioritize
10
10
  # relevant internal links, and extract structured data from the selected pages.
11
11
  #
12
- # @overload extract(schema:, url:, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, stop_after_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
12
+ # @overload extract(schema:, url:, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, stop_after_ms: nil, tags: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
13
13
  #
14
14
  # @param schema [Hash{Symbol=>Object}] JSON Schema for the returned data object. TypeScript Zod users can pass a JSON S
15
15
  #
@@ -31,8 +31,12 @@ module ContextDev
31
31
  #
32
32
  # @param pdf [ContextDev::Models::WebExtractParams::Pdf]
33
33
  #
34
+ # @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
35
+ #
34
36
  # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (1
35
37
  #
38
+ # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
39
+ #
36
40
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
37
41
  #
38
42
  # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load for each craw
@@ -59,12 +63,14 @@ module ContextDev
59
63
  # Analyze a company's landing page and web search evidence to return direct
60
64
  # competitors for the same product or market.
61
65
  #
62
- # @overload extract_competitors(domain:, num_competitors: nil, timeout_ms: nil, request_options: {})
66
+ # @overload extract_competitors(domain:, num_competitors: nil, tags: nil, timeout_ms: nil, request_options: {})
63
67
  #
64
68
  # @param domain [String] Company domain to analyze, such as `stripe.com`. Full http(s) URLs are accepted
65
69
  #
66
70
  # @param num_competitors [Integer] Exact number of direct competitors to return. Defaults to 5.
67
71
  #
72
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
73
+ #
68
74
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
69
75
  #
70
76
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -90,13 +96,15 @@ module ContextDev
90
96
  # Scrape font information from a website including font families, usage
91
97
  # statistics, fallbacks, and element/word counts.
92
98
  #
93
- # @overload extract_fonts(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
99
+ # @overload extract_fonts(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {})
94
100
  #
95
101
  # @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
96
102
  #
97
103
  # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
98
104
  #
99
- # @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre
105
+ # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard
106
+ #
107
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
100
108
  #
101
109
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
102
110
  #
@@ -127,7 +135,7 @@ module ContextDev
127
135
  # Extract a comprehensive design system from a website including colors,
128
136
  # typography, spacing, shadows, and UI components.
129
137
  #
130
- # @overload extract_styleguide(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
138
+ # @overload extract_styleguide(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {})
131
139
  #
132
140
  # @param color_scheme [Symbol, ContextDev::Models::WebExtractStyleguideParams::ColorScheme] Optional browser color scheme to emulate for websites that respond to prefers-co
133
141
  #
@@ -135,7 +143,9 @@ module ContextDev
135
143
  #
136
144
  # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
137
145
  #
138
- # @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre
146
+ # @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard
147
+ #
148
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
139
149
  #
140
150
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
141
151
  #
@@ -166,11 +176,11 @@ module ContextDev
166
176
  #
167
177
  # Capture a screenshot of a website.
168
178
  #
169
- # @overload screenshot(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
179
+ # @overload screenshot(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {})
170
180
  #
171
181
  # @param color_scheme [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig
172
182
  #
173
- # @param country [Symbol, ContextDev::Models::WebScreenshotParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
183
+ # @param country [Symbol, ContextDev::Models::WebScreenshotParams::Country] Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev r
174
184
  #
175
185
  # @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https
176
186
  #
@@ -178,19 +188,23 @@ module ContextDev
178
188
  #
179
189
  # @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
180
190
  #
181
- # @param handle_cookie_popup [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi
191
+ # @param handle_cookie_popup [Boolean, Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi
182
192
  #
183
- # @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
193
+ # @param max_age_ms [Integer, nil] Return a cached screenshot if a prior screenshot for the same parameters exists
184
194
  #
185
195
  # @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
186
196
  #
187
- # @param scroll_offset [Integer] Optional vertical scroll offset in pixels for capturing a long page in viewport-
197
+ # @param scroll_offset [Integer, nil] Optional vertical scroll offset in pixels for capturing a long page in viewport-
198
+ #
199
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
188
200
  #
189
201
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
190
202
  #
191
203
  # @param viewport [ContextDev::Models::WebScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
192
204
  #
193
- # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before taking
205
+ # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before taking
206
+ #
207
+ # @param zdr [Symbol, ContextDev::Models::WebScreenshotParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
194
208
  #
195
209
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
196
210
  #
@@ -223,7 +237,7 @@ module ContextDev
223
237
  #
224
238
  # Search the web and optionally scrape each result to Markdown in one round-trip.
225
239
  #
226
- # @overload search(query:, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, num_results: nil, query_fanout: nil, timeout_ms: nil, request_options: {})
240
+ # @overload search(query:, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, num_results: nil, query_fanout: nil, tags: nil, timeout_ms: nil, request_options: {})
227
241
  #
228
242
  # @param query [String] Search query. Accepts natural language as well as Google-style search operators
229
243
  #
@@ -241,6 +255,8 @@ module ContextDev
241
255
  #
242
256
  # @param query_fanout [Boolean] Expand the query into multiple parallel variants for broader recall.
243
257
  #
258
+ # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
259
+ #
244
260
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
245
261
  #
246
262
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -265,7 +281,7 @@ module ContextDev
265
281
  # Performs a crawl starting from a given URL, extracts page content as Markdown,
266
282
  # and returns results for all crawled pages.
267
283
  #
268
- # @overload web_crawl_md(url:, country: nil, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
284
+ # @overload web_crawl_md(url:, country: nil, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, stop_after_ms: nil, tags: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {})
269
285
  #
270
286
  # @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
271
287
  #
@@ -297,6 +313,8 @@ module ContextDev
297
313
  #
298
314
  # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. After each scrape, the crawler c
299
315
  #
316
+ # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
317
+ #
300
318
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
301
319
  #
302
320
  # @param url_regex [String] Regex pattern. Only URLs matching this pattern will be followed and scraped.
@@ -305,6 +323,8 @@ module ContextDev
305
323
  #
306
324
  # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load for each craw
307
325
  #
326
+ # @param zdr [Symbol, ContextDev::Models::WebWebCrawlMdParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
327
+ #
308
328
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
309
329
  #
310
330
  # @return [ContextDev::Models::WebWebCrawlMdResponse]
@@ -324,33 +344,40 @@ module ContextDev
324
344
  # Some parameter documentations has been truncated, see
325
345
  # {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
326
346
  #
327
- # Scrapes the given URL and returns the raw HTML content of the page.
347
+ # Scrapes the given URL and returns the raw HTML content of the page. The base
348
+ # request costs 1 credit; requests with browser actions cost 2 credits.
328
349
  #
329
- # @overload web_scrape_html(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
350
+ # @overload web_scrape_html(url:, actions: nil, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, tags: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {})
330
351
  #
331
352
  # @param url [String] Full URL to scrape (must include http:// or https:// protocol)
332
353
  #
333
- # @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
354
+ # @param actions [Array<ContextDev::Models::WebWebScrapeHTMLParams::Action::Wait, ContextDev::Models::WebWebScrapeHTMLParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
355
+ #
356
+ # @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev r
334
357
  #
335
- # @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
358
+ # @param exclude_selectors [Array<String>, nil] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
336
359
  #
337
360
  # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
338
361
  #
339
- # @param include_frames [Boolean] When true, iframes are rendered inline into the returned HTML.
362
+ # @param include_frames [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::IncludeFrames] When true, iframes are rendered inline into the returned HTML.
340
363
  #
341
- # @param include_selectors [Array<String>] CSS selectors. When provided, only matching subtrees (and their descendants) are
364
+ # @param include_selectors [Array<String>, nil] CSS selectors. When provided, only matching subtrees (and their descendants) are
342
365
  #
343
- # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
366
+ # @param max_age_ms [Integer, nil] Return a cached result if a prior scrape for the same parameters exists and is y
344
367
  #
345
368
  # @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
346
369
  #
347
- # @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
370
+ # @param settle_animations [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::SettleAnimations] When true, waits briefly for CSS and transition animations to settle before extr
371
+ #
372
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
348
373
  #
349
374
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
350
375
  #
351
- # @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
376
+ # @param use_main_content_only [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::UseMainContentOnly] When true, return only the page's main content in the HTML response, excluding h
352
377
  #
353
- # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
378
+ # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
379
+ #
380
+ # @param zdr [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
354
381
  #
355
382
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
356
383
  #
@@ -383,24 +410,29 @@ module ContextDev
383
410
  #
384
411
  # Extract image assets from a web page, including standard URLs, inline SVGs, data
385
412
  # URIs, responsive image sources, metadata, CSS backgrounds, video posters, and
386
- # embeds. The base request costs 1 credit. When enrichment is enabled, the entire
387
- # call costs 5 credits.
413
+ # embeds. The base request costs 1 credit, or 2 credits with browser actions. When
414
+ # enrichment is enabled, the entire call costs 5 credits, including requests that
415
+ # also use actions.
388
416
  #
389
- # @overload web_scrape_images(url:, dedupe: nil, enrichment: nil, headers: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
417
+ # @overload web_scrape_images(url:, actions: nil, dedupe: nil, enrichment: nil, headers: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
390
418
  #
391
419
  # @param url [String] Page URL to inspect. Must include http:// or https://.
392
420
  #
393
- # @param dedupe [Boolean] When true, visually duplicate images are removed: every image is loaded and perc
421
+ # @param actions [Array<ContextDev::Models::WebWebScrapeImagesParams::Action::Wait, ContextDev::Models::WebWebScrapeImagesParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
422
+ #
423
+ # @param dedupe [Boolean, Symbol, ContextDev::Models::WebWebScrapeImagesParams::Dedupe] When true, visually duplicate images are removed: every image is loaded and perc
394
424
  #
395
- # @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
425
+ # @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment, nil] Optional per-image processing, sent as deep-object query params such as enrichme
396
426
  #
397
427
  # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
398
428
  #
399
- # @param max_age_ms [Integer] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
429
+ # @param max_age_ms [Integer, nil] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
430
+ #
431
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
400
432
  #
401
433
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
402
434
  #
403
- # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before collec
435
+ # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before collec
404
436
  #
405
437
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
406
438
  #
@@ -432,48 +464,54 @@ module ContextDev
432
464
  #
433
465
  # ### Billing & errors
434
466
  #
435
- # | HTTP status | Billed? | Meaning |
436
- # | ----------- | -------------- | ---------------------------------------------------------------------------------------- |
437
- # | 200 | Yes — 1 credit | Successful scrape, including a zero-length result when includeSelectors matched nothing |
438
- # | 400 | No | Invalid input, skipped PDF, or the page could not be scraped |
439
- # | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
440
- # | 404 | No | Target page returned or fingerprinted as not found |
441
- # | 408 | No | Request timed out |
442
- # | 415 | No | Unsupported content type |
443
- # | 429 | No | Per-minute rate limit exceeded; honor Retry-After |
444
- # | 500 | No | Internal error |
467
+ # | HTTP status | Billed? | Meaning |
468
+ # | ----------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- |
469
+ # | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing |
470
+ # | 400 | No | Invalid input, skipped PDF, or the page could not be scraped |
471
+ # | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
472
+ # | 404 | No | Target page returned or fingerprinted as not found |
473
+ # | 408 | No | Request timed out |
474
+ # | 415 | No | Unsupported content type |
475
+ # | 429 | No | Per-minute rate limit exceeded; honor Retry-After |
476
+ # | 500 | No | Internal error |
445
477
  #
446
- # @overload web_scrape_md(url:, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
478
+ # @overload web_scrape_md(url:, actions: nil, country: nil, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, settle_animations: nil, shorten_base64_images: nil, tags: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, zdr: nil, request_options: {})
447
479
  #
448
480
  # @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
449
481
  #
450
- # @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
482
+ # @param actions [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
483
+ #
484
+ # @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev r
451
485
  #
452
- # @param exclude_selectors [Array<String>] CSS selectors to remove before conversion to Markdown. Applied after includeSele
486
+ # @param exclude_selectors [Array<String>, nil] CSS selectors to remove before conversion to Markdown. Applied after includeSele
453
487
  #
454
488
  # @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
455
489
  #
456
- # @param include_frames [Boolean] When true, the contents of iframes are rendered to Markdown.
490
+ # @param include_frames [Boolean, Symbol, ContextDev::Models::WebWebScrapeMdParams::IncludeFrames] When true, the contents of iframes are rendered to Markdown.
457
491
  #
458
- # @param include_images [Boolean] Include image references in Markdown output
492
+ # @param include_images [Boolean, Symbol, ContextDev::Models::WebWebScrapeMdParams::IncludeImages] Include image references in Markdown output
459
493
  #
460
- # @param include_links [Boolean] Preserve hyperlinks in Markdown output
494
+ # @param include_links [Boolean, Symbol, ContextDev::Models::WebWebScrapeMdParams::IncludeLinks] Preserve hyperlinks in Markdown output
461
495
  #
462
- # @param include_selectors [Array<String>] CSS selectors. When provided, only matching HTML subtrees (and their descendants
496
+ # @param include_selectors [Array<String>, nil] CSS selectors. When provided, only matching HTML subtrees (and their descendants
463
497
  #
464
- # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
498
+ # @param max_age_ms [Integer, nil] Return a cached result if a prior scrape for the same parameters exists and is y
465
499
  #
466
500
  # @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
467
501
  #
468
- # @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before conv
502
+ # @param settle_animations [Boolean, Symbol, ContextDev::Models::WebWebScrapeMdParams::SettleAnimations] When true, waits briefly for CSS and transition animations to settle before conv
503
+ #
504
+ # @param shorten_base64_images [Boolean, Symbol, ContextDev::Models::WebWebScrapeMdParams::ShortenBase64Images] Shorten base64-encoded image data in the Markdown output
469
505
  #
470
- # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
506
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
471
507
  #
472
508
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
473
509
  #
474
- # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars,
510
+ # @param use_main_content_only [Boolean, Symbol, ContextDev::Models::WebWebScrapeMdParams::UseMainContentOnly] Extract only the main content of the page, excluding headers, footers, sidebars,
475
511
  #
476
- # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before conver
512
+ # @param wait_for_ms [Integer, nil] Optional browser wait time in milliseconds after initial page load before conver
513
+ #
514
+ # @param zdr [Symbol, ContextDev::Models::WebWebScrapeMdParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
477
515
  #
478
516
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
479
517
  #
@@ -509,7 +547,7 @@ module ContextDev
509
547
  #
510
548
  # Crawl an entire website's sitemap and return all discovered page URLs.
511
549
  #
512
- # @overload web_scrape_sitemap(domain:, headers: nil, max_links: nil, timeout_ms: nil, url_regex: nil, request_options: {})
550
+ # @overload web_scrape_sitemap(domain:, headers: nil, max_links: nil, sitemap_url: nil, tags: nil, timeout_ms: nil, url_regex: nil, zdr: nil, request_options: {})
513
551
  #
514
552
  # @param domain [String] Domain to build a sitemap for
515
553
  #
@@ -517,10 +555,16 @@ module ContextDev
517
555
  #
518
556
  # @param max_links [Integer] Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Mi
519
557
  #
558
+ # @param sitemap_url [String] Optional explicit sitemap URL. When provided, exactly this sitemap is crawled in
559
+ #
560
+ # @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
561
+ #
520
562
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
521
563
  #
522
564
  # @param url_regex [String] Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur
523
565
  #
566
+ # @param zdr [Symbol, ContextDev::Models::WebWebScrapeSitemapParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
567
+ #
524
568
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
525
569
  #
526
570
  # @return [ContextDev::Models::WebWebScrapeSitemapResponse]
@@ -532,7 +576,12 @@ module ContextDev
532
576
  @client.request(
533
577
  method: :get,
534
578
  path: "web/scrape/sitemap",
535
- query: query.transform_keys(max_links: "maxLinks", timeout_ms: "timeoutMS", url_regex: "urlRegex"),
579
+ query: query.transform_keys(
580
+ max_links: "maxLinks",
581
+ sitemap_url: "sitemapUrl",
582
+ timeout_ms: "timeoutMS",
583
+ url_regex: "urlRegex"
584
+ ),
536
585
  model: ContextDev::Models::WebWebScrapeSitemapResponse,
537
586
  options: options
538
587
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextDev
4
- VERSION = "2.3.0"
4
+ VERSION = "2.5.0"
5
5
  end