<feed xmlns='http://www.w3.org/2005/Atom'>
<title>searxng/searx/engines/kagi.py, branch master</title>
<subtitle>Free internet metasearch engine which aggregates results from various search services and databases</subtitle>
<id>https://git.ikboikov.net/searxng/atom?h=master</id>
<link rel='self' href='https://git.ikboikov.net/searxng/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/searxng/'/>
<updated>2026-09-02T14:30:00Z</updated>
<entry>
<title>[mod] engines: migrate to setup() from init() for simple tasks</title>
<updated>2026-09-02T14:30:00Z</updated>
<author>
<name>Om Alve</name>
<email>om@turboml.com</email>
</author>
<published>2026-08-23T12:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/searxng/commit/?id=b4f616fed70b0598a1817fb828c0cce29d0451be'/>
<id>urn:sha1:b4f616fed70b0598a1817fb828c0cce29d0451be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[fix] kagi: crashes when there are no results</title>
<updated>2026-07-07T08:49:54Z</updated>
<author>
<name>Bnyro</name>
<email>bnyro@tutanota.com</email>
</author>
<published>2026-07-07T08:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/searxng/commit/?id=f69b22c45cf156dd935db583550d2134077435d1'/>
<id>urn:sha1:f69b22c45cf156dd935db583550d2134077435d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[fix] kagi: safely access unpromised result properties</title>
<updated>2026-07-07T08:49:54Z</updated>
<author>
<name>Patrick Evans</name>
<email>holysoles97@gmail.com</email>
</author>
<published>2026-06-12T21:25:13Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/searxng/commit/?id=f9304437267b1113086e3cbec47dfb37e15f1112'/>
<id>urn:sha1:f9304437267b1113086e3cbec47dfb37e15f1112</id>
<content type='text'>
I was testing the new Kagi engine and found for some queries I was getting a
`KeyError` exception from the result parsing.

This PR ensures we only assumes the `url` key exists, and we use `.get()` to
retrieve values for keys that may not be present.

Their API documentation [1] clarifies that only the `url` and `title` properties
are required/guaranteed in the search result object, but this is not correct:

    File "/home/patrick/code/searxng/searx/engines/kagi.py", line 161, in response
        title=html.unescape(result["title"]),
                            ~~~~~~^^^^^^^^^
    KeyError: 'title

Heard back from Kagi support:

&gt; The image results "title' should be marked as optional, as many images likely
&gt; don't have titles - as you've noticed.  The only required field there should be
&gt; the "url" field.

[1] https://kagi.redocly.app/api/docs/openapi/search/search#search/search/t=response&amp;c=200&amp;path=data/search
[2] https://github.com/searxng/searxng/issues/2247#issuecomment-4692976877
</content>
</entry>
<entry>
<title>[fix] kagi: results contain HTML tags</title>
<updated>2026-07-07T08:35:06Z</updated>
<author>
<name>Bnyro</name>
<email>bnyro@tutanota.com</email>
</author>
<published>2026-07-06T18:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/searxng/commit/?id=d58ced8f7126ff4a349c4f454af0c47a4e649f06'/>
<id>urn:sha1:d58ced8f7126ff4a349c4f454af0c47a4e649f06</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[feat] engines: add support for Kagi (requires API key)</title>
<updated>2026-06-12T12:48:47Z</updated>
<author>
<name>Bnyro</name>
<email>bnyro@tutanota.com</email>
</author>
<published>2026-06-11T20:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.ikboikov.net/searxng/commit/?id=de8a3de15adbb5b72dd106444e3d0a70bfd196b5'/>
<id>urn:sha1:de8a3de15adbb5b72dd106444e3d0a70bfd196b5</id>
<content type='text'>
</content>
</entry>
</feed>
