@keystrokehq/scrapingant 0.1.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 +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/extract-content-as-markdown.cjs +36 -0
- package/dist/actions/extract-content-as-markdown.cjs.map +1 -0
- package/dist/actions/extract-content-as-markdown.d.cts +9 -0
- package/dist/actions/extract-content-as-markdown.d.cts.map +1 -0
- package/dist/actions/extract-content-as-markdown.d.mts +9 -0
- package/dist/actions/extract-content-as-markdown.d.mts.map +1 -0
- package/dist/actions/extract-content-as-markdown.mjs +33 -0
- package/dist/actions/extract-content-as-markdown.mjs.map +1 -0
- package/dist/actions/extract-data-with-ai.cjs +29 -0
- package/dist/actions/extract-data-with-ai.cjs.map +1 -0
- package/dist/actions/extract-data-with-ai.d.cts +9 -0
- package/dist/actions/extract-data-with-ai.d.cts.map +1 -0
- package/dist/actions/extract-data-with-ai.d.mts +9 -0
- package/dist/actions/extract-data-with-ai.d.mts.map +1 -0
- package/dist/actions/extract-data-with-ai.mjs +26 -0
- package/dist/actions/extract-data-with-ai.mjs.map +1 -0
- package/dist/actions/get-api-credits-usage.cjs +22 -0
- package/dist/actions/get-api-credits-usage.cjs.map +1 -0
- package/dist/actions/get-api-credits-usage.d.cts +9 -0
- package/dist/actions/get-api-credits-usage.d.cts.map +1 -0
- package/dist/actions/get-api-credits-usage.d.mts +9 -0
- package/dist/actions/get-api-credits-usage.d.mts.map +1 -0
- package/dist/actions/get-api-credits-usage.mjs +19 -0
- package/dist/actions/get-api-credits-usage.mjs.map +1 -0
- package/dist/actions/index.cjs +15 -0
- package/dist/actions/index.d.cts +8 -0
- package/dist/actions/index.d.mts +8 -0
- package/dist/actions/index.mjs +8 -0
- package/dist/actions/scrape-web-page.cjs +40 -0
- package/dist/actions/scrape-web-page.cjs.map +1 -0
- package/dist/actions/scrape-web-page.d.cts +9 -0
- package/dist/actions/scrape-web-page.d.cts.map +1 -0
- package/dist/actions/scrape-web-page.d.mts +9 -0
- package/dist/actions/scrape-web-page.d.mts.map +1 -0
- package/dist/actions/scrape-web-page.mjs +37 -0
- package/dist/actions/scrape-web-page.mjs.map +1 -0
- package/dist/actions/scrape-webpage-post.cjs +41 -0
- package/dist/actions/scrape-webpage-post.cjs.map +1 -0
- package/dist/actions/scrape-webpage-post.d.cts +9 -0
- package/dist/actions/scrape-webpage-post.d.cts.map +1 -0
- package/dist/actions/scrape-webpage-post.d.mts +9 -0
- package/dist/actions/scrape-webpage-post.d.mts.map +1 -0
- package/dist/actions/scrape-webpage-post.mjs +38 -0
- package/dist/actions/scrape-webpage-post.mjs.map +1 -0
- package/dist/actions/scrape-webpage-put.cjs +42 -0
- package/dist/actions/scrape-webpage-put.cjs.map +1 -0
- package/dist/actions/scrape-webpage-put.d.cts +9 -0
- package/dist/actions/scrape-webpage-put.d.cts.map +1 -0
- package/dist/actions/scrape-webpage-put.d.mts +9 -0
- package/dist/actions/scrape-webpage-put.d.mts.map +1 -0
- package/dist/actions/scrape-webpage-put.mjs +39 -0
- package/dist/actions/scrape-webpage-put.mjs.map +1 -0
- package/dist/actions/scrape-with-extended-json-output.cjs +49 -0
- package/dist/actions/scrape-with-extended-json-output.cjs.map +1 -0
- package/dist/actions/scrape-with-extended-json-output.d.cts +9 -0
- package/dist/actions/scrape-with-extended-json-output.d.cts.map +1 -0
- package/dist/actions/scrape-with-extended-json-output.d.mts +9 -0
- package/dist/actions/scrape-with-extended-json-output.d.mts.map +1 -0
- package/dist/actions/scrape-with-extended-json-output.mjs +48 -0
- package/dist/actions/scrape-with-extended-json-output.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +20 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +11 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @keystrokehq/scrapingant
|
|
2
|
+
|
|
3
|
+
Keystroke-managed integration.
|
|
4
|
+
|
|
5
|
+
**App:** `scrapingant`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 7
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { scrapingantExtractContentAsMarkdown } from "@keystrokehq/scrapingant/actions";
|
|
12
|
+
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "scrapingant-agent",
|
|
15
|
+
tools: [scrapingantExtractContentAsMarkdown],
|
|
16
|
+
});
|
|
17
|
+
```
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_app = require("./app.cjs");
|
|
2
|
+
const require_execute = require("./execute.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return require_app.scrapingant.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await require_execute.executeScrapingantTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.action = action;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["scrapingant","executeScrapingantTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { scrapingant } from \"./app\";\nimport { executeScrapingantTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return scrapingant.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeScrapingantTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,YAAY,OAAO;EACxB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,uBAAuB,MAAM,KAAgC,CAAC;EAC9F;CACF,CAAC;AACH"}
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { scrapingant } from "./app.mjs";
|
|
2
|
+
import { executeScrapingantTool } from "./execute.mjs";
|
|
3
|
+
import "zod";
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return scrapingant.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await executeScrapingantTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { action };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { scrapingant } from \"./app\";\nimport { executeScrapingantTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return scrapingant.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeScrapingantTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,YAAY,OAAO;EACxB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,uBAAuB,MAAM,KAAgC,CAAC;EAC9F;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/extract-content-as-markdown.ts
|
|
4
|
+
const ScrapingantExtractContentAsMarkdownInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("The URL of the web page to scrape and convert to Markdown."),
|
|
6
|
+
method: zod.z.enum([
|
|
7
|
+
"get",
|
|
8
|
+
"post",
|
|
9
|
+
"put",
|
|
10
|
+
"delete"
|
|
11
|
+
]).default("get").describe("HTTP method to use for the request.").optional(),
|
|
12
|
+
browser: zod.z.boolean().describe("Enables the use of a headless browser for scraping. Default is true.").optional(),
|
|
13
|
+
cookies: zod.z.string().describe("Cookies to include with the request.").optional(),
|
|
14
|
+
js_snippet: zod.z.string().describe("Base64-encoded JavaScript to execute on the page after it loads.").optional(),
|
|
15
|
+
proxy_type: zod.z.string().describe("Specifies the type of proxy to use.").optional(),
|
|
16
|
+
proxy_country: zod.z.string().describe("Specifies the country for the proxy (e.g., US, GB).").optional(),
|
|
17
|
+
block_resource: zod.z.array(zod.z.string()).describe("List of resource types to block (e.g., image, script, stylesheet, font, media, websocket, other).").optional(),
|
|
18
|
+
wait_for_selector: zod.z.string().describe("CSS selector to wait for before returning the result.").optional(),
|
|
19
|
+
return_page_source: zod.z.boolean().describe("Returns the raw HTML as received from the server, without JavaScript rendering. Default is false.").optional()
|
|
20
|
+
});
|
|
21
|
+
const ScrapingantExtractContentAsMarkdownOutput = zod.z.object({
|
|
22
|
+
url: zod.z.string().describe("The original URL of the scraped page.").nullable().optional(),
|
|
23
|
+
detail: zod.z.string().describe("Error detail if the request failed.").nullable().optional(),
|
|
24
|
+
markdown: zod.z.string().describe("The extracted content in Markdown format.").nullable().optional()
|
|
25
|
+
});
|
|
26
|
+
const scrapingantExtractContentAsMarkdown = require_action.action("SCRAPINGANT_EXTRACT_CONTENT_AS_MARKDOWN", {
|
|
27
|
+
slug: "scrapingant-extract-content-as-markdown",
|
|
28
|
+
name: "Extract Content as Markdown",
|
|
29
|
+
description: "This tool extracts content from a given URL and converts it into Markdown format. It is particularly useful for preparing text for Language Learning Models (LLMs) and Retrieval-Augmented Generation (RAG) systems. It supports GET, POST, PUT, and DELETE methods.",
|
|
30
|
+
input: ScrapingantExtractContentAsMarkdownInput,
|
|
31
|
+
output: ScrapingantExtractContentAsMarkdownOutput
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.scrapingantExtractContentAsMarkdown = scrapingantExtractContentAsMarkdown;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=extract-content-as-markdown.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-content-as-markdown.cjs","names":["z","action"],"sources":["../../src/actions/extract-content-as-markdown.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantExtractContentAsMarkdownInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"The URL of the web page to scrape and convert to Markdown.\"),\n method: z.enum([\"get\", \"post\", \"put\", \"delete\"]).default(\"get\").describe(\"HTTP method to use for the request.\").optional(),\n browser: z.boolean().describe(\"Enables the use of a headless browser for scraping. Default is true.\").optional(),\n cookies: z.string().describe(\"Cookies to include with the request.\").optional(),\n js_snippet: z.string().describe(\"Base64-encoded JavaScript to execute on the page after it loads.\").optional(),\n proxy_type: z.string().describe(\"Specifies the type of proxy to use.\").optional(),\n proxy_country: z.string().describe(\"Specifies the country for the proxy (e.g., US, GB).\").optional(),\n block_resource: z.array(z.string()).describe(\"List of resource types to block (e.g., image, script, stylesheet, font, media, websocket, other).\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector to wait for before returning the result.\").optional(),\n return_page_source: z.boolean().describe(\"Returns the raw HTML as received from the server, without JavaScript rendering. Default is false.\").optional(),\n});\nexport const ScrapingantExtractContentAsMarkdownOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"The original URL of the scraped page.\").nullable().optional(),\n detail: z.string().describe(\"Error detail if the request failed.\").nullable().optional(),\n markdown: z.string().describe(\"The extracted content in Markdown format.\").nullable().optional(),\n});\n\nexport const scrapingantExtractContentAsMarkdown = action(\"SCRAPINGANT_EXTRACT_CONTENT_AS_MARKDOWN\", {\n slug: \"scrapingant-extract-content-as-markdown\",\n name: \"Extract Content as Markdown\",\n description: \"This tool extracts content from a given URL and converts it into Markdown format. It is particularly useful for preparing text for Language Learning Models (LLMs) and Retrieval-Augmented Generation (RAG) systems. It supports GET, POST, PUT, and DELETE methods.\",\n input: ScrapingantExtractContentAsMarkdownInput,\n output: ScrapingantExtractContentAsMarkdownOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2CAAyDA,IAAAA,EAAE,OAAO;CAC7E,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D;CACrF,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAQ;EAAO;CAAQ,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CACzH,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;CAC/G,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC9E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAC7G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CAChF,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACnG,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS;CAC3J,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACzG,oBAAoBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS;AACzJ,CAAC;AACD,MAAa,4CAA0DA,IAAAA,EAAE,OAAO;CAC9E,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtF,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACjG,CAAC;AAED,MAAa,sCAAsCC,eAAAA,OAAO,2CAA2C;CACnG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/extract-content-as-markdown.d.ts
|
|
4
|
+
declare const ScrapingantExtractContentAsMarkdownInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantExtractContentAsMarkdownOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantExtractContentAsMarkdown: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantExtractContentAsMarkdown };
|
|
9
|
+
//# sourceMappingURL=extract-content-as-markdown.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-content-as-markdown.d.cts","names":[],"sources":["../../src/actions/extract-content-as-markdown.ts"],"mappings":";;;cAIa,wCAAA,EAA0C,CAAA,CAAE,UAWvD;AAAA,cACW,yCAAA,EAA2C,CAAA,CAAE,UAIxD;AAAA,cAEW,mCAAA,gCAAmC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/extract-content-as-markdown.d.ts
|
|
4
|
+
declare const ScrapingantExtractContentAsMarkdownInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantExtractContentAsMarkdownOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantExtractContentAsMarkdown: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantExtractContentAsMarkdown };
|
|
9
|
+
//# sourceMappingURL=extract-content-as-markdown.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-content-as-markdown.d.mts","names":[],"sources":["../../src/actions/extract-content-as-markdown.ts"],"mappings":";;;cAIa,wCAAA,EAA0C,CAAA,CAAE,UAWvD;AAAA,cACW,yCAAA,EAA2C,CAAA,CAAE,UAIxD;AAAA,cAEW,mCAAA,gCAAmC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const scrapingantExtractContentAsMarkdown = action("SCRAPINGANT_EXTRACT_CONTENT_AS_MARKDOWN", {
|
|
4
|
+
slug: "scrapingant-extract-content-as-markdown",
|
|
5
|
+
name: "Extract Content as Markdown",
|
|
6
|
+
description: "This tool extracts content from a given URL and converts it into Markdown format. It is particularly useful for preparing text for Language Learning Models (LLMs) and Retrieval-Augmented Generation (RAG) systems. It supports GET, POST, PUT, and DELETE methods.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
url: z.string().describe("The URL of the web page to scrape and convert to Markdown."),
|
|
9
|
+
method: z.enum([
|
|
10
|
+
"get",
|
|
11
|
+
"post",
|
|
12
|
+
"put",
|
|
13
|
+
"delete"
|
|
14
|
+
]).default("get").describe("HTTP method to use for the request.").optional(),
|
|
15
|
+
browser: z.boolean().describe("Enables the use of a headless browser for scraping. Default is true.").optional(),
|
|
16
|
+
cookies: z.string().describe("Cookies to include with the request.").optional(),
|
|
17
|
+
js_snippet: z.string().describe("Base64-encoded JavaScript to execute on the page after it loads.").optional(),
|
|
18
|
+
proxy_type: z.string().describe("Specifies the type of proxy to use.").optional(),
|
|
19
|
+
proxy_country: z.string().describe("Specifies the country for the proxy (e.g., US, GB).").optional(),
|
|
20
|
+
block_resource: z.array(z.string()).describe("List of resource types to block (e.g., image, script, stylesheet, font, media, websocket, other).").optional(),
|
|
21
|
+
wait_for_selector: z.string().describe("CSS selector to wait for before returning the result.").optional(),
|
|
22
|
+
return_page_source: z.boolean().describe("Returns the raw HTML as received from the server, without JavaScript rendering. Default is false.").optional()
|
|
23
|
+
}),
|
|
24
|
+
output: z.object({
|
|
25
|
+
url: z.string().describe("The original URL of the scraped page.").nullable().optional(),
|
|
26
|
+
detail: z.string().describe("Error detail if the request failed.").nullable().optional(),
|
|
27
|
+
markdown: z.string().describe("The extracted content in Markdown format.").nullable().optional()
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { scrapingantExtractContentAsMarkdown };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=extract-content-as-markdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-content-as-markdown.mjs","names":[],"sources":["../../src/actions/extract-content-as-markdown.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantExtractContentAsMarkdownInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"The URL of the web page to scrape and convert to Markdown.\"),\n method: z.enum([\"get\", \"post\", \"put\", \"delete\"]).default(\"get\").describe(\"HTTP method to use for the request.\").optional(),\n browser: z.boolean().describe(\"Enables the use of a headless browser for scraping. Default is true.\").optional(),\n cookies: z.string().describe(\"Cookies to include with the request.\").optional(),\n js_snippet: z.string().describe(\"Base64-encoded JavaScript to execute on the page after it loads.\").optional(),\n proxy_type: z.string().describe(\"Specifies the type of proxy to use.\").optional(),\n proxy_country: z.string().describe(\"Specifies the country for the proxy (e.g., US, GB).\").optional(),\n block_resource: z.array(z.string()).describe(\"List of resource types to block (e.g., image, script, stylesheet, font, media, websocket, other).\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector to wait for before returning the result.\").optional(),\n return_page_source: z.boolean().describe(\"Returns the raw HTML as received from the server, without JavaScript rendering. Default is false.\").optional(),\n});\nexport const ScrapingantExtractContentAsMarkdownOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"The original URL of the scraped page.\").nullable().optional(),\n detail: z.string().describe(\"Error detail if the request failed.\").nullable().optional(),\n markdown: z.string().describe(\"The extracted content in Markdown format.\").nullable().optional(),\n});\n\nexport const scrapingantExtractContentAsMarkdown = action(\"SCRAPINGANT_EXTRACT_CONTENT_AS_MARKDOWN\", {\n slug: \"scrapingant-extract-content-as-markdown\",\n name: \"Extract Content as Markdown\",\n description: \"This tool extracts content from a given URL and converts it into Markdown format. It is particularly useful for preparing text for Language Learning Models (LLMs) and Retrieval-Augmented Generation (RAG) systems. It supports GET, POST, PUT, and DELETE methods.\",\n input: ScrapingantExtractContentAsMarkdownInput,\n output: ScrapingantExtractContentAsMarkdownOutput,\n});\n"],"mappings":";;AAsBA,MAAa,sCAAsC,OAAO,2CAA2C;CACnG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAtBoE,EAAE,OAAO;EAC7E,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D;EACrF,QAAQ,EAAE,KAAK;GAAC;GAAO;GAAQ;GAAO;EAAQ,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EACzH,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;EAC/G,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;EAC9E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;EAC7G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAChF,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;EACnG,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS;EAC3J,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EACzG,oBAAoB,EAAE,QAAQ,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS;CACzJ,CAWS;CACP,QAXqE,EAAE,OAAO;EAC9E,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtF,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/extract-data-with-ai.ts
|
|
4
|
+
const ScrapingantExtractDataWithAiInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("The URL of the page to extract data from."),
|
|
6
|
+
cookies: zod.z.string().describe("Cookies to use for the request. (e.g. cookie1=value1; cookie2=value2)").optional(),
|
|
7
|
+
proxy_type: zod.z.string().describe("Proxy type to use for the request. (datacenter, residential)").optional(),
|
|
8
|
+
return_text: zod.z.boolean().describe("Return text content of the page. (default: false)").optional(),
|
|
9
|
+
proxy_country: zod.z.string().describe("Proxy country to use for the request. (e.g. US, GB, DE)").optional(),
|
|
10
|
+
enable_javascript: zod.z.boolean().describe("Enable browser rendering. (default: true)").optional(),
|
|
11
|
+
wait_for_selector: zod.z.string().describe("Wait for a specific selector to appear on the page before extracting data.").optional(),
|
|
12
|
+
extract_properties: zod.z.string().describe("A free-form text describing the data you want to extract.")
|
|
13
|
+
});
|
|
14
|
+
const ScrapingantExtractDataWithAiOutput = zod.z.object({
|
|
15
|
+
text: zod.z.string().describe("Text content of the page. Only populated when return_text is set to true.").nullable().optional(),
|
|
16
|
+
content: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Extracted data as a JSON object with the requested properties as keys. Can contain nested objects, arrays, strings, numbers, and booleans.").nullable().optional(),
|
|
17
|
+
status_code: zod.z.number().int().describe("HTTP status code of the response from the target website.").nullable().optional()
|
|
18
|
+
});
|
|
19
|
+
const scrapingantExtractDataWithAi = require_action.action("SCRAPINGANT_EXTRACT_DATA_WITH_AI", {
|
|
20
|
+
slug: "scrapingant-extract-data-with-ai",
|
|
21
|
+
name: "Extract Data with AI",
|
|
22
|
+
description: "This tool allows you to extract structured data from a web page using ScrapingAnt's AI-powered extraction capabilities. You provide a URL and an AI query (prompt) describing what data you want to extract, and the tool returns the extracted data in a structured format. It supports additional parameters for browser rendering, proxies, and cookies to handle dynamic content and localization.",
|
|
23
|
+
input: ScrapingantExtractDataWithAiInput,
|
|
24
|
+
output: ScrapingantExtractDataWithAiOutput
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.scrapingantExtractDataWithAi = scrapingantExtractDataWithAi;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=extract-data-with-ai.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-data-with-ai.cjs","names":["z","action"],"sources":["../../src/actions/extract-data-with-ai.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantExtractDataWithAiInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"The URL of the page to extract data from.\"),\n cookies: z.string().describe(\"Cookies to use for the request. (e.g. cookie1=value1; cookie2=value2)\").optional(),\n proxy_type: z.string().describe(\"Proxy type to use for the request. (datacenter, residential)\").optional(),\n return_text: z.boolean().describe(\"Return text content of the page. (default: false)\").optional(),\n proxy_country: z.string().describe(\"Proxy country to use for the request. (e.g. US, GB, DE)\").optional(),\n enable_javascript: z.boolean().describe(\"Enable browser rendering. (default: true)\").optional(),\n wait_for_selector: z.string().describe(\"Wait for a specific selector to appear on the page before extracting data.\").optional(),\n extract_properties: z.string().describe(\"A free-form text describing the data you want to extract.\"),\n});\nexport const ScrapingantExtractDataWithAiOutput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"Text content of the page. Only populated when return_text is set to true.\").nullable().optional(),\n content: z.record(z.string(), z.unknown()).describe(\"Extracted data as a JSON object with the requested properties as keys. Can contain nested objects, arrays, strings, numbers, and booleans.\").nullable().optional(),\n status_code: z.number().int().describe(\"HTTP status code of the response from the target website.\").nullable().optional(),\n});\n\nexport const scrapingantExtractDataWithAi = action(\"SCRAPINGANT_EXTRACT_DATA_WITH_AI\", {\n slug: \"scrapingant-extract-data-with-ai\",\n name: \"Extract Data with AI\",\n description: \"This tool allows you to extract structured data from a web page using ScrapingAnt's AI-powered extraction capabilities. You provide a URL and an AI query (prompt) describing what data you want to extract, and the tool returns the extracted data in a structured format. It supports additional parameters for browser rendering, proxies, and cookies to handle dynamic content and localization.\",\n input: ScrapingantExtractDataWithAiInput,\n output: ScrapingantExtractDataWithAiOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAkDA,IAAAA,EAAE,OAAO;CACtE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CACpE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAC/G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CACzG,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAChG,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CACvG,mBAAmBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAC9F,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CAC9H,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D;AACrG,CAAC;AACD,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2EAA2E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3H,SAASA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtN,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC1H,CAAC;AAED,MAAa,+BAA+BC,eAAAA,OAAO,oCAAoC;CACrF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/extract-data-with-ai.d.ts
|
|
4
|
+
declare const ScrapingantExtractDataWithAiInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantExtractDataWithAiOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantExtractDataWithAi: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantExtractDataWithAi };
|
|
9
|
+
//# sourceMappingURL=extract-data-with-ai.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-data-with-ai.d.cts","names":[],"sources":["../../src/actions/extract-data-with-ai.ts"],"mappings":";;;cAIa,iCAAA,EAAmC,CAAA,CAAE,UAShD;AAAA,cACW,kCAAA,EAAoC,CAAA,CAAE,UAIjD;AAAA,cAEW,4BAAA,gCAA4B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/extract-data-with-ai.d.ts
|
|
4
|
+
declare const ScrapingantExtractDataWithAiInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantExtractDataWithAiOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantExtractDataWithAi: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantExtractDataWithAi };
|
|
9
|
+
//# sourceMappingURL=extract-data-with-ai.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-data-with-ai.d.mts","names":[],"sources":["../../src/actions/extract-data-with-ai.ts"],"mappings":";;;cAIa,iCAAA,EAAmC,CAAA,CAAE,UAShD;AAAA,cACW,kCAAA,EAAoC,CAAA,CAAE,UAIjD;AAAA,cAEW,4BAAA,gCAA4B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const scrapingantExtractDataWithAi = action("SCRAPINGANT_EXTRACT_DATA_WITH_AI", {
|
|
4
|
+
slug: "scrapingant-extract-data-with-ai",
|
|
5
|
+
name: "Extract Data with AI",
|
|
6
|
+
description: "This tool allows you to extract structured data from a web page using ScrapingAnt's AI-powered extraction capabilities. You provide a URL and an AI query (prompt) describing what data you want to extract, and the tool returns the extracted data in a structured format. It supports additional parameters for browser rendering, proxies, and cookies to handle dynamic content and localization.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
url: z.string().describe("The URL of the page to extract data from."),
|
|
9
|
+
cookies: z.string().describe("Cookies to use for the request. (e.g. cookie1=value1; cookie2=value2)").optional(),
|
|
10
|
+
proxy_type: z.string().describe("Proxy type to use for the request. (datacenter, residential)").optional(),
|
|
11
|
+
return_text: z.boolean().describe("Return text content of the page. (default: false)").optional(),
|
|
12
|
+
proxy_country: z.string().describe("Proxy country to use for the request. (e.g. US, GB, DE)").optional(),
|
|
13
|
+
enable_javascript: z.boolean().describe("Enable browser rendering. (default: true)").optional(),
|
|
14
|
+
wait_for_selector: z.string().describe("Wait for a specific selector to appear on the page before extracting data.").optional(),
|
|
15
|
+
extract_properties: z.string().describe("A free-form text describing the data you want to extract.")
|
|
16
|
+
}),
|
|
17
|
+
output: z.object({
|
|
18
|
+
text: z.string().describe("Text content of the page. Only populated when return_text is set to true.").nullable().optional(),
|
|
19
|
+
content: z.record(z.string(), z.unknown()).describe("Extracted data as a JSON object with the requested properties as keys. Can contain nested objects, arrays, strings, numbers, and booleans.").nullable().optional(),
|
|
20
|
+
status_code: z.number().int().describe("HTTP status code of the response from the target website.").nullable().optional()
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { scrapingantExtractDataWithAi };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=extract-data-with-ai.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-data-with-ai.mjs","names":[],"sources":["../../src/actions/extract-data-with-ai.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantExtractDataWithAiInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"The URL of the page to extract data from.\"),\n cookies: z.string().describe(\"Cookies to use for the request. (e.g. cookie1=value1; cookie2=value2)\").optional(),\n proxy_type: z.string().describe(\"Proxy type to use for the request. (datacenter, residential)\").optional(),\n return_text: z.boolean().describe(\"Return text content of the page. (default: false)\").optional(),\n proxy_country: z.string().describe(\"Proxy country to use for the request. (e.g. US, GB, DE)\").optional(),\n enable_javascript: z.boolean().describe(\"Enable browser rendering. (default: true)\").optional(),\n wait_for_selector: z.string().describe(\"Wait for a specific selector to appear on the page before extracting data.\").optional(),\n extract_properties: z.string().describe(\"A free-form text describing the data you want to extract.\"),\n});\nexport const ScrapingantExtractDataWithAiOutput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"Text content of the page. Only populated when return_text is set to true.\").nullable().optional(),\n content: z.record(z.string(), z.unknown()).describe(\"Extracted data as a JSON object with the requested properties as keys. Can contain nested objects, arrays, strings, numbers, and booleans.\").nullable().optional(),\n status_code: z.number().int().describe(\"HTTP status code of the response from the target website.\").nullable().optional(),\n});\n\nexport const scrapingantExtractDataWithAi = action(\"SCRAPINGANT_EXTRACT_DATA_WITH_AI\", {\n slug: \"scrapingant-extract-data-with-ai\",\n name: \"Extract Data with AI\",\n description: \"This tool allows you to extract structured data from a web page using ScrapingAnt's AI-powered extraction capabilities. You provide a URL and an AI query (prompt) describing what data you want to extract, and the tool returns the extracted data in a structured format. It supports additional parameters for browser rendering, proxies, and cookies to handle dynamic content and localization.\",\n input: ScrapingantExtractDataWithAiInput,\n output: ScrapingantExtractDataWithAiOutput,\n});\n"],"mappings":";;AAoBA,MAAa,+BAA+B,OAAO,oCAAoC;CACrF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OApB6D,EAAE,OAAO;EACtE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;EACpE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;EAC/G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;EACzG,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;EAChG,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EACvG,mBAAmB,EAAE,QAAQ,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;EAC9F,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;EAC9H,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D;CACrG,CAWS;CACP,QAX8D,EAAE,OAAO;EACvE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2EAA2E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3H,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtN,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1H,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/get-api-credits-usage.ts
|
|
4
|
+
const ScrapingantGetApiCreditsUsageInput = zod.z.object({}).describe("Request model for GetApiCreditsUsage action.\nThis action does not require any specific request parameters beyond authentication.");
|
|
5
|
+
const ScrapingantGetApiCreditsUsageOutput = zod.z.object({
|
|
6
|
+
end_date: zod.z.string().describe("The end date of the current billing period in ISO 8601 format (e.g., '2026-02-07T11:34:42.437395')."),
|
|
7
|
+
plan_name: zod.z.string().describe("The name of the current subscription plan (e.g., 'Free', 'Hobby', 'Business')."),
|
|
8
|
+
start_date: zod.z.string().describe("The start date of the current billing period in ISO 8601 format (e.g., '2026-01-08T11:34:42.437390')."),
|
|
9
|
+
remained_credits: zod.z.number().int().describe("The number of API credits remaining for the current billing period."),
|
|
10
|
+
plan_total_credits: zod.z.number().int().describe("The total number of API credits included in the current subscription plan.")
|
|
11
|
+
}).describe("Response model for GetApiCreditsUsage action.");
|
|
12
|
+
const scrapingantGetApiCreditsUsage = require_action.action("SCRAPINGANT_GET_API_CREDITS_USAGE", {
|
|
13
|
+
slug: "scrapingant-get-api-credits-usage",
|
|
14
|
+
name: "Get API Credits Usage",
|
|
15
|
+
description: "This tool retrieves the current API credit usage status for the authenticated ScrapingAnt account. It enables users to monitor their consumption of API credits, check their current usage against the subscription limits, and manage their API credits effectively.",
|
|
16
|
+
input: ScrapingantGetApiCreditsUsageInput,
|
|
17
|
+
output: ScrapingantGetApiCreditsUsageOutput
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.scrapingantGetApiCreditsUsage = scrapingantGetApiCreditsUsage;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=get-api-credits-usage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-api-credits-usage.cjs","names":["z","action"],"sources":["../../src/actions/get-api-credits-usage.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantGetApiCreditsUsageInput: z.ZodTypeAny = z.object({}).describe(\"Request model for GetApiCreditsUsage action.\\nThis action does not require any specific request parameters beyond authentication.\");\nexport const ScrapingantGetApiCreditsUsageOutput: z.ZodTypeAny = z.object({\n end_date: z.string().describe(\"The end date of the current billing period in ISO 8601 format (e.g., '2026-02-07T11:34:42.437395').\"),\n plan_name: z.string().describe(\"The name of the current subscription plan (e.g., 'Free', 'Hobby', 'Business').\"),\n start_date: z.string().describe(\"The start date of the current billing period in ISO 8601 format (e.g., '2026-01-08T11:34:42.437390').\"),\n remained_credits: z.number().int().describe(\"The number of API credits remaining for the current billing period.\"),\n plan_total_credits: z.number().int().describe(\"The total number of API credits included in the current subscription plan.\"),\n}).describe(\"Response model for GetApiCreditsUsage action.\");\n\nexport const scrapingantGetApiCreditsUsage = action(\"SCRAPINGANT_GET_API_CREDITS_USAGE\", {\n slug: \"scrapingant-get-api-credits-usage\",\n name: \"Get API Credits Usage\",\n description: \"This tool retrieves the current API credit usage status for the authenticated ScrapingAnt account. It enables users to monitor their consumption of API credits, check their current usage against the subscription limits, and manage their API credits effectively.\",\n input: ScrapingantGetApiCreditsUsageInput,\n output: ScrapingantGetApiCreditsUsageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,mIAAmI;AACzN,MAAa,sCAAoDA,IAAAA,EAAE,OAAO;CACxE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qGAAqG;CACnI,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gFAAgF;CAC/G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uGAAuG;CACvI,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qEAAqE;CACjH,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,4EAA4E;AAC5H,CAAC,CAAC,CAAC,SAAS,+CAA+C;AAE3D,MAAa,gCAAgCC,eAAAA,OAAO,qCAAqC;CACvF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-api-credits-usage.d.ts
|
|
4
|
+
declare const ScrapingantGetApiCreditsUsageInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantGetApiCreditsUsageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantGetApiCreditsUsage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantGetApiCreditsUsage };
|
|
9
|
+
//# sourceMappingURL=get-api-credits-usage.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-api-credits-usage.d.cts","names":[],"sources":["../../src/actions/get-api-credits-usage.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAAuK;AAAA,cAC7M,mCAAA,EAAqC,CAAA,CAAE,UAMQ;AAAA,cAE/C,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-api-credits-usage.d.ts
|
|
4
|
+
declare const ScrapingantGetApiCreditsUsageInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantGetApiCreditsUsageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantGetApiCreditsUsage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantGetApiCreditsUsage };
|
|
9
|
+
//# sourceMappingURL=get-api-credits-usage.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-api-credits-usage.d.mts","names":[],"sources":["../../src/actions/get-api-credits-usage.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAAuK;AAAA,cAC7M,mCAAA,EAAqC,CAAA,CAAE,UAMQ;AAAA,cAE/C,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const scrapingantGetApiCreditsUsage = action("SCRAPINGANT_GET_API_CREDITS_USAGE", {
|
|
4
|
+
slug: "scrapingant-get-api-credits-usage",
|
|
5
|
+
name: "Get API Credits Usage",
|
|
6
|
+
description: "This tool retrieves the current API credit usage status for the authenticated ScrapingAnt account. It enables users to monitor their consumption of API credits, check their current usage against the subscription limits, and manage their API credits effectively.",
|
|
7
|
+
input: z.object({}).describe("Request model for GetApiCreditsUsage action.\nThis action does not require any specific request parameters beyond authentication."),
|
|
8
|
+
output: z.object({
|
|
9
|
+
end_date: z.string().describe("The end date of the current billing period in ISO 8601 format (e.g., '2026-02-07T11:34:42.437395')."),
|
|
10
|
+
plan_name: z.string().describe("The name of the current subscription plan (e.g., 'Free', 'Hobby', 'Business')."),
|
|
11
|
+
start_date: z.string().describe("The start date of the current billing period in ISO 8601 format (e.g., '2026-01-08T11:34:42.437390')."),
|
|
12
|
+
remained_credits: z.number().int().describe("The number of API credits remaining for the current billing period."),
|
|
13
|
+
plan_total_credits: z.number().int().describe("The total number of API credits included in the current subscription plan.")
|
|
14
|
+
}).describe("Response model for GetApiCreditsUsage action.")
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { scrapingantGetApiCreditsUsage };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=get-api-credits-usage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-api-credits-usage.mjs","names":[],"sources":["../../src/actions/get-api-credits-usage.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantGetApiCreditsUsageInput: z.ZodTypeAny = z.object({}).describe(\"Request model for GetApiCreditsUsage action.\\nThis action does not require any specific request parameters beyond authentication.\");\nexport const ScrapingantGetApiCreditsUsageOutput: z.ZodTypeAny = z.object({\n end_date: z.string().describe(\"The end date of the current billing period in ISO 8601 format (e.g., '2026-02-07T11:34:42.437395').\"),\n plan_name: z.string().describe(\"The name of the current subscription plan (e.g., 'Free', 'Hobby', 'Business').\"),\n start_date: z.string().describe(\"The start date of the current billing period in ISO 8601 format (e.g., '2026-01-08T11:34:42.437390').\"),\n remained_credits: z.number().int().describe(\"The number of API credits remaining for the current billing period.\"),\n plan_total_credits: z.number().int().describe(\"The total number of API credits included in the current subscription plan.\"),\n}).describe(\"Response model for GetApiCreditsUsage action.\");\n\nexport const scrapingantGetApiCreditsUsage = action(\"SCRAPINGANT_GET_API_CREDITS_USAGE\", {\n slug: \"scrapingant-get-api-credits-usage\",\n name: \"Get API Credits Usage\",\n description: \"This tool retrieves the current API credit usage status for the authenticated ScrapingAnt account. It enables users to monitor their consumption of API credits, check their current usage against the subscription limits, and manage their API credits effectively.\",\n input: ScrapingantGetApiCreditsUsageInput,\n output: ScrapingantGetApiCreditsUsageOutput,\n});\n"],"mappings":";;AAaA,MAAa,gCAAgC,OAAO,qCAAqC;CACvF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAb8D,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,mIAa7E;CACP,QAb+D,EAAE,OAAO;EACxE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,qGAAqG;EACnI,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,gFAAgF;EAC/G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uGAAuG;EACvI,kBAAkB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qEAAqE;EACjH,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,4EAA4E;CAC5H,CAAC,CAAC,CAAC,SAAS,+CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_extract_content_as_markdown = require("./extract-content-as-markdown.cjs");
|
|
3
|
+
const require_extract_data_with_ai = require("./extract-data-with-ai.cjs");
|
|
4
|
+
const require_get_api_credits_usage = require("./get-api-credits-usage.cjs");
|
|
5
|
+
const require_scrape_web_page = require("./scrape-web-page.cjs");
|
|
6
|
+
const require_scrape_webpage_post = require("./scrape-webpage-post.cjs");
|
|
7
|
+
const require_scrape_webpage_put = require("./scrape-webpage-put.cjs");
|
|
8
|
+
const require_scrape_with_extended_json_output = require("./scrape-with-extended-json-output.cjs");
|
|
9
|
+
exports.scrapingantExtractContentAsMarkdown = require_extract_content_as_markdown.scrapingantExtractContentAsMarkdown;
|
|
10
|
+
exports.scrapingantExtractDataWithAi = require_extract_data_with_ai.scrapingantExtractDataWithAi;
|
|
11
|
+
exports.scrapingantGetApiCreditsUsage = require_get_api_credits_usage.scrapingantGetApiCreditsUsage;
|
|
12
|
+
exports.scrapingantScrapeWebPage = require_scrape_web_page.scrapingantScrapeWebPage;
|
|
13
|
+
exports.scrapingantScrapeWebpagePost = require_scrape_webpage_post.scrapingantScrapeWebpagePost;
|
|
14
|
+
exports.scrapingantScrapeWebpagePut = require_scrape_webpage_put.scrapingantScrapeWebpagePut;
|
|
15
|
+
exports.scrapingantScrapeWithExtendedJsonOutput = require_scrape_with_extended_json_output.scrapingantScrapeWithExtendedJsonOutput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { scrapingantExtractContentAsMarkdown } from "./extract-content-as-markdown.cjs";
|
|
2
|
+
import { scrapingantExtractDataWithAi } from "./extract-data-with-ai.cjs";
|
|
3
|
+
import { scrapingantGetApiCreditsUsage } from "./get-api-credits-usage.cjs";
|
|
4
|
+
import { scrapingantScrapeWebPage } from "./scrape-web-page.cjs";
|
|
5
|
+
import { scrapingantScrapeWebpagePost } from "./scrape-webpage-post.cjs";
|
|
6
|
+
import { scrapingantScrapeWebpagePut } from "./scrape-webpage-put.cjs";
|
|
7
|
+
import { scrapingantScrapeWithExtendedJsonOutput } from "./scrape-with-extended-json-output.cjs";
|
|
8
|
+
export { scrapingantExtractContentAsMarkdown, scrapingantExtractDataWithAi, scrapingantGetApiCreditsUsage, scrapingantScrapeWebPage, scrapingantScrapeWebpagePost, scrapingantScrapeWebpagePut, scrapingantScrapeWithExtendedJsonOutput };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { scrapingantExtractContentAsMarkdown } from "./extract-content-as-markdown.mjs";
|
|
2
|
+
import { scrapingantExtractDataWithAi } from "./extract-data-with-ai.mjs";
|
|
3
|
+
import { scrapingantGetApiCreditsUsage } from "./get-api-credits-usage.mjs";
|
|
4
|
+
import { scrapingantScrapeWebPage } from "./scrape-web-page.mjs";
|
|
5
|
+
import { scrapingantScrapeWebpagePost } from "./scrape-webpage-post.mjs";
|
|
6
|
+
import { scrapingantScrapeWebpagePut } from "./scrape-webpage-put.mjs";
|
|
7
|
+
import { scrapingantScrapeWithExtendedJsonOutput } from "./scrape-with-extended-json-output.mjs";
|
|
8
|
+
export { scrapingantExtractContentAsMarkdown, scrapingantExtractDataWithAi, scrapingantGetApiCreditsUsage, scrapingantScrapeWebPage, scrapingantScrapeWebpagePost, scrapingantScrapeWebpagePut, scrapingantScrapeWithExtendedJsonOutput };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { scrapingantExtractContentAsMarkdown } from "./extract-content-as-markdown.mjs";
|
|
2
|
+
import { scrapingantExtractDataWithAi } from "./extract-data-with-ai.mjs";
|
|
3
|
+
import { scrapingantGetApiCreditsUsage } from "./get-api-credits-usage.mjs";
|
|
4
|
+
import { scrapingantScrapeWebPage } from "./scrape-web-page.mjs";
|
|
5
|
+
import { scrapingantScrapeWebpagePost } from "./scrape-webpage-post.mjs";
|
|
6
|
+
import { scrapingantScrapeWebpagePut } from "./scrape-webpage-put.mjs";
|
|
7
|
+
import { scrapingantScrapeWithExtendedJsonOutput } from "./scrape-with-extended-json-output.mjs";
|
|
8
|
+
export { scrapingantExtractContentAsMarkdown, scrapingantExtractDataWithAi, scrapingantGetApiCreditsUsage, scrapingantScrapeWebPage, scrapingantScrapeWebpagePost, scrapingantScrapeWebpagePut, scrapingantScrapeWithExtendedJsonOutput };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/scrape-web-page.ts
|
|
4
|
+
const ScrapingantScrapeWebPageInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("URL of the web page to scrape."),
|
|
6
|
+
browser: zod.z.boolean().default(true).describe("Enable to use a headless browser for scraping. Defaults to True. If False, JavaScript will not be rendered.").optional(),
|
|
7
|
+
cookies: zod.z.string().describe("Cookies to pass with the scraping request.").optional(),
|
|
8
|
+
js_snippet: zod.z.string().describe("Base64 encoded JavaScript snippet to execute on the page. Requires headless browser.").optional(),
|
|
9
|
+
proxy_type: zod.z.enum(["datacenter", "residential"]).describe("Specifies the type of proxy to use.").optional(),
|
|
10
|
+
proxy_country: zod.z.string().describe("Specifies the country for the proxy.").optional(),
|
|
11
|
+
block_resource: zod.z.array(zod.z.enum([
|
|
12
|
+
"document",
|
|
13
|
+
"stylesheet",
|
|
14
|
+
"image",
|
|
15
|
+
"media",
|
|
16
|
+
"font",
|
|
17
|
+
"script",
|
|
18
|
+
"texttrack",
|
|
19
|
+
"xhr",
|
|
20
|
+
"fetch",
|
|
21
|
+
"eventsource",
|
|
22
|
+
"websocket",
|
|
23
|
+
"manifest",
|
|
24
|
+
"other"
|
|
25
|
+
])).describe("List of resource types to block. Requires headless browser.").optional(),
|
|
26
|
+
wait_for_selector: zod.z.string().describe("CSS selector to wait for before returning the result. Requires headless browser.").optional(),
|
|
27
|
+
return_page_source: zod.z.boolean().default(false).describe("Enable to return the raw HTML from the server without JavaScript rendering. Requires headless browser. Defaults to False.").optional()
|
|
28
|
+
});
|
|
29
|
+
const ScrapingantScrapeWebPageOutput = zod.z.object({ content: zod.z.string().describe("The HTML content of the scraped web page.") });
|
|
30
|
+
const scrapingantScrapeWebPage = require_action.action("SCRAPINGANT_SCRAPE_WEB_PAGE", {
|
|
31
|
+
slug: "scrapingant-scrape-web-page",
|
|
32
|
+
name: "Scrape Web Page",
|
|
33
|
+
description: "This tool scrapes a web page using the ScrapingAnt API. It fetches the HTML content of the specified URL. Users can customize the scraping behavior by enabling a headless browser, using proxies, waiting for specific elements, executing JavaScript, passing cookies, and blocking certain resources.",
|
|
34
|
+
input: ScrapingantScrapeWebPageInput,
|
|
35
|
+
output: ScrapingantScrapeWebPageOutput
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.scrapingantScrapeWebPage = scrapingantScrapeWebPage;
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=scrape-web-page.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrape-web-page.cjs","names":["z","action"],"sources":["../../src/actions/scrape-web-page.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantScrapeWebPageInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the web page to scrape.\"),\n browser: z.boolean().default(true).describe(\"Enable to use a headless browser for scraping. Defaults to True. If False, JavaScript will not be rendered.\").optional(),\n cookies: z.string().describe(\"Cookies to pass with the scraping request.\").optional(),\n js_snippet: z.string().describe(\"Base64 encoded JavaScript snippet to execute on the page. Requires headless browser.\").optional(),\n proxy_type: z.enum([\"datacenter\", \"residential\"]).describe(\"Specifies the type of proxy to use.\").optional(),\n proxy_country: z.string().describe(\"Specifies the country for the proxy.\").optional(),\n block_resource: z.array(z.enum([\"document\", \"stylesheet\", \"image\", \"media\", \"font\", \"script\", \"texttrack\", \"xhr\", \"fetch\", \"eventsource\", \"websocket\", \"manifest\", \"other\"])).describe(\"List of resource types to block. Requires headless browser.\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector to wait for before returning the result. Requires headless browser.\").optional(),\n return_page_source: z.boolean().default(false).describe(\"Enable to return the raw HTML from the server without JavaScript rendering. Requires headless browser. Defaults to False.\").optional(),\n});\nexport const ScrapingantScrapeWebPageOutput: z.ZodTypeAny = z.object({\n content: z.string().describe(\"The HTML content of the scraped web page.\"),\n});\n\nexport const scrapingantScrapeWebPage = action(\"SCRAPINGANT_SCRAPE_WEB_PAGE\", {\n slug: \"scrapingant-scrape-web-page\",\n name: \"Scrape Web Page\",\n description: \"This tool scrapes a web page using the ScrapingAnt API. It fetches the HTML content of the specified URL. Users can customize the scraping behavior by enabling a headless browser, using proxies, waiting for specific elements, executing JavaScript, passing cookies, and blocking certain resources.\",\n input: ScrapingantScrapeWebPageInput,\n output: ScrapingantScrapeWebPageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8CA,IAAAA,EAAE,OAAO;CAClE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CACzD,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;CACpK,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;CACpF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACjI,YAAYA,IAAAA,EAAE,KAAK,CAAC,cAAc,aAAa,CAAC,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CAC3G,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACpF,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAY;EAAc;EAAS;EAAS;EAAQ;EAAU;EAAa;EAAO;EAAS;EAAe;EAAa;EAAY;CAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CAC/P,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACpI,oBAAoBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,2HAA2H,CAAC,CAAC,SAAS;AAChM,CAAC;AACD,MAAa,iCAA+CA,IAAAA,EAAE,OAAO,EACnE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,EAC1E,CAAC;AAED,MAAa,2BAA2BC,eAAAA,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/scrape-web-page.d.ts
|
|
4
|
+
declare const ScrapingantScrapeWebPageInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantScrapeWebPageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantScrapeWebPage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantScrapeWebPage };
|
|
9
|
+
//# sourceMappingURL=scrape-web-page.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrape-web-page.d.cts","names":[],"sources":["../../src/actions/scrape-web-page.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAU5C;AAAA,cACW,8BAAA,EAAgC,CAAA,CAAE,UAE7C;AAAA,cAEW,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/scrape-web-page.d.ts
|
|
4
|
+
declare const ScrapingantScrapeWebPageInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScrapingantScrapeWebPageOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scrapingantScrapeWebPage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scrapingantScrapeWebPage };
|
|
9
|
+
//# sourceMappingURL=scrape-web-page.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrape-web-page.d.mts","names":[],"sources":["../../src/actions/scrape-web-page.ts"],"mappings":";;;cAIa,6BAAA,EAA+B,CAAA,CAAE,UAU5C;AAAA,cACW,8BAAA,EAAgC,CAAA,CAAE,UAE7C;AAAA,cAEW,wBAAA,gCAAwB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const scrapingantScrapeWebPage = action("SCRAPINGANT_SCRAPE_WEB_PAGE", {
|
|
4
|
+
slug: "scrapingant-scrape-web-page",
|
|
5
|
+
name: "Scrape Web Page",
|
|
6
|
+
description: "This tool scrapes a web page using the ScrapingAnt API. It fetches the HTML content of the specified URL. Users can customize the scraping behavior by enabling a headless browser, using proxies, waiting for specific elements, executing JavaScript, passing cookies, and blocking certain resources.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
url: z.string().describe("URL of the web page to scrape."),
|
|
9
|
+
browser: z.boolean().default(true).describe("Enable to use a headless browser for scraping. Defaults to True. If False, JavaScript will not be rendered.").optional(),
|
|
10
|
+
cookies: z.string().describe("Cookies to pass with the scraping request.").optional(),
|
|
11
|
+
js_snippet: z.string().describe("Base64 encoded JavaScript snippet to execute on the page. Requires headless browser.").optional(),
|
|
12
|
+
proxy_type: z.enum(["datacenter", "residential"]).describe("Specifies the type of proxy to use.").optional(),
|
|
13
|
+
proxy_country: z.string().describe("Specifies the country for the proxy.").optional(),
|
|
14
|
+
block_resource: z.array(z.enum([
|
|
15
|
+
"document",
|
|
16
|
+
"stylesheet",
|
|
17
|
+
"image",
|
|
18
|
+
"media",
|
|
19
|
+
"font",
|
|
20
|
+
"script",
|
|
21
|
+
"texttrack",
|
|
22
|
+
"xhr",
|
|
23
|
+
"fetch",
|
|
24
|
+
"eventsource",
|
|
25
|
+
"websocket",
|
|
26
|
+
"manifest",
|
|
27
|
+
"other"
|
|
28
|
+
])).describe("List of resource types to block. Requires headless browser.").optional(),
|
|
29
|
+
wait_for_selector: z.string().describe("CSS selector to wait for before returning the result. Requires headless browser.").optional(),
|
|
30
|
+
return_page_source: z.boolean().default(false).describe("Enable to return the raw HTML from the server without JavaScript rendering. Requires headless browser. Defaults to False.").optional()
|
|
31
|
+
}),
|
|
32
|
+
output: z.object({ content: z.string().describe("The HTML content of the scraped web page.") })
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { scrapingantScrapeWebPage };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=scrape-web-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrape-web-page.mjs","names":[],"sources":["../../src/actions/scrape-web-page.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapingantScrapeWebPageInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the web page to scrape.\"),\n browser: z.boolean().default(true).describe(\"Enable to use a headless browser for scraping. Defaults to True. If False, JavaScript will not be rendered.\").optional(),\n cookies: z.string().describe(\"Cookies to pass with the scraping request.\").optional(),\n js_snippet: z.string().describe(\"Base64 encoded JavaScript snippet to execute on the page. Requires headless browser.\").optional(),\n proxy_type: z.enum([\"datacenter\", \"residential\"]).describe(\"Specifies the type of proxy to use.\").optional(),\n proxy_country: z.string().describe(\"Specifies the country for the proxy.\").optional(),\n block_resource: z.array(z.enum([\"document\", \"stylesheet\", \"image\", \"media\", \"font\", \"script\", \"texttrack\", \"xhr\", \"fetch\", \"eventsource\", \"websocket\", \"manifest\", \"other\"])).describe(\"List of resource types to block. Requires headless browser.\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector to wait for before returning the result. Requires headless browser.\").optional(),\n return_page_source: z.boolean().default(false).describe(\"Enable to return the raw HTML from the server without JavaScript rendering. Requires headless browser. Defaults to False.\").optional(),\n});\nexport const ScrapingantScrapeWebPageOutput: z.ZodTypeAny = z.object({\n content: z.string().describe(\"The HTML content of the scraped web page.\"),\n});\n\nexport const scrapingantScrapeWebPage = action(\"SCRAPINGANT_SCRAPE_WEB_PAGE\", {\n slug: \"scrapingant-scrape-web-page\",\n name: \"Scrape Web Page\",\n description: \"This tool scrapes a web page using the ScrapingAnt API. It fetches the HTML content of the specified URL. Users can customize the scraping behavior by enabling a headless browser, using proxies, waiting for specific elements, executing JavaScript, passing cookies, and blocking certain resources.\",\n input: ScrapingantScrapeWebPageInput,\n output: ScrapingantScrapeWebPageOutput,\n});\n"],"mappings":";;AAmBA,MAAa,2BAA2B,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnByD,EAAE,OAAO;EAClE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;EACzD,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;EACpK,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;EACpF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;EACjI,YAAY,EAAE,KAAK,CAAC,cAAc,aAAa,CAAC,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAC3G,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;EACpF,gBAAgB,EAAE,MAAM,EAAE,KAAK;GAAC;GAAY;GAAc;GAAS;GAAS;GAAQ;GAAU;GAAa;GAAO;GAAS;GAAe;GAAa;GAAY;EAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EAC/P,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;EACpI,oBAAoB,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,2HAA2H,CAAC,CAAC,SAAS;CAChM,CASS;CACP,QAT0D,EAAE,OAAO,EACnE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,EAC1E,CAOU;AACV,CAAC"}
|