Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.10.0"
".": "2.11.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 40
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-a0dda03bbb600917cfb9add468cc4c8c84351a8dbbf61644dbc353263ca1748f.yml
openapi_spec_hash: c24264f32a46d9317aac5af9d6a396f7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-7f75f39699c1298d16691b5a58b1312a229b78288fba6e2de4040ba1422e530f.yml
openapi_spec_hash: b3ad781596e4c52fde918cfaae54a5d4
config_hash: 920678668dd2da6f8966fbf1b8fde4e2
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 2.11.0 (2026-08-10)

Full Changelog: [v2.10.0...v2.11.0](https://github.com/context-dot-dev/context-typescript-sdk/compare/v2.10.0...v2.11.0)

### Features

* **api:** api update ([fd6690d](https://github.com/context-dot-dev/context-typescript-sdk/commit/fd6690d37c59c46a8e34bc497dfe6013cb20f434))
* **api:** api update ([ac230f1](https://github.com/context-dot-dev/context-typescript-sdk/commit/ac230f179b78122b5c1c604dbf78ed7ee915d979))

## 2.10.0 (2026-08-07)

Full Changelog: [v2.9.0...v2.10.0](https://github.com/context-dot-dev/context-typescript-sdk/compare/v2.9.0...v2.10.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context.dev",
"version": "2.10.0",
"version": "2.11.0",
"description": "The official TypeScript library for the Context Dev API",
"author": "Context Dev <hello@context.dev>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "context.dev-mcp",
"version": "2.10.0",
"version": "2.11.0",
"description": "The official MCP Server for the Context Dev API",
"author": {
"name": "Context Dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context.dev-mcp",
"version": "2.10.0",
"version": "2.11.0",
"description": "The official MCP Server for the Context Dev API",
"author": "Context Dev <hello@context.dev>",
"types": "dist/index.d.ts",
Expand Down
37 changes: 19 additions & 18 deletions packages/mcp-server/src/local-docs-search.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'context_dev_api',
version: '2.10.0',
version: '2.11.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
33 changes: 32 additions & 1 deletion src/resources/batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,8 @@ export namespace BatchGetResultsResponse {
url: string;

/**
* Raw page HTML. Present on html batches.
* Page HTML. Present on html batches, and on markdown batches submitted with
* `options.includeHTML`.
*/
html?: string;

Expand Down Expand Up @@ -969,6 +970,12 @@ export namespace BatchGetResultsResponse {
*/
favicon?: string;

/**
* Page headings (h1–h6) in document order, extracted from the unfiltered document.
* Capped at the first 500 headings. Omitted when the page has none.
*/
headings?: Array<Metadata.Heading>;

/**
* Primary resolved preview image from Open Graph, Twitter, or image metadata.
*/
Expand Down Expand Up @@ -1047,6 +1054,18 @@ export namespace BatchGetResultsResponse {
*/
type?: string;
}

export interface Heading {
/**
* Heading level, 1–6 (from h1–h6).
*/
level: number;

/**
* Heading text with whitespace collapsed, truncated to 1000 characters.
*/
text: string;
}
}
}

Expand Down Expand Up @@ -1555,6 +1574,12 @@ export namespace BatchSubmitParams {
*/
excludeSelectors?: Array<string> | null;

/**
* Also include each page's HTML in its result record, as an `html` field alongside
* the Markdown.
*/
includeHTML?: boolean;

/**
* Include image references in the Markdown.
*/
Expand Down Expand Up @@ -2318,6 +2343,12 @@ export namespace BatchSubmitParams {
*/
excludeSelectors?: Array<string> | null;

/**
* Also include each page's HTML in its result record, as an `html` field alongside
* the Markdown.
*/
includeHTML?: boolean;

/**
* Include image references in the Markdown.
*/
Expand Down
33 changes: 17 additions & 16 deletions src/resources/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { RequestOptions } from '../internal/request-options';

export class Utility extends APIResource {
/**
* Signal that you may fetch brand data soon to improve latency. The type field
* selects what to prefetch (currently only 'brand') and identifier carries exactly
* one lookup key: a domain, or an email whose domain is extracted and validated
* (free email providers and disposable email addresses are not allowed).
* Signal that you may fetch data soon to improve latency. The type field selects
* what to prefetch ('brand' queues a brand data fetch, 'styleguide' queues a
* styleguide extraction) and identifier carries exactly one lookup key: a domain,
* or an email whose domain is extracted and validated (free email providers and
* disposable email addresses are not allowed).
*
* @example
* ```ts
Expand Down Expand Up @@ -47,10 +48,9 @@ export interface UtilityPrefetchResponse {
status?: string;

/**
* The type of prefetch that was queued, echoed from the request (currently always
* 'brand')
* The type of prefetch that was queued, echoed from the request
*/
type?: 'brand';
type?: 'brand' | 'styleguide';
}

export namespace UtilityPrefetchResponse {
Expand All @@ -73,16 +73,17 @@ export namespace UtilityPrefetchResponse {

export interface UtilityPrefetchParams {
/**
* Identifier of the brand to prefetch. Provide exactly one of domain or email.
* Identifier of the target to prefetch. Provide exactly one of domain or email.
*/
identifier:
| UtilityPrefetchParams.UtilityPrefetchDomainIdentifier
| UtilityPrefetchParams.UtilityPrefetchEmailIdentifier;

/**
* What to prefetch. Currently only 'brand' is supported.
* What to prefetch: 'brand' warms the brand data cache, 'styleguide' warms the
* styleguide cache.
*/
type: 'brand';
type: 'brand' | 'styleguide';

/**
* Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
Expand All @@ -99,23 +100,23 @@ export interface UtilityPrefetchParams {

export namespace UtilityPrefetchParams {
/**
* Prefetch brand data by domain.
* Prefetch by domain.
*/
export interface UtilityPrefetchDomainIdentifier {
/**
* Domain name to prefetch brand data for
* Domain name to prefetch data for
*/
domain: string;
}

/**
* Prefetch brand data by email. The domain will be extracted and validated.
* Prefetch by email. The domain will be extracted and validated.
*/
export interface UtilityPrefetchEmailIdentifier {
/**
* Email address to prefetch brand data for. The domain will be extracted from the
* email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
* addresses are not allowed.
* Email address to prefetch data for. The domain will be extracted from the email.
* Free email providers (gmail.com, yahoo.com, etc.) and disposable email addresses
* are not allowed.
*/
email: string;
}
Expand Down
90 changes: 79 additions & 11 deletions src/resources/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,17 @@ export class Web extends APIResource {
*
* ### Billing & errors
*
* | HTTP status | Billed? | Meaning |
* | ----------- | ----------------------------------------- | ---------------------------------------------------------------------------------------- |
* | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing |
* | 400 | No | Invalid input, skipped PDF, or the page could not be scraped |
* | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
* | 404 | No | Target page returned or fingerprinted as not found |
* | 408 | No | Request timed out |
* | 413 | No | Target content exceeds the maximum supported size (20 MB) |
* | 415 | No | Unsupported content type |
* | 429 | No | Per-minute rate limit exceeded; honor Retry-After |
* | 500 | No | Internal error |
* | HTTP status | Billed? | Meaning |
* | ----------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
* | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing |
* | 400 | No | Invalid input, skipped PDF, or the page could not be scraped. error_code WEBSITE_BLOCKED specifically means the site answered with an anti-bot challenge, CAPTCHA wall, or login shell instead of the page (even when the site returned HTTP 200) — retrying later or from another country sometimes succeeds |
* | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
* | 404 | No | Target page returned or fingerprinted as not found |
* | 408 | No | Request timed out |
* | 413 | No | Target content exceeds the maximum supported size (20 MB) |
* | 415 | No | Unsupported content type |
* | 429 | No | Per-minute rate limit exceeded; honor Retry-After |
* | 500 | No | Internal error |
*
* @example
* ```ts
Expand Down Expand Up @@ -1296,6 +1296,12 @@ export namespace WebWebCrawlMdResponse {
*/
favicon?: string;

/**
* Page headings (h1–h6) in document order, extracted from the unfiltered document.
* Capped at the first 500 headings. Omitted when the page has none.
*/
headings?: Array<Metadata.Heading>;

/**
* Primary resolved preview image from Open Graph, Twitter, or image metadata.
*/
Expand Down Expand Up @@ -1369,6 +1375,18 @@ export namespace WebWebCrawlMdResponse {
*/
type?: string;
}

export interface Heading {
/**
* Heading level, 1–6 (from h1–h6).
*/
level: number;

/**
* Heading text with whitespace collapsed, truncated to 1000 characters.
*/
text: string;
}
}
}

Expand Down Expand Up @@ -1498,6 +1516,12 @@ export namespace WebWebScrapeHTMLResponse {
*/
favicon?: string;

/**
* Page headings (h1–h6) in document order, extracted from the unfiltered document.
* Capped at the first 500 headings. Omitted when the page has none.
*/
headings?: Array<Metadata.Heading>;

/**
* Primary resolved preview image from Open Graph, Twitter, or image metadata.
*/
Expand Down Expand Up @@ -1576,6 +1600,18 @@ export namespace WebWebScrapeHTMLResponse {
*/
type?: string;
}

export interface Heading {
/**
* Heading level, 1–6 (from h1–h6).
*/
level: number;

/**
* Heading text with whitespace collapsed, truncated to 1000 characters.
*/
text: string;
}
}

export interface ActionsApplied {
Expand Down Expand Up @@ -1757,6 +1793,13 @@ export interface WebWebScrapeMdResponse {
*/
actionsHtmlStale?: boolean;

/**
* Only present when includeHTML=true: the page HTML the Markdown was converted
* from — the same body the Scrape HTML endpoint returns for the equivalent
* request.
*/
html?: string;

/**
* Metadata about the API key used for the request. Included in every response
* whenever a valid API key is provided, even when the response status is not 200.
Expand Down Expand Up @@ -1810,6 +1853,12 @@ export namespace WebWebScrapeMdResponse {
*/
favicon?: string;

/**
* Page headings (h1–h6) in document order, extracted from the unfiltered document.
* Capped at the first 500 headings. Omitted when the page has none.
*/
headings?: Array<Metadata.Heading>;

/**
* Primary resolved preview image from Open Graph, Twitter, or image metadata.
*/
Expand Down Expand Up @@ -1888,6 +1937,18 @@ export namespace WebWebScrapeMdResponse {
*/
type?: string;
}

export interface Heading {
/**
* Heading level, 1–6 (from h1–h6).
*/
level: number;

/**
* Heading text with whitespace collapsed, truncated to 1000 characters.
*/
text: string;
}
}

export interface ActionsApplied {
Expand Down Expand Up @@ -4007,6 +4068,13 @@ export interface WebWebScrapeMdParams {
*/
includeFrames?: boolean | 'true' | 'false';

/**
* When true, the response also includes an `html` field with the page HTML the
* Markdown was converted from — the same body the Scrape HTML endpoint returns for
* the equivalent request.
*/
includeHTML?: boolean | 'true' | 'false';

/**
* Include image references in Markdown output
*/
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '2.10.0'; // x-release-please-version
export const VERSION = '2.11.0'; // x-release-please-version
1 change: 1 addition & 0 deletions tests/api-resources/batch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ describe('resource batch', () => {
options: {
country: 'de',
excludeSelectors: ['x'],
includeHTML: true,
includeImages: true,
includeLinks: true,
includeSelectors: ['x'],
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/web.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ describe('resource web', () => {
excludeSelectors: ['x'],
headers: { foo: 'J!' },
includeFrames: 'true',
includeHTML: 'true',
includeImages: 'true',
includeLinks: 'true',
includeSelectors: ['x'],
Expand Down
Loading