@youdotcom-oss/n8n-nodes-youdotcom 0.1.0 → 0.2.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# n8n-nodes-youdotcom
|
|
2
2
|
|
|
3
|
-
An n8n community node for integrating [You.com APIs](https://you.com/
|
|
3
|
+
An n8n community node for integrating [You.com APIs](https://you.com/apis) into your n8n workflows. Search the web, extract content from URLs, or get AI-powered answers with citations.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ Search the web and news using You.com's search API.
|
|
|
25
25
|
|
|
26
26
|
| Parameter | Required | Description |
|
|
27
27
|
| ---------------- | -------- | ------------------------------------------------------- |
|
|
28
|
-
| Query | Yes | The search query
|
|
28
|
+
| Query | Yes | The search query (supports search operators, see below) |
|
|
29
29
|
| Count | No | Maximum number of results per section (1-100) |
|
|
30
30
|
| Country | No | Country code for geographical focus (e.g., US, GB, DE) |
|
|
31
31
|
| Freshness | No | Filter by recency: day, week, month, or year |
|
|
@@ -34,10 +34,22 @@ Search the web and news using You.com's search API.
|
|
|
34
34
|
| Livecrawl Format | No | Format for livecrawled content (HTML or Markdown) |
|
|
35
35
|
| Offset | No | Pagination offset (0-9) |
|
|
36
36
|
| Safe Search | No | Content moderation: off, moderate, or strict |
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
|
|
38
|
+
**Search operators:**
|
|
39
|
+
|
|
40
|
+
Include these directly in your query to refine results. See [search operators documentation](https://docs.you.com/search/search-operators) for details.
|
|
41
|
+
|
|
42
|
+
| Operator | Example | Description |
|
|
43
|
+
| ---------- | ----------------------- | -------------------------------------------------- |
|
|
44
|
+
| `site:` | `site:github.com` | Restrict to a specific domain (including subdomains) |
|
|
45
|
+
| `filetype:`| `filetype:pdf` | Filter by file type |
|
|
46
|
+
| `+` | `+GAAP` | Require exact term in results |
|
|
47
|
+
| `-` | `-marketing` | Exclude exact term from results |
|
|
48
|
+
| `AND` | `Python AND PyTorch` | Logical AND to combine expressions |
|
|
49
|
+
| `OR` | `Python OR PyTorch` | Logical OR to combine expressions |
|
|
50
|
+
| `NOT` | `NOT site:example.com` | Negate an expression |
|
|
51
|
+
|
|
52
|
+
**Example:** `machine learning (Python OR PyTorch) -TensorFlow filetype:pdf` searches for ML content about Python or PyTorch, excluding TensorFlow, in PDF format.
|
|
41
53
|
|
|
42
54
|
### Get Contents
|
|
43
55
|
|
|
@@ -72,7 +84,7 @@ Get AI-generated answers with web search and citations. Perfect for RAG (Retriev
|
|
|
72
84
|
|
|
73
85
|
## Credentials
|
|
74
86
|
|
|
75
|
-
1. Visit [you.com/api](https://you.com/api) to get an API key
|
|
87
|
+
1. Visit [you.com/platform/api-keys](https://you.com/platform/api-keys) to get an API key
|
|
76
88
|
2. In n8n, go to **Credentials > New Credential**
|
|
77
89
|
3. Search for "You.com API"
|
|
78
90
|
4. Enter your API key and save
|
|
@@ -107,9 +119,10 @@ bun run check
|
|
|
107
119
|
## Resources
|
|
108
120
|
|
|
109
121
|
- [You.com API Documentation](https://docs.you.com/)
|
|
110
|
-
- [Search API Reference](https://docs.you.com/api-reference/search)
|
|
122
|
+
- [Search API Reference](https://docs.you.com/api-reference/search/v1-search)
|
|
123
|
+
- [Search Operators](https://docs.you.com/search/search-operators)
|
|
111
124
|
- [Contents API Reference](https://docs.you.com/api-reference/search/contents)
|
|
112
|
-
- [Express Agent Reference](https://docs.you.com/agents/
|
|
125
|
+
- [Express Agent Reference](https://docs.you.com/api-reference/agents/express-agent/express-agent-runs)
|
|
113
126
|
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
114
127
|
|
|
115
128
|
## License
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
6
|
+
var __toCommonJS = (from) => {
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
16
|
+
__moduleCache.set(from, entry);
|
|
17
|
+
return entry;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
1
29
|
// credentials/YouDotComApi.credentials.ts
|
|
30
|
+
var exports_YouDotComApi_credentials = {};
|
|
31
|
+
__export(exports_YouDotComApi_credentials, {
|
|
32
|
+
YouDotComApi: () => YouDotComApi
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(exports_YouDotComApi_credentials);
|
|
35
|
+
|
|
2
36
|
class YouDotComApi {
|
|
3
37
|
name = "youDotComApi";
|
|
4
38
|
displayName = "You.com API";
|
|
@@ -14,7 +48,7 @@ class YouDotComApi {
|
|
|
14
48
|
},
|
|
15
49
|
default: "",
|
|
16
50
|
required: true,
|
|
17
|
-
description: 'Your You.com API key. Get one at <a href="https://you.com/api" target="_blank">you.com/api</a>'
|
|
51
|
+
description: 'Your You.com API key. Get one at <a href="https://you.com/platform/api-keys" target="_blank">you.com/platform/api-keys</a>'
|
|
18
52
|
}
|
|
19
53
|
];
|
|
20
54
|
authenticate = {
|
|
@@ -37,6 +71,3 @@ class YouDotComApi {
|
|
|
37
71
|
}
|
|
38
72
|
};
|
|
39
73
|
}
|
|
40
|
-
export {
|
|
41
|
-
YouDotComApi
|
|
42
|
-
};
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
6
|
+
var __toCommonJS = (from) => {
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
16
|
+
__moduleCache.set(from, entry);
|
|
17
|
+
return entry;
|
|
18
|
+
};
|
|
2
19
|
var __export = (target, all) => {
|
|
3
20
|
for (var name in all)
|
|
4
21
|
__defProp(target, name, {
|
|
@@ -10,7 +27,12 @@ var __export = (target, all) => {
|
|
|
10
27
|
};
|
|
11
28
|
|
|
12
29
|
// nodes/YouDotCom/YouDotCom.node.ts
|
|
13
|
-
|
|
30
|
+
var exports_YouDotCom_node = {};
|
|
31
|
+
__export(exports_YouDotCom_node, {
|
|
32
|
+
YouDotCom: () => YouDotCom
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(exports_YouDotCom_node);
|
|
35
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
14
36
|
|
|
15
37
|
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
16
38
|
var exports_external = {};
|
|
@@ -13548,18 +13570,12 @@ config(en_default());
|
|
|
13548
13570
|
var SearchOptionsSchema = exports_external.object({
|
|
13549
13571
|
count: exports_external.number().int().min(1).max(100).optional().describe("Number of search results to return (1-100)"),
|
|
13550
13572
|
country: exports_external.string().optional().describe("Two-letter country code to filter results (e.g., US, GB)"),
|
|
13551
|
-
excludeTerms: exports_external.string().optional().describe("Terms to exclude from search results"),
|
|
13552
|
-
exactTerms: exports_external.string().optional().describe("Exact phrase to match in search results"),
|
|
13553
|
-
fileType: exports_external.string().optional().describe("File type extension to filter results (e.g., pdf, doc)"),
|
|
13554
13573
|
freshness: exports_external.enum(["day", "week", "month", "year"]).optional().describe("Filter results by recency"),
|
|
13555
13574
|
language: exports_external.string().optional().describe("BCP 47 language code to filter results (e.g., en, es, fr)"),
|
|
13556
13575
|
livecrawl: exports_external.enum(["web", "news", "all"]).optional().describe("Type of content to crawl in real-time"),
|
|
13557
13576
|
livecrawl_formats: exports_external.enum(["html", "markdown"]).optional().describe("Format for live-crawled content"),
|
|
13558
13577
|
offset: exports_external.number().int().min(0).max(9).optional().describe("Pagination offset for search results (0-9)"),
|
|
13559
|
-
safesearch: exports_external.enum(["off", "moderate", "strict"]).optional().describe("Safe search filtering level")
|
|
13560
|
-
site: exports_external.string().optional().describe("Domain to restrict search results (e.g., example.com)").refine((val) => !val || /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(val), {
|
|
13561
|
-
message: "Must be a valid domain format (e.g., example.com)"
|
|
13562
|
-
})
|
|
13578
|
+
safesearch: exports_external.enum(["off", "moderate", "strict"]).optional().describe("Safe search filtering level")
|
|
13563
13579
|
});
|
|
13564
13580
|
var WebResultSchema = exports_external.object({
|
|
13565
13581
|
url: exports_external.string().describe("URL of the search result"),
|
|
@@ -13684,8 +13700,8 @@ class YouDotCom {
|
|
|
13684
13700
|
}
|
|
13685
13701
|
},
|
|
13686
13702
|
default: "",
|
|
13687
|
-
placeholder: "e.g.,
|
|
13688
|
-
description: "The search query
|
|
13703
|
+
placeholder: "e.g., AI news site:github.com filetype:pdf",
|
|
13704
|
+
description: "The search query. Supports operators: site: (domain), filetype: (file type), + (require), - (exclude), AND, OR, NOT. Example: Python OR PyTorch -TensorFlow filetype:pdf"
|
|
13689
13705
|
},
|
|
13690
13706
|
{
|
|
13691
13707
|
displayName: "Search Options",
|
|
@@ -13756,30 +13772,6 @@ class YouDotCom {
|
|
|
13756
13772
|
{ name: "United States", value: "US" }
|
|
13757
13773
|
]
|
|
13758
13774
|
},
|
|
13759
|
-
{
|
|
13760
|
-
displayName: "Exact Terms",
|
|
13761
|
-
name: "exactTerms",
|
|
13762
|
-
type: "string",
|
|
13763
|
-
default: "",
|
|
13764
|
-
placeholder: "e.g., machine learning|AI",
|
|
13765
|
-
description: 'Require exact phrase matches (pipe-separated, e.g., "machine learning|deep learning")'
|
|
13766
|
-
},
|
|
13767
|
-
{
|
|
13768
|
-
displayName: "Exclude Terms",
|
|
13769
|
-
name: "excludeTerms",
|
|
13770
|
-
type: "string",
|
|
13771
|
-
default: "",
|
|
13772
|
-
placeholder: "e.g., spam|ads",
|
|
13773
|
-
description: 'Terms to exclude from results (pipe-separated, e.g., "spam|ads|promo")'
|
|
13774
|
-
},
|
|
13775
|
-
{
|
|
13776
|
-
displayName: "File Type",
|
|
13777
|
-
name: "fileType",
|
|
13778
|
-
type: "string",
|
|
13779
|
-
default: "",
|
|
13780
|
-
placeholder: "e.g., pdf",
|
|
13781
|
-
description: "Filter results by file type (e.g., pdf, doc, xls)"
|
|
13782
|
-
},
|
|
13783
13775
|
{
|
|
13784
13776
|
displayName: "Freshness",
|
|
13785
13777
|
name: "freshness",
|
|
@@ -13904,14 +13896,6 @@ class YouDotCom {
|
|
|
13904
13896
|
{ name: "Moderate", value: "moderate" },
|
|
13905
13897
|
{ name: "Strict", value: "strict" }
|
|
13906
13898
|
]
|
|
13907
|
-
},
|
|
13908
|
-
{
|
|
13909
|
-
displayName: "Site",
|
|
13910
|
-
name: "site",
|
|
13911
|
-
type: "string",
|
|
13912
|
-
default: "",
|
|
13913
|
-
placeholder: "e.g., github.com",
|
|
13914
|
-
description: "Restrict results to a specific domain (e.g., github.com)"
|
|
13915
13899
|
}
|
|
13916
13900
|
]
|
|
13917
13901
|
},
|
|
@@ -14060,7 +14044,7 @@ ${error48.issues.map((e, i2) => ` ${i2 + 1}. ${e.path.join(".") || "root"}: ${e
|
|
|
14060
14044
|
});
|
|
14061
14045
|
continue;
|
|
14062
14046
|
}
|
|
14063
|
-
throw new NodeApiError(this.getNode(), { message: errorMessage, issues: serializedIssues }, {
|
|
14047
|
+
throw new import_n8n_workflow.NodeApiError(this.getNode(), { message: errorMessage, issues: serializedIssues }, {
|
|
14064
14048
|
itemIndex: i
|
|
14065
14049
|
});
|
|
14066
14050
|
}
|
|
@@ -14073,7 +14057,7 @@ ${error48.issues.map((e, i2) => ` ${i2 + 1}. ${e.path.join(".") || "root"}: ${e
|
|
|
14073
14057
|
});
|
|
14074
14058
|
continue;
|
|
14075
14059
|
}
|
|
14076
|
-
throw new NodeApiError(this.getNode(), error48, {
|
|
14060
|
+
throw new import_n8n_workflow.NodeApiError(this.getNode(), error48, {
|
|
14077
14061
|
itemIndex: i
|
|
14078
14062
|
});
|
|
14079
14063
|
}
|
|
@@ -14101,14 +14085,6 @@ ${error48.issues.map((e, i2) => ` ${i2 + 1}. ${e.path.join(".") || "root"}: ${e
|
|
|
14101
14085
|
qs.offset = options.offset;
|
|
14102
14086
|
if (options.safesearch)
|
|
14103
14087
|
qs.safesearch = options.safesearch;
|
|
14104
|
-
if (options.site)
|
|
14105
|
-
qs.site = options.site;
|
|
14106
|
-
if (options.fileType)
|
|
14107
|
-
qs.fileType = options.fileType;
|
|
14108
|
-
if (options.excludeTerms)
|
|
14109
|
-
qs.excludeTerms = options.excludeTerms;
|
|
14110
|
-
if (options.exactTerms)
|
|
14111
|
-
qs.exactTerms = options.exactTerms;
|
|
14112
14088
|
const rawResponse = await context.helpers.httpRequestWithAuthentication.call(context, "youDotComApi", {
|
|
14113
14089
|
method: "GET",
|
|
14114
14090
|
url: "https://ydc-index.io/v1/search",
|
|
@@ -14127,7 +14103,7 @@ ${error48.issues.map((e, i2) => ` ${i2 + 1}. ${e.path.join(".") || "root"}: ${e
|
|
|
14127
14103
|
const options = ContentsOptionsSchema.parse(rawOptions);
|
|
14128
14104
|
const urls = urlsString.split(",").map((url2) => url2.trim()).filter((url2) => url2.length > 0);
|
|
14129
14105
|
if (urls.length === 0) {
|
|
14130
|
-
throw new NodeOperationError(context.getNode(), "At least one URL is required", { itemIndex });
|
|
14106
|
+
throw new import_n8n_workflow.NodeOperationError(context.getNode(), "At least one URL is required", { itemIndex });
|
|
14131
14107
|
}
|
|
14132
14108
|
const body = { urls };
|
|
14133
14109
|
if (options.formats && options.formats.length > 0) {
|
|
@@ -14190,6 +14166,3 @@ ${error48.issues.map((e, i2) => ` ${i2 + 1}. ${e.path.join(".") || "root"}: ${e
|
|
|
14190
14166
|
return result;
|
|
14191
14167
|
}
|
|
14192
14168
|
}
|
|
14193
|
-
export {
|
|
14194
|
-
YouDotCom
|
|
14195
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youdotcom-oss/n8n-nodes-youdotcom",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "n8n community node for You.com APIs - Search, Contents extraction, and Express AI agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"rag",
|
|
36
36
|
"grounding"
|
|
37
37
|
],
|
|
38
|
-
"type": "
|
|
38
|
+
"type": "commonjs",
|
|
39
39
|
"files": [
|
|
40
40
|
"dist/**"
|
|
41
41
|
],
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "bun run build:js && bun run build:assets",
|
|
47
47
|
"build:assets": "cp nodes/YouDotCom/youdotcom.svg dist/nodes/YouDotCom/ && cp nodes/YouDotCom/YouDotCom.node.json dist/nodes/YouDotCom/ && cp nodes/YouDotCom/youdotcom.svg dist/credentials/",
|
|
48
|
-
"build:js": "bun build ./nodes/YouDotCom/YouDotCom.node.ts --outfile ./dist/nodes/YouDotCom/YouDotCom.node.js --target=node --external n8n-workflow && bun build ./credentials/YouDotComApi.credentials.ts --outfile ./dist/credentials/YouDotComApi.credentials.js --target=node --external n8n-workflow",
|
|
48
|
+
"build:js": "bun build ./nodes/YouDotCom/YouDotCom.node.ts --outfile ./dist/nodes/YouDotCom/YouDotCom.node.js --target=node --format cjs --external n8n-workflow && bun build ./credentials/YouDotComApi.credentials.ts --outfile ./dist/credentials/YouDotComApi.credentials.js --target=node --format cjs --external n8n-workflow",
|
|
49
49
|
"check": "bun run check:biome && bun run check:types && bun run check:package",
|
|
50
50
|
"check:biome": "biome check",
|
|
51
51
|
"check:package": "format-package --check",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"n8n-workflow": "^2.6.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@n8n/node-cli": "^0.
|
|
70
|
+
"@n8n/node-cli": "^0.19.0",
|
|
71
71
|
"n8n-workflow": "^2.6.0",
|
|
72
72
|
"zod": "^4.3.6"
|
|
73
73
|
}
|