Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

chore(api): remove the research category change notice (#5644)

Kris Oei474524586521
diff --git a/apps/api/src/__tests__/routes/search-research-category-notice.routes.test.ts b/apps/api/src/__tests__/routes/search-research-category-notice.routes.test.ts
deleted file mode 100644
index 9f57133b1..000000000
--- a/apps/api/src/__tests__/routes/search-research-category-notice.routes.test.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import express from "express";
-import request from "supertest";
-import { researchCategoryNoticeMiddleware } from "../../controllers/v2/search";
-
-// The snips cover the live route; this pins the shapes of `categories` the
-// middleware must and must not react to, which need no search provider.
-const app = express();
-app.use(express.json());
-app.post("/v2/search", researchCategoryNoticeMiddleware, (_req, res) => {
- res.status(200).json({ success: true, data: {}, creditsUsed: 0, id: "x" });
-});
-
-async function post(categories: unknown) {
- return request(app).post("/v2/search").send({ query: "x", categories });
-}
-
-describe("research category notice", () => {
- it("sets the header and the body warning, nothing else", async () => {
- const res = await post(["research"]);
-
- expect(res.statusCode).toBe(200);
- expect(res.headers["warning"]).toMatch(/^299 - "/);
- expect(res.headers["warning"]).toContain("2026-11-16");
- expect(res.headers["deprecation"]).toBeUndefined();
- expect(res.headers["sunset"]).toBeUndefined();
- expect(res.headers["link"]).toBe(
- '<https://docs.firecrawl.dev/features/research>; rel="help"',
- );
- expect(res.body.warnings).toHaveLength(1);
- expect(res.body.warnings[0]).toContain("data.research");
- expect(res.body.replacement).toBeUndefined();
- });
-
- it.each([
- [[{ type: "research" }]],
- [["research", "pdf"]],
- [["github", { type: "research" }]],
- ])("fires for %j", async categories => {
- const res = await post(categories);
- expect(res.body.warnings).toHaveLength(1);
- });
-
- it.each([
- [undefined],
- [[]],
- [["github"]],
- [["pdf"]],
- [["developer"]],
- [["gov"]],
- ["research"],
- [[null, 7]],
- ])("stays silent for %j", async categories => {
- const res = await post(categories);
- expect(res.headers["warning"]).toBeUndefined();
- expect(res.body).not.toHaveProperty("warnings");
- });
-});
diff --git a/apps/api/src/__tests__/snips/v2/search.test.ts b/apps/api/src/__tests__/snips/v2/search.test.ts
index 543e06b12..b658ebe57 100644
--- a/apps/api/src/__tests__/snips/v2/search.test.ts
+++ b/apps/api/src/__tests__/snips/v2/search.test.ts
@@ -425,68 +425,3 @@ describeIf(TEST_PRODUCTION || HAS_SEARCH || HAS_PROXY)("Search tests", () => {
60000,
);
});
-
-describeIf(TEST_PRODUCTION || HAS_SEARCH || HAS_PROXY)(
- "research category notice",
- () => {
- it.concurrent(
- "carries the notice on every response that uses the category",
- async () => {
- const raw = await searchRaw(
- { query: "firecrawl", categories: ["research"] },
- identity,
- );
- expect(raw.statusCode).toBe(200);
- expect(raw.headers["warning"]).toMatch(/^299 - "/);
- expect(raw.headers["link"]).toContain(
- "https://docs.firecrawl.dev/features/research",
- );
- expect(raw.body.warnings).toHaveLength(1);
- expect(raw.body.warnings[0]).toContain("2026-11-16");
- },
- 60000,
- );
-
- it.concurrent(
- "reaches requests the schema rejects",
- async () => {
- const raw = await searchRaw(
- { query: "firecrawl", categories: ["research"], limit: 0 },
- identity,
- );
- expect(raw.statusCode).toBe(400);
- expect(raw.body.success).toBe(false);
- expect(raw.body.warnings).toHaveLength(1);
- },
- 60000,
- );
-
- concurrentIf(TEST_PRODUCTION)(
- "reaches requests auth rejects",
- async () => {
- const raw = await searchRaw(
- { query: "firecrawl", categories: ["research"] },
- { apiKey: "invalid-api-key", teamId: "" },
- );
- expect(raw.statusCode).toBe(401);
- expect(raw.headers["warning"]).toContain("2026-11-16");
- expect(raw.body.warnings).toHaveLength(1);
- },
- 60000,
- );
-
- it.concurrent(
- "stays silent for every other category",
- async () => {
- const raw = await searchRaw(
- { query: "firecrawl", categories: ["pdf"] },
- identity,
- );
- expect(raw.statusCode).toBe(200);
- expect(raw.headers["warning"]).toBeUndefined();
- expect(raw.body.warnings).toBeUndefined();
- },
- 60000,
- );
- },
-);
diff --git a/apps/api/src/controllers/v2/search.ts b/apps/api/src/controllers/v2/search.ts
index 5e898a606..ffe06a9be 100644
--- a/apps/api/src/controllers/v2/search.ts
+++ b/apps/api/src/controllers/v2/search.ts
@@ -1,4 +1,4 @@
-import { NextFunction, Request, Response } from "express";
+import { Response } from "express";
import { externalRequestId } from "../../lib/external-request-id";
import { config } from "../../config";
import { timingSafeSecretEqual } from "../../lib/secret-compare";
@@ -63,7 +63,6 @@ import {
} from "../../lib/index-daily-limit";
import { requestOrigin } from "../../lib/request-origin";
import { isAgentInteropSecretValid } from "../../lib/agent-interop";
-import { applyNotice, type Notice } from "../../lib/deprecations";
import { markAlexandriaActivity } from "../../lib/alexandria-activity";
import { recordDiscoveredTools } from "../../lib/alexandria-discovery";
import {
@@ -78,27 +77,9 @@ import { UsOnlyUnavailableError } from "../../scraper/scrapeURL/error";
const IMAGE_SEARCH_US_ONLY_MESSAGE =
"Image search is not available for teams restricted to US-only processing.";
-const RESEARCH_CATEGORY_NOTICE: Notice = {
- message:
- "On 2026-11-16, the 'research' search category will query the Firecrawl Research Index (PubMed, bioRxiv, medRxiv, arXiv) rather than restricting web results to a fixed list of 14 academic domains. Results will move from data.web to data.research and will match the records returned by the Research Index endpoint GET /search/research/papers, with the fields paperId, primaryId, ids, title, abstract and score. To adopt those records today, call GET /search/research/papers (https://docs.firecrawl.dev/api-reference/endpoint/research-search-papers). To continue receiving web pages from academic domains, use includeDomains. The pdf and developer categories are unchanged. See https://docs.firecrawl.dev/features/research",
- links: ['<https://docs.firecrawl.dev/features/research>; rel="help"'],
-};
-
const GITHUB_CATEGORY_REMOVED =
"The 'github' search category was removed. To search GitHub issues, pull requests and READMEs, send the 'developer' category on its own (it can't be combined with other categories), or call GET or POST /v2/search/developer (https://docs.firecrawl.dev/features/developer). To keep web results from github.com, use includeDomains: [\"github.com\"].";
-// Ahead of auth and validation so rejected requests carry the notice too.
-export function researchCategoryNoticeMiddleware(
- req: Request,
- res: Response,
- next: NextFunction,
-) {
- if (hasCategory(req.body?.categories, "research")) {
- applyNotice(res, RESEARCH_CATEGORY_NOTICE);
- }
- next();
-}
-
export async function searchController(
req: RequestWithAuth<{}, SearchResponse, SearchRequest>,
res: Response<SearchResponse>,
diff --git a/apps/api/src/routes/v2.ts b/apps/api/src/routes/v2.ts
index 141f117ec..5c1f827b9 100644
--- a/apps/api/src/routes/v2.ts
+++ b/apps/api/src/routes/v2.ts
@@ -5,10 +5,7 @@ import { RateLimiterMode } from "../types";
import { registerMcpActionLogReadRoute } from "./mcp-action-logs";
import { SEARCH_CREDITS_FEATURE_ID } from "../services/autumn/autumn.service";
import expressWs from "express-ws";
-import {
- researchCategoryNoticeMiddleware,
- searchController,
-} from "../controllers/v2/search";
+import { searchController } from "../controllers/v2/search";
import { feedbackController } from "../controllers/v2/feedback/controller";
import { searchFeedbackController } from "../controllers/v2/search-feedback";
import { scrapeController } from "../controllers/v2/scrape";
@@ -209,7 +206,6 @@ registerMcpActionLogReadRoute(
v2Router.post(
"/search",
- researchCategoryNoticeMiddleware,
authMiddleware(RateLimiterMode.Search, {
allowKeyless: true,
allowAgentManagedKey: true,