https://github.com/lenml/searxng-js-client
searxng client for javascript
https://github.com/lenml/searxng-js-client
client javascript search-engine searxng typescript
Last synced: 3 months ago
JSON representation
searxng client for javascript
- Host: GitHub
- URL: https://github.com/lenml/searxng-js-client
- Owner: lenML
- License: mit
- Created: 2024-07-21T08:58:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-21T10:37:59.000Z (about 1 year ago)
- Last Synced: 2025-02-28T23:44:16.654Z (7 months ago)
- Topics: client, javascript, search-engine, searxng, typescript
- Language: TypeScript
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# searxng-js-client
searxng client for javascript# install
```
pnpm add @lenml/searxng-js-client
```# usage
```ts
import {
SearxngClient,
Category,
Format,
SafeSearch,
SearchParams,
} from "@lenml/searxng-js-client";const client = new SearxngClient({ baseUrl: "http://your_instance_address/" });
const searchParams: SearchParams = {
q: "what is llm?",
categories: [Category.GENERAL, Category.WEB],
format: Format.JSON,
safesearch: SafeSearch.None,
language: "auto",
disabled_engines: ["dailymotion"],
engines: [
"bing",
"google",
"duckduckgo",
"reddit",
// "twitter",
"bilibili",
"youtube_noapi",
"yahoo",
],
};const { results } = await client.search(searchParams);
// results: { ... }[]
```