n8n-nodes-askcrawl 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aurevant LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,205 @@
1
- # Temporary Holding Version
1
+ # n8n-nodes-askcrawl
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An [n8n](https://n8n.io) community node for [AskCrawl](https://www.askcrawl.com): ask ChatGPT, Perplexity, Gemini, Google AI Overviews and AI Mode, Copilot, DeepSeek, Doubao and other AI platforms your questions, as many times as you need, and get back the answer text, the sources and the capture conditions. Then measure how often your brand is mentioned and your site is cited, compare with competitors, and track changes over time, all inside a workflow.
4
+
5
+ [Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Waiting for answers](#waiting-for-answers) · [Webhooks](#webhooks) · [Cost](#cost) · [Example workflow](#example-workflow)
6
+
7
+ ## Installation
8
+
9
+ Follow the [n8n guide to installing community nodes](https://docs.n8n.io/integrations/community-nodes/installation/):
10
+
11
+ 1. In n8n, open **Settings → Community Nodes** and select **Install**.
12
+ 2. Enter `n8n-nodes-askcrawl` and install.
13
+
14
+ On a self-hosted instance without the UI option, install the package in your n8n custom nodes folder (`npm install n8n-nodes-askcrawl` in `~/.n8n/nodes`) and restart n8n.
15
+
16
+ ## Credentials
17
+
18
+ 1. Create an API key in the [AskCrawl console](https://www.askcrawl.com/console/keys/). Keys start with `ac_`.
19
+ 2. In n8n, create an **AskCrawl API** credential and paste the key.
20
+ 3. n8n tests it by reading your balance (`GET /v1/account`), which is free.
21
+
22
+ The key is sent as `Authorization: Bearer <key>`. Every request from this node also carries `X-Source: n8n`, so you can see its usage separately in the AskCrawl console.
23
+
24
+ ## Operations
25
+
26
+ | Resource | Operation | API | Cost |
27
+ |---|---|---|---|
28
+ | Job | **Quote** | `POST /v1/answers/quote` | Free; creates nothing |
29
+ | Job | **Submit** | `POST /v1/answers` | Per answer (see [Cost](#cost)) |
30
+ | Job | **Get** | `GET /v1/jobs/{id}` | Free |
31
+ | Answer | **Get Many** | `GET /v1/answers?job_id=` | Free |
32
+ | Answer | **Get** | `GET /v1/answers/{id}` | Free |
33
+ | Answer | **Get Evidence** | `GET /v1/answers/{id}/evidence` | Free |
34
+ | Report | **Visibility** | `POST /v1/reports/visibility` | Free |
35
+ | Report | **Competitor Share** | `POST /v1/reports/visibility` with competitors | Free |
36
+ | Report | **Before and After** | `POST /v1/reports/compare` | Free |
37
+ | Data Endpoint | **Call** | Any of the 24 data endpoints | Per call, only when data is returned (a few endpoints say otherwise in their description) |
38
+ | Account | **Get** | `GET /v1/account` | Free |
39
+
40
+ The platform list in **Submit** and **Quote** shows every open platform with its price per answer. The full catalog, with supported countries and fields, is at [askcrawl.com/engines](https://www.askcrawl.com/engines/).
41
+
42
+ ### Job → Quote
43
+
44
+ See the most a job could cost before you run it.
45
+
46
+ - **Prompts**: one per line, or an expression that returns an array
47
+ - **Platforms**: for example ChatGPT (`chatgpt.web`) and Perplexity API (`perplexity.api`)
48
+ - **Samples per Prompt**: answers vary between asks, so repeat each prompt to measure how often something comes up
49
+
50
+ Output: the number of answers, `max_charge` (the most the job could cost, in US dollars) and the price per answer on each platform.
51
+
52
+ ### Job → Submit
53
+
54
+ The same fields as Quote, plus:
55
+
56
+ - **Most You Will Pay (USD)** (required): a ceiling. If the job could cost more, nothing is submitted and nothing is charged. Put a Quote node before it and use `{{ $json.max_charge }}`.
57
+ - **Wait for Answers**: see [Waiting for answers](#waiting-for-answers).
58
+ - **Output**: *Answers* (one item per finished answer, the default) or *Job* (one item with status, counts and charges). If answers are still pending when the wait ends, the node returns the job either way, so the workflow can tell it isn't finished.
59
+ - **Options**: country, region, tier, screenshot, thinking mode, fallback, tags, prompt set, **Brands to Track** (free: each answer then lists which of your brands it mentions, in what order, and whether it cites their domains), **Webhook URL**, and **Idempotency Key**.
60
+
61
+ The node sends an `Idempotency-Key` with every submission, by default one per execution, node, run and item. If n8n retries the node (Retry On Fail), the API returns the same job instead of creating a second one, so you are never charged twice; each pass of a loop is a new request.
62
+
63
+ Each answer item looks like this (shortened):
64
+
65
+ ```json
66
+ {
67
+ "id": "…",
68
+ "job_id": "…",
69
+ "engine": "perplexity.api",
70
+ "prompt": "What is the best CRM software for small businesses?",
71
+ "sample": { "index": 1, "of": 1 },
72
+ "status": "answered",
73
+ "search_triggered": true,
74
+ "text": "**HubSpot CRM is the best default choice for most small businesses** because …",
75
+ "citations": [
76
+ { "position": 1, "url": "https://www.pcmag.com/picks/the-best-small-business-crm-software", "domain": "pcmag.com", "title": "The Best Small Business CRM Software We've Tested for 2026", "cited": null }
77
+ ],
78
+ "conditions": { "surface": "api", "login": null, "requested": { "country": "US", "region": null }, "actual": { "country": null, "region": null } }
79
+ }
80
+ ```
81
+
82
+ `status` is `answered`, `no_answer`, `refused` or `failed`. `cited` is `true` when the source was used in the answer, `false` when it was only found while searching, and `null` when the platform doesn't show the difference. Field reference: [API docs](https://www.askcrawl.com/docs/).
83
+
84
+ ### Job → Get
85
+
86
+ Progress, amount held and amount charged. Turn on **Poll Until Finished** to keep checking until every answer is in, up to **Max Wait (Minutes)**.
87
+
88
+ ### Answer → Get Many, Get, Get Evidence
89
+
90
+ - **Get Many**: all answers of a job, one item each (or up to **Limit**). Finished answers are available while the job is still running.
91
+ - **Get**: one answer by ID.
92
+ - **Get Evidence**: download links for the raw response, page archive and screenshot. The links last 15 minutes; ask again for fresh ones.
93
+
94
+ ### Report → Visibility
95
+
96
+ Mention rate and citation rate with 95% intervals, one item per platform (and set of capture conditions).
97
+
98
+ - **Job IDs**: up to 20, separated by commas
99
+ - **Brand**: needed for the mention rate. **Domains**: needed for the citation rate
100
+ - **Options**: aliases, excluded phrases, competitors, only some platforms
101
+
102
+ Each rate has `value`, `low`, `high`, `sample_size` and `enough`. `enough: false` means there isn't enough data for a conclusion. A rate that wasn't measured is `null`, never 0%. The method is public: [ai-visibility-stats](https://github.com/askcrawlhq/ai-visibility-stats).
103
+
104
+ ### Report → Competitor Share
105
+
106
+ Give your brand and at least one competitor. You get one item per platform and brand, with the brand's `mention_rate` and `first_share` (the share of answers mentioning any of these brands where this one comes first).
107
+
108
+ ### Report → Before and After
109
+
110
+ Compare earlier jobs with later ones run with the same prompts and conditions. Each metric gets a difference, an interval and a verdict: `up`, `down`, `not_clear`, `not_enough` or `single_prompt`.
111
+
112
+ ### Data Endpoint → Call
113
+
114
+ One operation for the 24 data endpoints: search results pages (Google, Bing, Baidu, Naver, Yahoo, Brave), site search, Reddit, YouTube, Amazon and Walmart products, web pages to markdown, screenshots, keyword suggestions and volumes. Choose the endpoint, then give its parameters as JSON:
115
+
116
+ ```json
117
+ { "query": "best crm for small business" }
118
+ ```
119
+
120
+ The endpoint list shows each price. Parameters per endpoint are in the [API docs](https://www.askcrawl.com/docs/). Optional: **Most You Will Pay** and **Idempotency Key**.
121
+
122
+ ## Waiting for answers
123
+
124
+ Platforms take from a few seconds to several minutes. **Submit** offers three ways to wait:
125
+
126
+ | Wait for Answers | What happens | Use it when |
127
+ |---|---|---|
128
+ | **Poll Until Finished** (default) | The node checks the job, waiting as long as the API suggests between checks, until every answer is in or **Max Wait** passes | Most workflows |
129
+ | **Hold the Reply (up to 50 s)** | The API holds its reply until the job ends, up to 50 seconds | Fast platforms such as `perplexity.api`, `claude.api`, `deepseek.api` (marked in the platform list) |
130
+ | **Return at Once** | The node returns the job right away | Long jobs: use a webhook, or **Job → Get** later |
131
+
132
+ Checking a job is free, so polling costs nothing extra. For long jobs, a webhook avoids keeping an execution open.
133
+
134
+ ## Webhooks
135
+
136
+ Put a public `https` URL in **Options → Webhook URL** and AskCrawl POSTs a signed `job.completed` event to it when the job ends. The event carries the job (status, counts, amount charged) and links, not the answers.
137
+
138
+ 1. Create a second workflow that starts with a **Webhook** node: method `POST`, **Respond** *Immediately*. Under **Options**, turn on **Raw Body** (the signature covers the body exactly as sent).
139
+ 2. Activate it and copy its **Production URL** into **Webhook URL** in the Submit node. The URL must be public `https` on port 443; on a self-hosted n8n, that means your public domain, not `localhost`.
140
+ 3. After the Webhook node, add an **AskCrawl → Answer → Get Many** node with **Job ID** set to `{{ $json.data.job.id }}` (after the check below).
141
+
142
+ Deliveries are retried until a 2xx reply, up to 6 attempts in about 23 hours, so the same event can arrive twice: use `id` to skip repeats.
143
+
144
+ **Check the signature** with a **Code** node (Run Once for All Items) right after the Webhook node. Create the signing secret in AskCrawl under [Console → Settings](https://www.askcrawl.com/console/settings/). Below it is read from an n8n variable (`$vars`); without variables, paste it into the code instead. On self-hosted n8n, allow the crypto module with `NODE_FUNCTION_ALLOW_BUILTIN=crypto`.
145
+
146
+ ```js
147
+ const crypto = require('crypto');
148
+ const secret = $vars.ASKCRAWL_WEBHOOK_SECRET; // whsec_…
149
+ const headers = $input.first().json.headers;
150
+ const raw = await this.helpers.getBinaryDataBuffer(0, 'data');
151
+
152
+ const id = headers['webhook-id'];
153
+ const timestamp = headers['webhook-timestamp'];
154
+ const key = Buffer.from(secret.slice('whsec_'.length), 'base64');
155
+ const expected = 'v1,' + crypto.createHmac('sha256', key).update(`${id}.${timestamp}.`).update(raw).digest('base64');
156
+ const valid = (headers['webhook-signature'] || '').split(' ').some(
157
+ (signature) => signature.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected)),
158
+ );
159
+ if (!valid || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) throw new Error('Not a valid AskCrawl webhook');
160
+
161
+ return [{ json: JSON.parse(raw.toString('utf8')) }];
162
+ ```
163
+
164
+ The signature follows [Standard Webhooks](https://www.standardwebhooks.com/): `webhook-signature` is `v1,` plus the base64 HMAC-SHA256 of `id.timestamp.body`, keyed with the base64-decoded part of the secret after `whsec_`.
165
+
166
+ ## Cost
167
+
168
+ AskCrawl is pay as you go from a prepaid balance, with no subscription. Prices: [askcrawl.com/pricing](https://www.askcrawl.com/pricing/).
169
+
170
+ - **Free:** quotes, checking jobs, reading answers and evidence, reports, the account, brand tracking and webhooks.
171
+ - **Submit** holds the most the job can cost when it starts, then settles each answer on its own: `answered`, `no_answer` and `refused` are charged; **`failed` answers are not charged** and their hold is released. Screenshots and thinking mode are charged extra only when a screenshot is captured or thinking was used.
172
+ - **Data endpoints** are charged per call, and only when data is returned, except for the few endpoints whose description says they also charge when nothing is found.
173
+ - **Error responses are never charged.** The one exception, `settlement_unknown`, means "send the same request again"; the node does that with the same idempotency key, so it is charged at most once.
174
+ - **Most You Will Pay** is a hard ceiling: if a request could cost more, it is refused and nothing runs.
175
+
176
+ ## Example workflow
177
+
178
+ Weekly brand check:
179
+
180
+ 1. **Schedule Trigger**: every Monday.
181
+ 2. **AskCrawl → Job → Quote**: prompts such as `best crm for small business`, platforms `chatgpt.web`, `perplexity.web`, `google.ai_overview`, 5 samples.
182
+ 3. **AskCrawl → Job → Submit**: same fields, **Most You Will Pay** `{{ $json.max_charge }}`, **Output** *Job*, **Wait for Answers** *Poll Until Finished*.
183
+ 4. **AskCrawl → Report → Competitor Share**: **Job IDs** `{{ $json.id }}`, your brand and competitors.
184
+ 5. **Google Sheets** or **Slack**: append one row per platform and brand.
185
+
186
+ ## Resources
187
+
188
+ - [AskCrawl API docs](https://www.askcrawl.com/docs/) and [OpenAPI spec](https://www.askcrawl.com/openapi.json)
189
+ - [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
190
+ - Questions: support@askcrawl.com
191
+
192
+ ## Development
193
+
194
+ ```bash
195
+ npm ci
196
+ npm run lint
197
+ npm test # builds, then runs offline tests with a fake HTTP layer; no API calls
198
+ npm run dev # starts n8n with this node loaded
199
+ ```
200
+
201
+ Releases are published from GitHub Actions with npm provenance (`.github/workflows/publish.yml`): run `npm run release` to bump the version and push a tag.
202
+
203
+ ## License
204
+
205
+ [MIT](LICENSE) © Aurevant LLC
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class AskCrawlApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AskCrawlApi = void 0;
4
+ class AskCrawlApi {
5
+ constructor() {
6
+ this.name = 'askCrawlApi';
7
+ this.displayName = 'AskCrawl API';
8
+ this.icon = { light: 'file:../icons/askcrawl.svg', dark: 'file:../icons/askcrawl.dark.svg' };
9
+ this.documentationUrl = 'https://github.com/askcrawlhq/n8n-nodes-askcrawl?tab=readme-ov-file#credentials';
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: { password: true },
16
+ required: true,
17
+ default: '',
18
+ description: 'An AskCrawl API key (starts with ac_). Create one at https://www.askcrawl.com/console/keys/.',
19
+ },
20
+ ];
21
+ this.authenticate = {
22
+ type: 'generic',
23
+ properties: {
24
+ headers: {
25
+ Authorization: '=Bearer {{$credentials.apiKey}}',
26
+ },
27
+ },
28
+ };
29
+ this.test = {
30
+ request: {
31
+ baseURL: 'https://api.askcrawl.com',
32
+ url: '/v1/account',
33
+ },
34
+ };
35
+ }
36
+ }
37
+ exports.AskCrawlApi = AskCrawlApi;
38
+ //# sourceMappingURL=AskCrawlApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskCrawlApi.credentials.js","sourceRoot":"","sources":["../../credentials/AskCrawlApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,cAAc,CAAC;QAE7B,SAAI,GAAS,EAAE,KAAK,EAAE,4BAA4B,EAAE,IAAI,EAAE,iCAAiC,EAAE,CAAC;QAE9F,qBAAgB,GACf,iFAAiF,CAAC;QAEnF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,8FAA8F;aAC/F;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,0BAA0B;gBACnC,GAAG,EAAE,aAAa;aAClB;SACD,CAAC;IACH,CAAC;CAAA;AAvCD,kCAuCC"}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="9" cy="9" r="2.7" fill="#f4f6fa"/><circle cx="16" cy="9" r="2.7" fill="#6f8cff"/><circle cx="23" cy="9" r="2.7" fill="#5d6778"/><circle cx="9" cy="16" r="2.7" fill="#f4f6fa"/><circle cx="16" cy="16" r="2.7" fill="#6f8cff"/><circle cx="23" cy="16" r="2.7" fill="#f4f6fa"/><circle cx="9" cy="23" r="2.7" fill="#5d6778"/><circle cx="16" cy="23" r="2.7" fill="#6f8cff"/><circle cx="23" cy="23" r="2.7" fill="#f4f6fa"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="9" cy="9" r="2.7" fill="#0c0f16"/><circle cx="16" cy="9" r="2.7" fill="#2f57f5"/><circle cx="23" cy="9" r="2.7" fill="#c3cbd8"/><circle cx="9" cy="16" r="2.7" fill="#0c0f16"/><circle cx="16" cy="16" r="2.7" fill="#2f57f5"/><circle cx="23" cy="16" r="2.7" fill="#0c0f16"/><circle cx="9" cy="23" r="2.7" fill="#c3cbd8"/><circle cx="16" cy="23" r="2.7" fill="#2f57f5"/><circle cx="23" cy="23" r="2.7" fill="#0c0f16"/></svg>
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class AskCrawl implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }