autocomplete
Enter partial keywords to receive query suggestions from SearXNG. Use these to discover relevant search terms before a full search.
Instructions
Get search query suggestions from SearXNG.
Returns a list of autocomplete suggestions for the given partial query. Use this to discover relevant search terms before performing a full search.
Best results come from 1-2 meaningful keywords (e.g., "python async"). Single characters return overly broad suggestions; full sentences return none.
Makes an external API call to the configured autocomplete backend (e.g., Bing, Google). Not suitable for full web search (use search tool) or engine discovery (use engine_info tool).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Partial query string to get suggestions for. Best results with 1-2 keywords (e.g., 'python async'). Single characters are too broad; full sentences return nothing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- tests/test_tools.py:24-50 (helper)Test fixture mocking the autocomplete response as a list of strings (['python tutorial', 'python download', 'python documentation']).
@pytest.fixture def mock_search_response(): return { "results": [ { "title": "Example Result", "url": "https://example.com", "content": "This is a test result.", "engines": ["google", "bing"], "score": 5.0, "category": "general", "parsed_url": ["https", "example.com"], "positions": [1], "template": "default.html", } ], "answers": ["42"], "corrections": [], "suggestions": ["example query"], "infoboxes": [], "unresponsive_engines": [], "number_of_results": 1, } @pytest.fixture def mock_autocomplete_response():