Skip to content
← Back to activity

Public problem

kagiapi Python: passing cache=True gives 500 Internal Server Error

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Using the kagiapi Python package from main against the Kagi Search API, every request passed with cache=True consistently returned a 500 Internal Server Error. The other search parameters worked, so the reporter suspected the cache flag handling specifically.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The bug was in how the package serialized the flag: it sent the GET parameter capitalized as True/False, which the Kagi API rejects with a 500. PR #5 (merged the same day) fixed it by lowercasing the cache parameter so it goes out as true/false. Workaround if you are on an older checkout: pass the cache value as a lowercase string yourself, or upgrade to a version containing PR #5.

Source: https://github.com/kagisearch/kagiapi/issues/6

Source: https://github.com/kagisearch/kagiapi/issues/6