search-web-api 1.0.124 → 1.0.126
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 +1 -0
- package/package.json +1 -1
- package/src/category-registry.ts +1 -1
- package/src/constants.ts +1 -1
- package/src/engine-descriptions.ts +1 -1
- package/src/engine-status.ts +1 -1
- package/src/engine.ts +1 -1
- package/src/registry/search-engine-category-registry.ts +2 -2
- package/src/registry/search-engine-status-tracker.ts +1 -1
- package/src/result-container.ts +1 -1
- package/src/search/__tests__/public-searxng.test.ts +176 -1
- package/src/search/public-searxng.ts +136 -33
- package/src/search/search-engines-registry-list.ts +74 -74
- package/src/search/search-query-executor.ts +5 -5
- package/src/search/search-result-container.ts +2 -2
- package/src/search-web-types.ts +1 -1
- package/src/search.ts +2 -2
- package/src/sources/academic/arxiv.ts +1 -1
- package/src/sources/academic/core.ts +1 -1
- package/src/sources/academic/crossref.ts +1 -1
- package/src/sources/academic/doaj.ts +1 -1
- package/src/sources/academic/google_scholar.ts +1 -1
- package/src/sources/academic/openalex.ts +1 -1
- package/src/sources/academic/pubmed.ts +1 -1
- package/src/sources/academic/semantic_scholar.ts +1 -1
- package/src/sources/academic/wikidata.ts +1 -1
- package/src/sources/general/baidu.ts +1 -1
- package/src/sources/general/bing.ts +1 -1
- package/src/sources/general/brave.ts +1 -1
- package/src/sources/general/duckduckgo.ts +1 -1
- package/src/sources/general/google.ts +1 -1
- package/src/sources/general/mojeek.ts +1 -1
- package/src/sources/general/qwant.ts +1 -1
- package/src/sources/general/startpage.ts +1 -1
- package/src/sources/general/yahoo.ts +1 -1
- package/src/sources/general/yandex.ts +1 -1
- package/src/sources/images/bing_images.ts +1 -1
- package/src/sources/images/deviantart.ts +1 -1
- package/src/sources/images/flickr.ts +1 -1
- package/src/sources/images/google_images.ts +1 -1
- package/src/sources/images/imgur.ts +1 -1
- package/src/sources/images/openclipart.ts +1 -1
- package/src/sources/images/pixabay.ts +1 -1
- package/src/sources/images/unsplash.ts +1 -1
- package/src/sources/images/wallhaven.ts +1 -1
- package/src/sources/it/crates.ts +1 -1
- package/src/sources/it/dockerhub.ts +1 -1
- package/src/sources/it/github.ts +1 -1
- package/src/sources/it/gitlab.ts +1 -1
- package/src/sources/it/npm.ts +1 -1
- package/src/sources/it/packagist.ts +1 -1
- package/src/sources/it/pypi.ts +1 -1
- package/src/sources/it/rubygems.ts +1 -1
- package/src/sources/it/stackoverflow.ts +1 -1
- package/src/sources/maps/apple_maps.ts +1 -1
- package/src/sources/maps/openstreetmap.ts +1 -1
- package/src/sources/maps/photon.ts +1 -1
- package/src/sources/news/bing_news.ts +1 -1
- package/src/sources/news/google_news.ts +1 -1
- package/src/sources/news/hackernews.ts +1 -1
- package/src/sources/news/yahoo_news.ts +1 -1
- package/src/sources/shopping/ebay.ts +1 -1
- package/src/sources/social/mastodon.ts +1 -1
- package/src/sources/social/medium.ts +1 -1
- package/src/sources/social/reddit.ts +1 -1
- package/src/sources/social/soundcloud.ts +1 -1
- package/src/sources/social/twitter.ts +1 -1
- package/src/sources/specialized/annas_archive.ts +1 -1
- package/src/sources/specialized/archive.ts +1 -1
- package/src/sources/specialized/genius.ts +1 -1
- package/src/sources/specialized/goodreads.ts +1 -1
- package/src/sources/specialized/imdb.ts +1 -1
- package/src/sources/specialized/openlibrary.ts +1 -1
- package/src/sources/specialized/wikipedia.ts +1 -1
- package/src/sources/specialized/wttr.ts +1 -1
- package/src/sources/torrents/1337x.ts +1 -1
- package/src/sources/torrents/eztv.ts +1 -1
- package/src/sources/torrents/kickass.ts +1 -1
- package/src/sources/torrents/nyaa.ts +1 -1
- package/src/sources/torrents/solidtorrents.ts +1 -1
- package/src/sources/torrents/thepiratebay.ts +1 -1
- package/src/sources/torrents/yts.ts +1 -1
- package/src/sources/videos/bing_videos.ts +1 -1
- package/src/sources/videos/dailymotion.ts +1 -1
- package/src/sources/videos/invidious.ts +1 -1
- package/src/sources/videos/peertube.ts +1 -1
- package/src/sources/videos/vimeo.ts +1 -1
- package/src/sources/videos/youtube.ts +1 -1
- package/src/types/search-engine-interface.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the OpenStreetMap Nominatim API for place search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const openstreetmap: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Photon (Komoot) geocoding API for place search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const photon: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Bing News search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const bing_news: EngineFunction = async (
|
|
8
8
|
q: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Google News search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const google_news: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Hacker News (Algolia) API for story search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const hackernews: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Yahoo News search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const yahoo_news: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes eBay marketplace search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* eBay Shopping Search Engine
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Mastodon public API for post search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const mastodon: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Medium search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const medium: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Reddit search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const reddit: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes SoundCloud search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const soundcloud: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Twitter/X search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const twitter: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Anna's Archive search results, trying multiple mirror domains.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
const baseDomains = [
|
|
8
8
|
"annas-archive.gl",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Internet Archive API for search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const archive: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Genius API for song/lyrics search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const genius: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Goodreads search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const goodreads: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes IMDb search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const imdb: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Open Library API for book search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const openlibrary: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Wikipedia API for article search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const wikipedia: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries wttr.in for weather data, mapping WWO condition codes to human-readable descriptions.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction, EngineResult } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction, EngineResult } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
// Weather condition mapping
|
|
7
7
|
const WWO_TO_CONDITION: Record<string, string> = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes 1337x torrent search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const torrent_1337x: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes EZTV torrent search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const eztv: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes KickassTorrents search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const kickass: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Nyaa torrent search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const nyaa: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes SolidTorrents search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const solidtorrents: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes The Pirate Bay search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
export const thepiratebay: EngineFunction = async (
|
|
8
8
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the YTS API for movie torrent search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const yts: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Engine adapter that scrapes Bing Videos search results.
|
|
3
3
|
*/
|
|
4
4
|
import { parseHTML } from "linkedom";
|
|
5
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
5
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Bing Videos Search Engine
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Dailymotion API for video search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const dailymotion: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries public Invidious instances for YouTube video search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
// Public Invidious instances - user can configure their own
|
|
7
7
|
const DEFAULT_INSTANCES = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the PeerTube API for video search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const peertube: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries the Vimeo API for video search results.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
export const vimeo: EngineFunction = async (
|
|
7
7
|
query: string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Engine adapter that queries YouTube video search via public Invidious instances, with fallback across multiple instances.
|
|
3
3
|
*/
|
|
4
|
-
import { EngineFunction } from "../../types/search-engine-interface
|
|
4
|
+
import { EngineFunction } from "../../types/search-engine-interface";
|
|
5
5
|
|
|
6
6
|
// Multiple Invidious instances for fallback
|
|
7
7
|
const INVIDIOUS_INSTANCES = [
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* import `EngineFunction` and `EngineResult` from here.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { EngineResult, Engine, EngineFunction } from "./search-result-types
|
|
8
|
+
import type { EngineResult, Engine, EngineFunction } from "./search-result-types";
|
|
9
9
|
|
|
10
10
|
export type { EngineResult, Engine, EngineFunction };
|
|
11
11
|
|