Skip to content
Merged
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
49 changes: 49 additions & 0 deletions components/firecrawl/actions/map-url/map-url.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import firecrawl from "../../firecrawl.app.mjs";

export default {
key: "firecrawl-map-url",
name: "Map URL",
description: "Maps a given URL using Firecrawl's Map endpoint. Optionally, you can provide a search term to filter the mapping. [See the documentation](https://docs.firecrawl.dev/features/map)",
version: "0.0.1",
type: "action",
props: {
firecrawl,
url: {
propDefinition: [
firecrawl,
"url",
],
description: "The URL to map using Firecrawl.",
},
search: {
type: "string",
label: "Search",
description: "Optional search term to filter the mapping results. [See the documentation](https://docs.firecrawl.dev/features/map).",
optional: true,
},
},
async run({ $ }) {
const {
firecrawl, search, ...data
} = this;

// Including search parameter in payload only when its not empty
if (search && search.trim() !== "") {
data.search = search.trim();
}

const response = await firecrawl._makeRequest({
$,
path: "/map",
method: "POST",
data,
});

console.log("Firecrawl Response:", response);

if ($ && typeof $.export === "function") {
$.export("$summary", `Mapped URL: ${this.url}`);
}
return response;
},
};
2 changes: 1 addition & 1 deletion components/firecrawl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/firecrawl",
"version": "1.2.0",
"version": "1.3.0",
"description": "Pipedream FireCrawl Components",
"main": "firecrawl.app.mjs",
"keywords": [
Expand Down
9 changes: 3 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.