SearchXNG API Documentation

Base URL: https://searchxng.cleaners.co.il

GUI interface: SearchXNG Search UI

OpenAPI JSON: /api/openapi.json

1. Core Search Endpoint

GET /search - classic SearXNG endpoint. For integrations use format=json.

ParameterTypeDescription
qstringSearch query (required)
formatstringhtml, json, csv, rss
categoriesstringExamples: general, news, science
languagestringExample: en, he
safesearch0|1|20=off, 1=moderate, 2=strict
pagenointegerPage number, starting at 1
time_rangeday|month|yearOptional freshness filter
enginesstringComma-separated engines list

2. SERP Text Endpoint (New)

GET /api/serp-text or POST /api/serp-text returns:

2.1 Request Params

ParameterTypeDescription
qstringSearch query (required)
categoriesstring or arraySingle or multiple categories, e.g. general, news, science or ["general","news"]
languagestringLanguage hint, e.g. he, en, auto
safesearch0|1|2Safe search mode
pagenointegerPage number (default 1)
time_rangeday|month|yearFreshness filter
enginesstring or arrayFilter by engines
limitintegerMax result blocks to return (min 1)
include_enginesbooleanInclude engines list in each block (default true)
include_cachedbooleanInclude cached indicator/link (default true)
include_auxiliarybooleanInclude answers/suggestions/infoboxes/etc. (default true)

2.2 Response Shape

{
  "query": "מה מזג האוויר היום?",
  "categories": ["general"],
  "pageno": 1,
  "number_of_results": 0,
  "results_count": 8,
  "serp_text_block": "...all result blocks in one text...",
  "results": [
    {
      "rank": 1,
      "url": "https://weather.walla.co.il/",
      "display_url": "https://weather.walla.co.il",
      "display_path": "",
      "title": "וואלה מזג האוויר: תחזית מזג האוויר יומית ושבועית בישראל - וואלה מזג אויר",
      "snippet": "...",
      "engines": ["google", "karmasearch", "startpage"],
      "cached": {
        "label": "cached",
        "url": "https://webcache.googleusercontent.com/search?q=cache:https://weather.walla.co.il/"
      },
      "published_date": null,
      "category": "general",
      "serp_text": "https://weather.walla.co.il\n..."
    }
  ]
}

3. Examples

# A) Standard JSON search
curl -s "https://searchxng.cleaners.co.il/search?q=latest+ai+news&format=json"

# B) New SERP text endpoint (GET) - GENERAL
curl -s "https://searchxng.cleaners.co.il/api/serp-text?q=%D7%9E%D7%94+%D7%9E%D7%96%D7%92+%D7%94%D7%90%D7%95%D7%95%D7%99%D7%A8+%D7%94%D7%99%D7%95%D7%9D%3F&categories=general&language=he&limit=8"

# C) New SERP text endpoint (GET) - NEWS
curl -s "https://searchxng.cleaners.co.il/api/serp-text?q=%D7%9E%D7%94+%D7%9E%D7%96%D7%92+%D7%94%D7%90%D7%95%D7%95%D7%99%D7%A8+%D7%94%D7%99%D7%95%D7%9D%3F&categories=news&language=he&limit=8"

# D) New SERP text endpoint (GET) - SCIENCE
curl -s "https://searchxng.cleaners.co.il/api/serp-text?q=weather+forecast+models&categories=science&language=en&limit=8"

# E) New SERP text endpoint (POST JSON) - GENERAL + NEWS + SCIENCE
curl -s "https://searchxng.cleaners.co.il/api/serp-text" \
  -H "Content-Type: application/json" \
  -d '{
    "q": "מה מזג האוויר היום?",
    "categories": ["general", "news", "science"],
    "language": "he",
    "limit": 10,
    "include_engines": true,
    "include_cached": true,
    "include_auxiliary": true
  }'

4. SERP Text Block Usage

The field serp_text_block is intentionally formatted as plain text chunks, each chunk similar to what you see in SERP cards. Example shape:

https://weather.walla.co.il
וואלה מזג האוויר: תחזית מזג האוויר יומית ושבועית בישראל - וואלה מזג אויר
ערוץ מזג האוויר של וואלה המתקדם ביותר בישראל...
startpage
google
cached

https://www.accuweather.com
› he › il › tel-aviv › 215854 › weather-forecast › 215854
תחזית מזג אוויר לשלושה ימים בתל אביב-יפו, מָחוֹז תֵּל אָבִיב, ישראל‏ | AccuWeather
...
yahoo
karmasearch
cached

Use this field when you want a single textual context block for LLM prompts. Use results[] when you need deterministic structured parsing.

5. n8n Integration Pattern

Recommended setup:

Then map serp_text_block to AI context or iterate over results[].