@mendable/firecrawl-js 4.37.0 → 4.39.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 +7 -2
- package/dist/{chunk-LFX7WDGT.js → chunk-4DPCCKWG.js} +1 -1
- package/dist/index.cjs +61 -9
- package/dist/index.d.cts +202 -4
- package/dist/index.d.ts +202 -4
- package/dist/index.js +62 -10
- package/dist/{package-SHMK2LJE.js → package-D2QZMRW7.js} +1 -1
- package/package.json +1 -1
- package/pnpm-workspace.yaml +1 -0
- package/src/__tests__/e2e/v2/batch.test.ts +13 -11
- package/src/__tests__/e2e/v2/crawl.test.ts +24 -20
- package/src/__tests__/e2e/v2/extract.test.ts +32 -7
- package/src/__tests__/e2e/v2/map.test.ts +4 -3
- package/src/__tests__/e2e/v2/parse.test.ts +4 -3
- package/src/__tests__/e2e/v2/scrape.test.ts +10 -9
- package/src/__tests__/e2e/v2/search.test.ts +9 -8
- package/src/__tests__/e2e/v2/usage.test.ts +6 -5
- package/src/__tests__/e2e/v2/utils/rateLimit.ts +257 -0
- package/src/__tests__/e2e/v2/watcher.test.ts +4 -3
- package/src/__tests__/unit/v2/agent-effort-trace.unit.test.ts +1 -1
- package/src/__tests__/unit/v2/agent-list.unit.test.ts +68 -0
- package/src/__tests__/unit/v2/agent-thread.unit.test.ts +164 -0
- package/src/__tests__/unit/v2/e2eRateLimitRetry.test.ts +501 -0
- package/src/__tests__/unit/v2/extract.unit.test.ts +1 -1
- package/src/__tests__/unit/v2/scrapeAutoResume.test.ts +1 -1
- package/src/__tests__/unit/v2/search-country.unit.test.ts +32 -0
- package/src/__tests__/unit/v2/search-data-property.test.ts +1 -0
- package/src/__tests__/unit/v2/v1-aliases.test.ts +1 -0
- package/src/v2/client.ts +26 -1
- package/src/v2/methods/agent.ts +35 -1
- package/src/v2/methods/research.ts +14 -8
- package/src/v2/methods/search.ts +1 -0
- package/src/v2/types.ts +195 -34
package/README.md
CHANGED
|
@@ -261,8 +261,13 @@ const related = await app.research.similarPapers('pmid:<id>', {
|
|
|
261
261
|
});
|
|
262
262
|
```
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
> **`app.research.searchGithub` is deprecated.** The research index GitHub
|
|
265
|
+
> endpoint stops responding after 2026-11-03. Use `app.developerSearch`
|
|
266
|
+
> instead: it searches GitHub issues, pull requests and readmes plus curated
|
|
267
|
+
> documentation sources, returns matched passages, and adds filters for repo,
|
|
268
|
+
> language, license and stars. It does not carry over the `scores` breakdown
|
|
269
|
+
> or the `resultType: "web"` fallback results. See
|
|
270
|
+
> [the developer index docs](https://docs.firecrawl.dev/features/developer).
|
|
266
271
|
|
|
267
272
|
### Scrape-bound interactive browsing (v2)
|
|
268
273
|
|
|
@@ -12,7 +12,7 @@ var require_package = __commonJS({
|
|
|
12
12
|
"package.json"(exports, module) {
|
|
13
13
|
module.exports = {
|
|
14
14
|
name: "@mendable/firecrawl-js",
|
|
15
|
-
version: "4.
|
|
15
|
+
version: "4.39.0",
|
|
16
16
|
description: "JavaScript SDK for the Firecrawl API: web scraping, crawling, web search, and scientific literature search over a research paper index of PubMed, bioRxiv, medRxiv and arXiv abstracts",
|
|
17
17
|
main: "dist/index.js",
|
|
18
18
|
types: "dist/index.d.ts",
|
package/dist/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
"package.json"(exports2, module2) {
|
|
40
40
|
module2.exports = {
|
|
41
41
|
name: "@mendable/firecrawl-js",
|
|
42
|
-
version: "4.
|
|
42
|
+
version: "4.39.0",
|
|
43
43
|
description: "JavaScript SDK for the Firecrawl API: web scraping, crawling, web search, and scientific literature search over a research paper index of PubMed, bioRxiv, medRxiv and arXiv abstracts",
|
|
44
44
|
main: "dist/index.js",
|
|
45
45
|
types: "dist/index.d.ts",
|
|
@@ -751,6 +751,7 @@ function prepareSearchPayload(req) {
|
|
|
751
751
|
if (req.limit != null) payload.limit = req.limit;
|
|
752
752
|
if (req.tbs != null) payload.tbs = req.tbs;
|
|
753
753
|
if (req.location != null) payload.location = req.location;
|
|
754
|
+
if (req.country != null) payload.country = req.country;
|
|
754
755
|
if (req.ignoreInvalidURLs != null)
|
|
755
756
|
payload.ignoreInvalidURLs = req.ignoreInvalidURLs;
|
|
756
757
|
if (req.timeout != null) payload.timeout = req.timeout;
|
|
@@ -1371,6 +1372,9 @@ function prepareAgentPayload(args) {
|
|
|
1371
1372
|
body.threatProtection = args.threatProtection;
|
|
1372
1373
|
if (args.auditMetadata != null)
|
|
1373
1374
|
body.auditMetadata = args.auditMetadata;
|
|
1375
|
+
if (args.threadId != null) body.threadId = args.threadId;
|
|
1376
|
+
if (args.mode != null) body.mode = args.mode;
|
|
1377
|
+
if (args.exchange != null) body.exchange = args.exchange;
|
|
1374
1378
|
return body;
|
|
1375
1379
|
}
|
|
1376
1380
|
async function startAgent(http, args) {
|
|
@@ -1394,6 +1398,17 @@ async function getAgentStatus(http, jobId) {
|
|
|
1394
1398
|
throw err;
|
|
1395
1399
|
}
|
|
1396
1400
|
}
|
|
1401
|
+
async function listAgents(http, options) {
|
|
1402
|
+
try {
|
|
1403
|
+
const query = options?.before !== void 0 ? `?before=${options.before}` : "";
|
|
1404
|
+
const res = await http.get(`/v2/agent${query}`);
|
|
1405
|
+
if (res.status !== 200) throwForBadResponse(res, "list agents");
|
|
1406
|
+
return res.data;
|
|
1407
|
+
} catch (err) {
|
|
1408
|
+
if (err?.isAxiosError) return normalizeAxiosError(err, "list agents");
|
|
1409
|
+
throw err;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1397
1412
|
async function waitAgent(http, jobId, pollInterval = 2, timeout) {
|
|
1398
1413
|
const start = Date.now();
|
|
1399
1414
|
while (true) {
|
|
@@ -1430,6 +1445,17 @@ async function getAgentSnapshot(http, jobId, snapshotId) {
|
|
|
1430
1445
|
throw err;
|
|
1431
1446
|
}
|
|
1432
1447
|
}
|
|
1448
|
+
async function getAgentThread(http, threadId, options) {
|
|
1449
|
+
try {
|
|
1450
|
+
const query = options?.includeData ? "?includeData=true" : "";
|
|
1451
|
+
const res = await http.get(`/v2/agent/threads/${threadId}${query}`);
|
|
1452
|
+
if (res.status !== 200) throwForBadResponse(res, "agent thread");
|
|
1453
|
+
return res.data;
|
|
1454
|
+
} catch (err) {
|
|
1455
|
+
if (err?.isAxiosError) return normalizeAxiosError(err, "agent thread");
|
|
1456
|
+
throw err;
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1433
1459
|
async function cancelAgent(http, jobId) {
|
|
1434
1460
|
try {
|
|
1435
1461
|
const res = await http.delete(`/v2/agent/${jobId}`);
|
|
@@ -1670,9 +1696,7 @@ var ResearchClient = class {
|
|
|
1670
1696
|
appendParam(params, "query", options.query);
|
|
1671
1697
|
appendParam(params, "k", options.k);
|
|
1672
1698
|
try {
|
|
1673
|
-
const res = await this.http.get(
|
|
1674
|
-
withQuery(`${BASE}/papers/${encodeURIComponent(id)}`, params)
|
|
1675
|
-
);
|
|
1699
|
+
const res = await this.http.get(withQuery(`${BASE}/papers/${encodeURIComponent(id)}`, params));
|
|
1676
1700
|
if (res.status !== 200) throwForBadResponse(res, "get paper");
|
|
1677
1701
|
return res.data;
|
|
1678
1702
|
} catch (err) {
|
|
@@ -1698,10 +1722,7 @@ var ResearchClient = class {
|
|
|
1698
1722
|
appendParam(params, "anchor", options.anchor);
|
|
1699
1723
|
try {
|
|
1700
1724
|
const res = await this.http.get(
|
|
1701
|
-
withQuery(
|
|
1702
|
-
`${BASE}/papers/${encodeURIComponent(id)}/similar`,
|
|
1703
|
-
params
|
|
1704
|
-
)
|
|
1725
|
+
withQuery(`${BASE}/papers/${encodeURIComponent(id)}/similar`, params)
|
|
1705
1726
|
);
|
|
1706
1727
|
if (res.status !== 200) throwForBadResponse(res, "find similar papers");
|
|
1707
1728
|
return res.data;
|
|
@@ -1710,7 +1731,16 @@ var ResearchClient = class {
|
|
|
1710
1731
|
}
|
|
1711
1732
|
}
|
|
1712
1733
|
/**
|
|
1713
|
-
* Search GitHub issue/PR history and repository
|
|
1734
|
+
* Search the research index GitHub slice: issue/PR history and repository
|
|
1735
|
+
* readmes.
|
|
1736
|
+
*
|
|
1737
|
+
* @deprecated Use `developerSearch()` on the client instead. This
|
|
1738
|
+
* endpoint stops responding after 2026-11-03. The developer index searches
|
|
1739
|
+
* GitHub issues, pull requests and readmes plus curated documentation
|
|
1740
|
+
* sources, returns matched passages, and adds filters for repo, language,
|
|
1741
|
+
* license and stars. It does not carry over the `scores` breakdown or the
|
|
1742
|
+
* `resultType: "web"` fallback results. See
|
|
1743
|
+
* https://docs.firecrawl.dev/features/developer.
|
|
1714
1744
|
* @param query Search query.
|
|
1715
1745
|
* @param options Optional `k`.
|
|
1716
1746
|
*/
|
|
@@ -2199,6 +2229,9 @@ var FirecrawlClient = class {
|
|
|
2199
2229
|
* Access the v2 research endpoints — Firecrawl's **research paper index**
|
|
2200
2230
|
* (~43M paper abstracts) plus GitHub history/readmes.
|
|
2201
2231
|
*
|
|
2232
|
+
* `research.searchGithub()` is deprecated and stops responding after
|
|
2233
|
+
* 2026-11-03. Use `developerSearch()` instead.
|
|
2234
|
+
*
|
|
2202
2235
|
* The paper corpus is roughly 90% biomedical and life sciences — PubMed,
|
|
2203
2236
|
* bioRxiv and medRxiv — with arXiv covering physics, mathematics and
|
|
2204
2237
|
* computer science.
|
|
@@ -2415,6 +2448,17 @@ var FirecrawlClient = class {
|
|
|
2415
2448
|
async getAgentStatus(jobId) {
|
|
2416
2449
|
return getAgentStatus(this.http, jobId);
|
|
2417
2450
|
}
|
|
2451
|
+
/**
|
|
2452
|
+
* List agent runs, most recent first.
|
|
2453
|
+
*
|
|
2454
|
+
* Pages are fixed at 20 runs. To fetch the next page, pass the `before`
|
|
2455
|
+
* value from the previous page's `next` URL. This method does not
|
|
2456
|
+
* auto-paginate.
|
|
2457
|
+
* @param options.before Only return runs created before this unix ms timestamp.
|
|
2458
|
+
*/
|
|
2459
|
+
async listAgents(options) {
|
|
2460
|
+
return listAgents(this.http, options);
|
|
2461
|
+
}
|
|
2418
2462
|
/**
|
|
2419
2463
|
* Convenience waiter: start an agent and poll until it finishes.
|
|
2420
2464
|
* @param args Agent request plus waiter controls (pollInterval, timeout seconds).
|
|
@@ -2447,6 +2491,14 @@ var FirecrawlClient = class {
|
|
|
2447
2491
|
async getAgentSnapshot(jobId, snapshotId) {
|
|
2448
2492
|
return getAgentSnapshot(this.http, jobId, snapshotId);
|
|
2449
2493
|
}
|
|
2494
|
+
/**
|
|
2495
|
+
* Get a thread and its runs, oldest turn first.
|
|
2496
|
+
* @param threadId Thread id, as returned by startAgent or getAgentStatus.
|
|
2497
|
+
* @param options.includeData Inline each succeeded run's data.
|
|
2498
|
+
*/
|
|
2499
|
+
async getAgentThread(threadId, options) {
|
|
2500
|
+
return getAgentThread(this.http, threadId, options);
|
|
2501
|
+
}
|
|
2450
2502
|
// Browser
|
|
2451
2503
|
/**
|
|
2452
2504
|
* Create a new browser session.
|
package/dist/index.d.cts
CHANGED
|
@@ -698,6 +698,8 @@ interface SearchRequest {
|
|
|
698
698
|
limit?: number;
|
|
699
699
|
tbs?: string;
|
|
700
700
|
location?: string;
|
|
701
|
+
/** ISO 3166-1 alpha-2 country code used to geo-target the search results. */
|
|
702
|
+
country?: string;
|
|
701
703
|
ignoreInvalidURLs?: boolean;
|
|
702
704
|
timeout?: number;
|
|
703
705
|
/** Generate query-relevant highlights for search results. Defaults to true. */
|
|
@@ -1087,10 +1089,66 @@ interface ExtractResponse$1 {
|
|
|
1087
1089
|
expiresAt?: string;
|
|
1088
1090
|
creditsUsed?: number;
|
|
1089
1091
|
}
|
|
1092
|
+
/** Conversation mode for an agent run. Defaults to "extract" server-side. */
|
|
1093
|
+
type AgentMode = "extract" | "chat";
|
|
1094
|
+
/** Options forwarded verbatim to the agent; the server owns every default. */
|
|
1095
|
+
interface AgentExchangeOptions {
|
|
1096
|
+
enabled?: boolean;
|
|
1097
|
+
/** At most 5. */
|
|
1098
|
+
toolkits?: string[];
|
|
1099
|
+
maxCalls?: number;
|
|
1100
|
+
requireApproval?: boolean;
|
|
1101
|
+
/** Answers a pendingApproval from the previous turn of the thread. */
|
|
1102
|
+
approve?: {
|
|
1103
|
+
approvalId: string;
|
|
1104
|
+
callIds?: string[];
|
|
1105
|
+
always?: boolean;
|
|
1106
|
+
};
|
|
1107
|
+
decline?: {
|
|
1108
|
+
approvalId: string;
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
/** Per-run summary reported on a status response. */
|
|
1112
|
+
interface AgentExchangeSummary {
|
|
1113
|
+
enabled: boolean;
|
|
1114
|
+
/** What the run resolved to after thread inheritance, not what it requested. */
|
|
1115
|
+
toolkits?: string[];
|
|
1116
|
+
requireApproval?: boolean;
|
|
1117
|
+
paidCalls: number;
|
|
1118
|
+
creditsUsed: number | null;
|
|
1119
|
+
}
|
|
1120
|
+
/** A follow-up the agent offers for the next turn of the thread. */
|
|
1121
|
+
interface AgentSuggestion {
|
|
1122
|
+
label: string;
|
|
1123
|
+
prompt: string;
|
|
1124
|
+
}
|
|
1125
|
+
/** A turn that ended waiting for the caller to allow or refuse paid calls. */
|
|
1126
|
+
interface PendingApproval {
|
|
1127
|
+
id: string;
|
|
1128
|
+
reason: string;
|
|
1129
|
+
calls: {
|
|
1130
|
+
id: string;
|
|
1131
|
+
provider: string;
|
|
1132
|
+
capability: string;
|
|
1133
|
+
input: Record<string, unknown>;
|
|
1134
|
+
more?: Record<string, unknown>[];
|
|
1135
|
+
creditsEstimate: number | null;
|
|
1136
|
+
}[];
|
|
1137
|
+
resolution: null | {
|
|
1138
|
+
approved: boolean;
|
|
1139
|
+
callIds: string[];
|
|
1140
|
+
always: boolean;
|
|
1141
|
+
byRunId: string;
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1090
1144
|
interface AgentResponse {
|
|
1091
1145
|
success: boolean;
|
|
1092
1146
|
id: string;
|
|
1093
1147
|
error?: string;
|
|
1148
|
+
/** Thread this run belongs to; pass it back to continue the conversation. */
|
|
1149
|
+
threadId?: string;
|
|
1150
|
+
/** 1-based position of this run in its thread. */
|
|
1151
|
+
threadTurn?: number;
|
|
1094
1152
|
}
|
|
1095
1153
|
interface AgentStatusResponse {
|
|
1096
1154
|
success: boolean;
|
|
@@ -1110,9 +1168,90 @@ interface AgentStatusResponse {
|
|
|
1110
1168
|
effort?: "low" | "medium" | "high";
|
|
1111
1169
|
expiresAt: string;
|
|
1112
1170
|
creditsUsed?: number;
|
|
1171
|
+
threadId?: string;
|
|
1172
|
+
threadTurn?: number;
|
|
1173
|
+
mode?: AgentMode;
|
|
1174
|
+
/** Assistant text reply. Chat-mode runs answer here instead of in `data`. */
|
|
1175
|
+
message?: string;
|
|
1176
|
+
suggestions?: AgentSuggestion[];
|
|
1177
|
+
pendingApproval?: PendingApproval;
|
|
1178
|
+
exchange?: AgentExchangeSummary;
|
|
1179
|
+
}
|
|
1180
|
+
/** A single run of a thread, as returned by getAgentThread. */
|
|
1181
|
+
interface AgentThreadRun {
|
|
1182
|
+
id: string;
|
|
1183
|
+
turn: number;
|
|
1184
|
+
mode: AgentMode;
|
|
1185
|
+
prompt: string;
|
|
1186
|
+
urls?: string[];
|
|
1187
|
+
schema?: unknown;
|
|
1188
|
+
effort?: "low" | "medium" | "high";
|
|
1189
|
+
status: "processing" | "succeeded" | "failed" | "cancelled" | "refused" | "credit_limit_reached";
|
|
1190
|
+
createdAt: string;
|
|
1191
|
+
finishedAt: string | null;
|
|
1192
|
+
creditsUsed: number | null;
|
|
1193
|
+
message: string | null;
|
|
1194
|
+
/** Only present when the request asked for includeData. */
|
|
1195
|
+
data?: unknown;
|
|
1196
|
+
suggestions?: AgentSuggestion[] | null;
|
|
1197
|
+
pendingApproval?: PendingApproval | null;
|
|
1198
|
+
exchange?: AgentExchangeSummary | null;
|
|
1199
|
+
}
|
|
1200
|
+
interface AgentThread {
|
|
1201
|
+
id: string;
|
|
1202
|
+
createdAt: string;
|
|
1203
|
+
updatedAt: string;
|
|
1204
|
+
status: "idle" | "running";
|
|
1205
|
+
runs: AgentThreadRun[];
|
|
1206
|
+
}
|
|
1207
|
+
interface AgentThreadResponse {
|
|
1208
|
+
success: boolean;
|
|
1209
|
+
thread?: AgentThread;
|
|
1210
|
+
error?: string;
|
|
1113
1211
|
}
|
|
1114
1212
|
/** Reasoning effort for agent jobs. Every level runs spark-2. */
|
|
1115
1213
|
type AgentEffort = "low" | "medium" | "high";
|
|
1214
|
+
/** A single agent run as returned by the agent list endpoint. */
|
|
1215
|
+
interface AgentListItem {
|
|
1216
|
+
id: string;
|
|
1217
|
+
createdAt: string;
|
|
1218
|
+
targetHint: string;
|
|
1219
|
+
origin: string;
|
|
1220
|
+
integration?: string;
|
|
1221
|
+
settings: {
|
|
1222
|
+
hidden: boolean;
|
|
1223
|
+
starred: boolean;
|
|
1224
|
+
label?: string;
|
|
1225
|
+
};
|
|
1226
|
+
status: "processing" | "completed" | "failed";
|
|
1227
|
+
options?: {
|
|
1228
|
+
urls?: string[];
|
|
1229
|
+
prompt: string;
|
|
1230
|
+
schema?: unknown;
|
|
1231
|
+
/**
|
|
1232
|
+
* Server-provided model name. Widened past the request-side union on
|
|
1233
|
+
* purpose: new models ship without an SDK release, so pinning this to
|
|
1234
|
+
* known names makes every future model a type error at the call site.
|
|
1235
|
+
*/
|
|
1236
|
+
model: "spark-1-pro" | "spark-1-mini" | "spark-2" | (string & {});
|
|
1237
|
+
effort?: AgentEffort;
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
interface AgentListResponse {
|
|
1241
|
+
success: boolean;
|
|
1242
|
+
agents?: AgentListItem[];
|
|
1243
|
+
/**
|
|
1244
|
+
* Absolute URL of the next page (pass its `before` value to listAgents to
|
|
1245
|
+
* continue). Only present when more pages exist.
|
|
1246
|
+
*/
|
|
1247
|
+
next?: string;
|
|
1248
|
+
error?: string;
|
|
1249
|
+
}
|
|
1250
|
+
/** Options for listing agent runs. */
|
|
1251
|
+
interface AgentListOptions {
|
|
1252
|
+
/** Only return agent runs created before this unix millisecond timestamp. */
|
|
1253
|
+
before?: number;
|
|
1254
|
+
}
|
|
1116
1255
|
type AgentTraceAgentRole = "orchestrator" | "subagent" | "browser" | "system";
|
|
1117
1256
|
interface AgentTraceAgentIdentity {
|
|
1118
1257
|
id: string;
|
|
@@ -1464,7 +1603,14 @@ interface SimilarPapersResponse {
|
|
|
1464
1603
|
/** Human-readable note when no results are produced. */
|
|
1465
1604
|
note?: string | null;
|
|
1466
1605
|
}
|
|
1467
|
-
/**
|
|
1606
|
+
/**
|
|
1607
|
+
* Component scores; each field is present only when that signal contributed.
|
|
1608
|
+
*
|
|
1609
|
+
* @deprecated Use the developer index instead. The research index GitHub
|
|
1610
|
+
* search stops responding after 2026-11-03. The developer index does not
|
|
1611
|
+
* expose a score breakdown. See
|
|
1612
|
+
* https://docs.firecrawl.dev/features/developer.
|
|
1613
|
+
*/
|
|
1468
1614
|
interface GitHubScoreBreakdown {
|
|
1469
1615
|
rrf?: number;
|
|
1470
1616
|
semantic?: number;
|
|
@@ -1472,6 +1618,11 @@ interface GitHubScoreBreakdown {
|
|
|
1472
1618
|
fusion?: number;
|
|
1473
1619
|
rerank?: number;
|
|
1474
1620
|
}
|
|
1621
|
+
/**
|
|
1622
|
+
* @deprecated Use the developer index instead. The research index GitHub
|
|
1623
|
+
* search stops responding after 2026-11-03. See
|
|
1624
|
+
* https://docs.firecrawl.dev/features/developer.
|
|
1625
|
+
*/
|
|
1475
1626
|
interface GitHubSearchItem {
|
|
1476
1627
|
resultType?: "github_history" | "repo_readme" | "web";
|
|
1477
1628
|
/** `owner/name`; empty for web results whose URL is not a repo page. */
|
|
@@ -1493,9 +1644,18 @@ interface GitHubSearchItem {
|
|
|
1493
1644
|
contentMd?: string;
|
|
1494
1645
|
scores: GitHubScoreBreakdown;
|
|
1495
1646
|
}
|
|
1647
|
+
/**
|
|
1648
|
+
* @deprecated Use the developer index instead. The research index GitHub
|
|
1649
|
+
* search stops responding after 2026-11-03. See
|
|
1650
|
+
* https://docs.firecrawl.dev/features/developer.
|
|
1651
|
+
*/
|
|
1496
1652
|
interface GitHubSearchResponse {
|
|
1497
1653
|
success: boolean;
|
|
1498
1654
|
results: GitHubSearchItem[];
|
|
1655
|
+
/** Deprecation notice while the sunset window is live. */
|
|
1656
|
+
warnings?: string[];
|
|
1657
|
+
/** Replacement endpoint path, while the sunset window is live. */
|
|
1658
|
+
replacement?: string;
|
|
1499
1659
|
}
|
|
1500
1660
|
/** Options for `research.searchPapers`. */
|
|
1501
1661
|
interface SearchPapersOptions {
|
|
@@ -1530,7 +1690,13 @@ interface SimilarPapersOptions {
|
|
|
1530
1690
|
/** Additional seed paper reference(s), same format as `id`. */
|
|
1531
1691
|
anchor?: string[];
|
|
1532
1692
|
}
|
|
1533
|
-
/**
|
|
1693
|
+
/**
|
|
1694
|
+
* Options for `research.searchGithub`.
|
|
1695
|
+
*
|
|
1696
|
+
* @deprecated Use the developer index instead. The research index GitHub
|
|
1697
|
+
* search stops responding after 2026-11-03. See
|
|
1698
|
+
* https://docs.firecrawl.dev/features/developer.
|
|
1699
|
+
*/
|
|
1534
1700
|
interface SearchGithubOptions {
|
|
1535
1701
|
/** Number of results to return (1–100, default 20). */
|
|
1536
1702
|
k?: number;
|
|
@@ -1625,6 +1791,9 @@ declare function prepareAgentPayload(args: {
|
|
|
1625
1791
|
webhook?: string | AgentWebhookConfig;
|
|
1626
1792
|
threatProtection?: ThreatProtectionOptions;
|
|
1627
1793
|
auditMetadata?: AuditMetadata$1;
|
|
1794
|
+
threadId?: string;
|
|
1795
|
+
mode?: AgentMode;
|
|
1796
|
+
exchange?: AgentExchangeOptions;
|
|
1628
1797
|
}): Record<string, unknown>;
|
|
1629
1798
|
declare function startAgent(http: HttpClient, args: Parameters<typeof prepareAgentPayload>[0]): Promise<AgentResponse>;
|
|
1630
1799
|
|
|
@@ -1715,7 +1884,16 @@ declare class ResearchClient {
|
|
|
1715
1884
|
*/
|
|
1716
1885
|
similarPapers(id: string, options: SimilarPapersOptions): Promise<SimilarPapersResponse>;
|
|
1717
1886
|
/**
|
|
1718
|
-
* Search GitHub issue/PR history and repository
|
|
1887
|
+
* Search the research index GitHub slice: issue/PR history and repository
|
|
1888
|
+
* readmes.
|
|
1889
|
+
*
|
|
1890
|
+
* @deprecated Use `developerSearch()` on the client instead. This
|
|
1891
|
+
* endpoint stops responding after 2026-11-03. The developer index searches
|
|
1892
|
+
* GitHub issues, pull requests and readmes plus curated documentation
|
|
1893
|
+
* sources, returns matched passages, and adds filters for repo, language,
|
|
1894
|
+
* license and stars. It does not carry over the `scores` breakdown or the
|
|
1895
|
+
* `resultType: "web"` fallback results. See
|
|
1896
|
+
* https://docs.firecrawl.dev/features/developer.
|
|
1719
1897
|
* @param query Search query.
|
|
1720
1898
|
* @param options Optional `k`.
|
|
1721
1899
|
*/
|
|
@@ -1862,6 +2040,9 @@ declare class FirecrawlClient {
|
|
|
1862
2040
|
* Access the v2 research endpoints — Firecrawl's **research paper index**
|
|
1863
2041
|
* (~43M paper abstracts) plus GitHub history/readmes.
|
|
1864
2042
|
*
|
|
2043
|
+
* `research.searchGithub()` is deprecated and stops responding after
|
|
2044
|
+
* 2026-11-03. Use `developerSearch()` instead.
|
|
2045
|
+
*
|
|
1865
2046
|
* The paper corpus is roughly 90% biomedical and life sciences — PubMed,
|
|
1866
2047
|
* bioRxiv and medRxiv — with arXiv covering physics, mathematics and
|
|
1867
2048
|
* computer science.
|
|
@@ -2026,6 +2207,15 @@ declare class FirecrawlClient {
|
|
|
2026
2207
|
* @param jobId Agent job id.
|
|
2027
2208
|
*/
|
|
2028
2209
|
getAgentStatus(jobId: string): Promise<AgentStatusResponse>;
|
|
2210
|
+
/**
|
|
2211
|
+
* List agent runs, most recent first.
|
|
2212
|
+
*
|
|
2213
|
+
* Pages are fixed at 20 runs. To fetch the next page, pass the `before`
|
|
2214
|
+
* value from the previous page's `next` URL. This method does not
|
|
2215
|
+
* auto-paginate.
|
|
2216
|
+
* @param options.before Only return runs created before this unix ms timestamp.
|
|
2217
|
+
*/
|
|
2218
|
+
listAgents(options?: AgentListOptions): Promise<AgentListResponse>;
|
|
2029
2219
|
/**
|
|
2030
2220
|
* Convenience waiter: start an agent and poll until it finishes.
|
|
2031
2221
|
* @param args Agent request plus waiter controls (pollInterval, timeout seconds).
|
|
@@ -2055,6 +2245,14 @@ declare class FirecrawlClient {
|
|
|
2055
2245
|
* @param snapshotId Snapshot id from an artifact.updated trace event.
|
|
2056
2246
|
*/
|
|
2057
2247
|
getAgentSnapshot(jobId: string, snapshotId: string): Promise<AgentSnapshotResponse>;
|
|
2248
|
+
/**
|
|
2249
|
+
* Get a thread and its runs, oldest turn first.
|
|
2250
|
+
* @param threadId Thread id, as returned by startAgent or getAgentStatus.
|
|
2251
|
+
* @param options.includeData Inline each succeeded run's data.
|
|
2252
|
+
*/
|
|
2253
|
+
getAgentThread(threadId: string, options?: {
|
|
2254
|
+
includeData?: boolean;
|
|
2255
|
+
}): Promise<AgentThreadResponse>;
|
|
2058
2256
|
/**
|
|
2059
2257
|
* Create a new browser session.
|
|
2060
2258
|
* @param args Session options (ttl, activityTtl, streamWebView, profile).
|
|
@@ -3057,4 +3255,4 @@ declare class Firecrawl extends FirecrawlClient {
|
|
|
3057
3255
|
get v1(): FirecrawlApp;
|
|
3058
3256
|
}
|
|
3059
3257
|
|
|
3060
|
-
export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentEffort, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentSnapshotResponse, type AgentStatusResponse, type AgentTraceActiveBrowserSession, type AgentTraceAgentFinishedEvent, type AgentTraceAgentIdentity, type AgentTraceAgentRole, type AgentTraceAgentStartedEvent, type AgentTraceArtifactChange, type AgentTraceArtifactUpdatedEvent, type AgentTraceBrowserSessionFinishedEvent, type AgentTraceBrowserSessionStartedEvent, type AgentTraceError, type AgentTraceErrorOccurredEvent, type AgentTraceEvent, type AgentTraceProgressReportedEvent, type AgentTraceReasoningSummaryEvent, type AgentTraceResponse, type AgentTraceRunCancelRequestedEvent, type AgentTraceRunFinishedEvent, type AgentTraceRunStartedEvent, type AgentTraceToolCallFinishedEvent, type AgentTraceToolCallStartedEvent, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type AuditMetadata$1 as AuditMetadata, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, type BrowserCreateResponse, type BrowserDeleteResponse, type BrowserExecuteResponse, type BrowserListResponse, type BrowserSession, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreateMonitorRequest, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type DeveloperSearchLicenseDisclosure, type DeveloperSearchOptions, type DeveloperSearchPassage, type DeveloperSearchRepoStatus, type DeveloperSearchResponse, type DeveloperSearchResult, type DeveloperSearchSourceStatus, type DeveloperSearchType, type Document, type DocumentMetadata, type EndpointFeedbackEndpoint, type EndpointFeedbackRequest, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, type FeedbackMissingContent, type FeedbackRating, type FeedbackResponse, type FeedbackValuableSource, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientInput, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type GetMonitorCheckOptions, type GetPaperOptions, type GitHubScoreBreakdown, type GitHubSearchItem, type GitHubSearchResponse, type HighlightsFormat, type IdMap, JobTimeoutError, type JsonFormat, type ListMonitorChecksOptions, type ListMonitorsOptions, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type MenuAvailability, type MenuImage, type MenuItem, type MenuItemIdentifiers, type MenuMerchant, type MenuPrice, type MenuProfile, type MenuSection, type Monitor, type MonitorCheck, type MonitorCheckDetail, type MonitorCheckPage, type MonitorCrawlTarget, type MonitorCrawlTargetResult, type MonitorEmailNotification, type MonitorEmailRecipientSubscription, type MonitorJsonFieldDiff, type MonitorNotification, type MonitorPageDiff, type MonitorPageJudgment, type MonitorPageSnapshot, type MonitorSchedule, type MonitorScrapeTarget, type MonitorScrapeTargetResult, type MonitorSearchTarget, type MonitorSearchTargetResult, type MonitorSummary, type MonitorTarget, type MonitorTargetResult, type MonitorWebhookConfig, type PDFAction, type PDFParser, type PaginationConfig, type PaperMetadata, type PaperMetadataResponse, type PaperResult, type PaperSignals, type ParseFile, type ParseFileData, type ParseFormat, type ParseFormatOption, type ParseFormatString, type ParseOptions, type Passage, type PdfBlockConfidence, type PdfBlockItem, type PdfPage, type PdfPageBlocks, type PressAction, type ProductAvailability, type ProductImage, type ProductPrice, type ProductProfile, type ProductSale, type ProductVariant, type QueryFormat, type QuestionFormat, type QueueStatusResponse$1 as QueueStatusResponse, type ReadPaperResponse, type RedactPIIEntity, type RedactPIIOptions, ResearchClient, type ScrapeAction, type ScrapeBrowserDeleteResponse, type ScrapeExecuteRequest, type ScrapeExecuteResponse, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchFeedbackRequest, type SearchGithubOptions, type SearchPapersOptions, type SearchPapersResponse, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type SimilarPapersOptions, type SimilarPapersResponse, type ThreatProtectionOptions, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type UpdateMonitorRequest, type Viewport, type WaitAction, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
|
|
3258
|
+
export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentEffort, type AgentExchangeOptions, type AgentExchangeSummary, type AgentListItem, type AgentListOptions, type AgentListResponse, type AgentMode, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentSnapshotResponse, type AgentStatusResponse, type AgentSuggestion, type AgentThread, type AgentThreadResponse, type AgentThreadRun, type AgentTraceActiveBrowserSession, type AgentTraceAgentFinishedEvent, type AgentTraceAgentIdentity, type AgentTraceAgentRole, type AgentTraceAgentStartedEvent, type AgentTraceArtifactChange, type AgentTraceArtifactUpdatedEvent, type AgentTraceBrowserSessionFinishedEvent, type AgentTraceBrowserSessionStartedEvent, type AgentTraceError, type AgentTraceErrorOccurredEvent, type AgentTraceEvent, type AgentTraceProgressReportedEvent, type AgentTraceReasoningSummaryEvent, type AgentTraceResponse, type AgentTraceRunCancelRequestedEvent, type AgentTraceRunFinishedEvent, type AgentTraceRunStartedEvent, type AgentTraceToolCallFinishedEvent, type AgentTraceToolCallStartedEvent, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type AuditMetadata$1 as AuditMetadata, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, type BrowserCreateResponse, type BrowserDeleteResponse, type BrowserExecuteResponse, type BrowserListResponse, type BrowserSession, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreateMonitorRequest, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type DeveloperSearchLicenseDisclosure, type DeveloperSearchOptions, type DeveloperSearchPassage, type DeveloperSearchRepoStatus, type DeveloperSearchResponse, type DeveloperSearchResult, type DeveloperSearchSourceStatus, type DeveloperSearchType, type Document, type DocumentMetadata, type EndpointFeedbackEndpoint, type EndpointFeedbackRequest, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, type FeedbackMissingContent, type FeedbackRating, type FeedbackResponse, type FeedbackValuableSource, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientInput, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type GetMonitorCheckOptions, type GetPaperOptions, type GitHubScoreBreakdown, type GitHubSearchItem, type GitHubSearchResponse, type HighlightsFormat, type IdMap, JobTimeoutError, type JsonFormat, type ListMonitorChecksOptions, type ListMonitorsOptions, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type MenuAvailability, type MenuImage, type MenuItem, type MenuItemIdentifiers, type MenuMerchant, type MenuPrice, type MenuProfile, type MenuSection, type Monitor, type MonitorCheck, type MonitorCheckDetail, type MonitorCheckPage, type MonitorCrawlTarget, type MonitorCrawlTargetResult, type MonitorEmailNotification, type MonitorEmailRecipientSubscription, type MonitorJsonFieldDiff, type MonitorNotification, type MonitorPageDiff, type MonitorPageJudgment, type MonitorPageSnapshot, type MonitorSchedule, type MonitorScrapeTarget, type MonitorScrapeTargetResult, type MonitorSearchTarget, type MonitorSearchTargetResult, type MonitorSummary, type MonitorTarget, type MonitorTargetResult, type MonitorWebhookConfig, type PDFAction, type PDFParser, type PaginationConfig, type PaperMetadata, type PaperMetadataResponse, type PaperResult, type PaperSignals, type ParseFile, type ParseFileData, type ParseFormat, type ParseFormatOption, type ParseFormatString, type ParseOptions, type Passage, type PdfBlockConfidence, type PdfBlockItem, type PdfPage, type PdfPageBlocks, type PendingApproval, type PressAction, type ProductAvailability, type ProductImage, type ProductPrice, type ProductProfile, type ProductSale, type ProductVariant, type QueryFormat, type QuestionFormat, type QueueStatusResponse$1 as QueueStatusResponse, type ReadPaperResponse, type RedactPIIEntity, type RedactPIIOptions, ResearchClient, type ScrapeAction, type ScrapeBrowserDeleteResponse, type ScrapeExecuteRequest, type ScrapeExecuteResponse, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchFeedbackRequest, type SearchGithubOptions, type SearchPapersOptions, type SearchPapersResponse, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type SimilarPapersOptions, type SimilarPapersResponse, type ThreatProtectionOptions, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type UpdateMonitorRequest, type Viewport, type WaitAction, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
|