@crawlora-org/duckduckgo 0.1.0 → 0.1.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 +14 -2
- package/package.json +3 -3
- package/src/index.js +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @crawlora-org/duckduckgo
|
|
1
|
+
# @crawlora-org/duckduckgo — DuckDuckGo API client for JavaScript and TypeScript
|
|
2
2
|
|
|
3
3
|
JavaScript and TypeScript client for Crawlora's hosted DuckDuckGo API.
|
|
4
|
-
It
|
|
4
|
+
It exposes 6 API endpoints for web, news, image, video, and shopping search plus query suggestions through [Crawlora](https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content=duckduckgo-javascript-homepage). It does not run a browser or scrape DuckDuckGo locally. A Crawlora account and `CRAWLORA_API_KEY` are required, and API use is billed under your Crawlora account. Crawlora is independent from and not endorsed by DuckDuckGo or its owners.
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
@@ -40,6 +40,18 @@ group. See the full method and parameter list in the [online reference](https://
|
|
|
40
40
|
|
|
41
41
|
Methods return promises and can be awaited. See the [runnable example](https://github.com/Crawlora-org/crawlora-duckduckgo/blob/main/examples/javascript.mjs) for a complete usage example.
|
|
42
42
|
|
|
43
|
+
## Supported DuckDuckGo API endpoints
|
|
44
|
+
|
|
45
|
+
This package exposes each route below as a direct method and through the `duckduckgo` group. See the [endpoint and parameter reference](https://github.com/Crawlora-org/crawlora-duckduckgo/blob/main/docs/usage.md) for complete input details.
|
|
46
|
+
|
|
47
|
+
| Method | Endpoint | API operation | Description |
|
|
48
|
+
| --- | --- | --- | --- |
|
|
49
|
+
| `GET` | `/duckduckgo/image` | `duckduckgo-image` | Search DuckDuckGo image results |
|
|
50
|
+
| `GET` | `/duckduckgo/news` | `duckduckgo-news` | Search DuckDuckGo news results |
|
|
51
|
+
| `GET` | `/duckduckgo/search` | `duckduckgo-search` | Search DuckDuckGo web results |
|
|
52
|
+
| `GET` | `/duckduckgo/shopping` | `duckduckgo-shopping` | Search DuckDuckGo shopping results |
|
|
53
|
+
| `GET` | `/duckduckgo/suggest` | `duckduckgo-suggest` | Suggest DuckDuckGo search queries |
|
|
54
|
+
| `GET` | `/duckduckgo/video` | `duckduckgo-video` | Search DuckDuckGo video results |
|
|
43
55
|
|
|
44
56
|
## Configuration
|
|
45
57
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlora-org/duckduckgo",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Crawlora DuckDuckGo API client with 6 endpoints for web, news, image, video, and shopping search plus query suggestions",
|
|
5
5
|
"homepage": "https://crawlora.net/?utm_source=npm&utm_medium=referral&utm_campaign=platform-clients&utm_content=duckduckgo-javascript-homepage",
|
|
6
6
|
"bugs": { "url": "https://github.com/Crawlora-org/crawlora-duckduckgo/issues" },
|
|
7
|
-
"keywords": ["crawlora", "api-client", "web-scraping", "duckduckgo", "
|
|
7
|
+
"keywords": ["crawlora", "api-client", "sdk", "web-scraping", "scraping-api", "duckduckgo", "duckduckgo-api", "duckduckgo-scraper", "duckduckgo-data", "duckduckgo-web", "duckduckgo-news", "duckduckgo-image", "duckduckgo-video", "duckduckgo-shopping-search", "duckduckgo-query-suggestions"],
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./src/index.js",
|
|
10
10
|
"types": "./src/index.d.ts",
|
package/src/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export class DuckDuckGoClient extends CrawloraClient {
|
|
11
11
|
constructor(options = {}) {
|
|
12
|
-
super({ ...options, userAgent: options.userAgent ?? "crawlora-duckduckgo-js/0.1.
|
|
12
|
+
super({ ...options, userAgent: options.userAgent ?? "crawlora-duckduckgo-js/0.1.1" });
|
|
13
13
|
this["image"] = (...args) => this.request("duckduckgo-image", ...args);
|
|
14
14
|
this["news"] = (...args) => this.request("duckduckgo-news", ...args);
|
|
15
15
|
this["search"] = (...args) => this.request("duckduckgo-search", ...args);
|
|
@@ -28,5 +28,5 @@ export {
|
|
|
28
28
|
CrawloraServerError
|
|
29
29
|
};
|
|
30
30
|
export { groups, operations, operationCount, OperationIds } from "./operations.js";
|
|
31
|
-
export const VERSION = "0.1.
|
|
31
|
+
export const VERSION = "0.1.1";
|
|
32
32
|
export default DuckDuckGoClient;
|