The Kagi API provides programmatic access to data that powers our search results & more.
Get started on the API Dashboard to set up billing, manage API keys, and more.
See our API Pricing page for standard rates.
We offer the following libraries you can use to interact with the Kagi API. These are generated from an OpenAPI spec.
If you have a language you would like to use and it's not in the list, send us a message and we will add it to the list if it is supported. Or you can use the spec to build your own custom library.
In the future we will most likely offer more crafted API wrappers and spotlight clients and applications built by our community - feel free to send them to us!
We offer a hosted MCP server at: https://mcp.kagi.com/mcp
At this time, we do not support setup via OAuth2 flow, but this is on our roadmap. You will need to get your API key from the dashboard and plug it into your local client with Bearer HTTP authentication.
Here is an example to get started with Claude Code:
claude mcp add kagi https://mcp.kagi.com/mcp --transport http --header "Authorization: Bearer $(read -sp 'API key: ' k; echo $k)" --scope userYou can review and contribute to our MCP server on GitHub!
For bug reports, feature requests, or billing related issues please reach out to developers@kagi.com and we will be happy to assist you.
To help us answer your reports efficiently, please be prepared to provide as much info as you can:
meta.trace response field or the X-Kagi-Trace response header.Thank you!
Join our Discord! Good for quick questions or chatting about things you've made with our APIs!
In the server you will find the #api forum for API related inquiries.
https://redocly-api-docs.kagi.com/_mock/openapi/
https://kagi.com/api/v1/
The Search API is a feature-rich endpoint for search products and agents. It gives programmable access to Kagi's premium search results pulled from many different sources - including our in-house indexes - and re-ranked to surface accurate answers and interesting finds. You can read about our approach towards search on our blog.
The API supports most of the features that we offer through our web UI, including Lenses.
You can also request full markdown extraction of the top results in a single API request.