Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
feat(api): sunset /extract on 2026-12-10 and point it at its migration guide (#5607)
Gergő Móricz394aba10e8b0
diff --git a/apps/api/src/__tests__/routes/deprecations-existing-routes.routes.test.ts b/apps/api/src/__tests__/routes/deprecations-existing-routes.routes.test.tsindex e20c81ed9..596fb1b2a 100644--- a/apps/api/src/__tests__/routes/deprecations-existing-routes.routes.test.ts+++ b/apps/api/src/__tests__/routes/deprecations-existing-routes.routes.test.ts@@ -23,6 +23,7 @@ type Key = keyof typeof EXISTING;const V0_GUIDE = "https://docs.firecrawl.dev/migrating-from-v0";const V0_SUNSET = "Thu, 10 Dec 2026 15:00:00 GMT";+const EXTRACT_SUNSET = "Thu, 10 Dec 2026 15:00:00 GMT";// What the old middleware did, replayed on a copy, so we can compare bytes.function legacyAnnotate(body: any, message: string, replacement?: string) {@@ -51,7 +52,7 @@ const BODIES: Record<string, unknown> = {};describe("pre-existing deprecated routes are unchanged", () => {- // Before the v0 sunset, so every route still serves.+ // Before the v0 and extract sunsets, so every route still serves.beforeEach(() => {vi.useFakeTimers({ toFake: ["Date"] });vi.setSystemTime(new Date("2026-11-01T00:00:00Z"));@@ -63,12 +64,16 @@ describe("pre-existing deprecated routes are unchanged", () => {for (const key of Object.keys(EXISTING) as Key[]) {describe(key, () => {- it("emits the shared 2026-05-06 Deprecation date, and a Sunset only on v0", async () => {+ it("emits the shared 2026-05-06 Deprecation date, and a Sunset only on v0 and extract", async () => {const res = await request(appFor(key, BODIES.plain)).get("/probe");expect(res.headers["deprecation"]).toBe(LEGACY_DEPRECATED_AT);expect(res.headers["sunset"]).toBe(- key.startsWith("v0_") ? V0_SUNSET : undefined,+ key.startsWith("v0_")+ ? V0_SUNSET+ : key.includes("extract")+ ? EXTRACT_SUNSET+ : undefined,);expect(res.headers["warning"]).toMatch(/^299 - "/);if (key.startsWith("v0_")) {@@ -77,8 +82,11 @@ describe("pre-existing deprecated routes are unchanged", () => {`<${V0_GUIDE}>; rel="deprecation", <${EXISTING[key]}>; rel="successor-version"`,);} else if (EXISTING[key]) {+ const docsLink = key.includes("extract")+ ? `<https://docs.firecrawl.dev/migrating-from-extract>; rel="deprecation", `+ : "";expect(res.headers["link"]).toBe(- `<${EXISTING[key]}>; rel="successor-version"`,+ `${docsLink}<${EXISTING[key]}>; rel="successor-version"`,);} else {expect(res.headers["link"]).toBeUndefined();diff --git a/apps/api/src/__tests__/routes/deprecations-sunset.routes.test.ts b/apps/api/src/__tests__/routes/deprecations-sunset.routes.test.tsindex 67e325e13..499b09f01 100644--- a/apps/api/src/__tests__/routes/deprecations-sunset.routes.test.ts+++ b/apps/api/src/__tests__/routes/deprecations-sunset.routes.test.ts@@ -13,7 +13,7 @@ import {sunsetInstant,} from "../../lib/deprecations";-// The only entry with a sunset today: Tue, 03 Nov 2026 23:59:59 GMT.+// An entry whose sunset has passed: Tue, 03 Nov 2026 23:59:59 GMT.const SUNSET_KEY = "v2_research_github_search";const BEFORE_SUNSET = new Date("2026-11-01T00:00:00Z");const AFTER_SUNSET = new Date("2026-11-10T00:00:00Z");diff --git a/apps/api/src/lib/deprecations.ts b/apps/api/src/lib/deprecations.tsindex faa62a39d..8ce030db3 100644--- a/apps/api/src/lib/deprecations.ts+++ b/apps/api/src/lib/deprecations.ts@@ -37,27 +37,39 @@ const V1 = {const DEPRECATIONS = {v1_extract: {message:- "/v1/extract is deprecated. Use /v2/scrape with formats including a 'json' format object.",+ "/v1/extract is deprecated. Use /v2/scrape with a 'json' format for a single page, or /v2/agent for wildcard URLs, web search or one answer across several pages. See https://docs.firecrawl.dev/migrating-from-extract.",replacement: "/v2/scrape",deprecatedAt: "@1778025600",+ sunset: "Thu, 10 Dec 2026 15:00:00 GMT",+ docs: "https://docs.firecrawl.dev/migrating-from-extract",+ surface: "extract",},v1_extract_status: {message:- "/v1/extract/:jobId is deprecated. Use /v2/scrape with formats including a 'json' format object.",+ "/v1/extract/:jobId is deprecated. Use /v2/scrape with a 'json' format for a single page, or /v2/agent for wildcard URLs, web search or one answer across several pages. See https://docs.firecrawl.dev/migrating-from-extract.",replacement: "/v2/scrape",deprecatedAt: "@1778025600",+ sunset: "Thu, 10 Dec 2026 15:00:00 GMT",+ docs: "https://docs.firecrawl.dev/migrating-from-extract",+ surface: "extract",},v2_extract: {message:- "/v2/extract is deprecated. Use /v2/scrape with formats including a 'json' format object.",+ "/v2/extract is deprecated. Use /v2/scrape with a 'json' format for a single page, or /v2/agent for wildcard URLs, web search or one answer across several pages. See https://docs.firecrawl.dev/migrating-from-extract.",replacement: "/v2/scrape",deprecatedAt: "@1778025600",+ sunset: "Thu, 10 Dec 2026 15:00:00 GMT",+ docs: "https://docs.firecrawl.dev/migrating-from-extract",+ surface: "extract",},v2_extract_status: {message:- "/v2/extract/:jobId is deprecated. Use /v2/scrape with formats including a 'json' format object.",+ "/v2/extract/:jobId is deprecated. Use /v2/scrape with a 'json' format for a single page, or /v2/agent for wildcard URLs, web search or one answer across several pages. See https://docs.firecrawl.dev/migrating-from-extract.",replacement: "/v2/scrape",deprecatedAt: "@1778025600",+ sunset: "Thu, 10 Dec 2026 15:00:00 GMT",+ docs: "https://docs.firecrawl.dev/migrating-from-extract",+ surface: "extract",},v2_research_github_search: {message: