Skip to content

Commit 53134b7

Browse files
Rafa: removed throw error and added map to requests
1 parent 36cf49c commit 53134b7

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

apps/api/requests.http

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,16 @@ content-type: application/json
4646
@batchScrapeId = {{batchScrape.response.body.$.id}}
4747
# @name batchScrapeStatus
4848
GET {{baseUrl}}/v1/crawl/{{batchScrapeId}} HTTP/1.1
49-
Authorization: Bearer {{$dotenv TEST_API_KEY}}
49+
Authorization: Bearer {{$dotenv TEST_API_KEY}}
50+
51+
52+
### Map Website
53+
# @name map
54+
POST {{baseUrl}}/v1/map HTTP/1.1
55+
Authorization: Bearer {{$dotenv TEST_API_KEY}}
56+
content-type: application/json
57+
58+
{
59+
"url": "firecrawl.dev",
60+
"sitemapOnly": true
61+
}

apps/api/src/controllers/v1/map.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ export async function getMapResults({
8080

8181
// If sitemapOnly is true, only get links from sitemap
8282
if (crawlerOptions.sitemapOnly) {
83-
if (includeMetadata) {
84-
throw new Error("includeMetadata is not supported with sitemapOnly");
85-
}
86-
8783
const sitemap = await crawler.tryGetSitemap(true, true);
8884
if (sitemap !== null) {
8985
sitemap.forEach((x) => {

0 commit comments

Comments
 (0)