scripts/searxng.sh
scripts/searxng.shBrowse 2 files
190 tokens
524 bytes
Token encoding: o200k_base
Snapshot 24fd22b
← Back to SKILL.md
1#!/bin/bash2# Usage: ./searxng.sh <query> [max_results] [engines]3# Example: ./searxng.sh "python async" 10 "google,bing"4 5QUERY="${1:-}"6MAX="${2:-5}"7ENGINES="${3:-google,bing}"8 9if [ -z "$SEARXNG_URL" ]; then10 echo "Error: SEARXNG_URL is not set"11 exit 112fi13 14if [ -z "$QUERY" ]; then15 echo "Usage: $0 <query> [max_results] [engines]"16 exit 117fi18 19ENCODED_QUERY=$(echo "$QUERY" | sed 's/ /+/g')20 21curl -s --max-time 10 \22 "${SEARXNG_URL}/search?q=${ENCODED_QUERY}&format=json&limit=${MAX}&engines=${ENGINES}"23