{"templateId":"openapi_docs","sharedDataIds":{"openAPIDocsStore":"oas-openapi.yaml","sidebar":"sidebar-sidebars.yaml"},"props":{"definitionId":"openapi.yaml","dynamicMarkdocComponents":[],"baseSlug":"/openapi","seo":{"title":"Kagi API","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"itemId":"","disableAutoScroll":true,"metadata":{"type":"openapi","title":"Kagi API","description":"The Kagi API provides programmatic access to data that powers our search results & more. \n\nGet started on the [API Dashboard](https://kagi.com/api) to set up billing, manage API keys, and more.\n\nSee our [API Pricing](https://kagi.com/api/pricing) page for standard rates.\n\n### Official Client Libraries\n\nWe offer the following libraries you can use to interact with the Kagi API. These are generated from an OpenAPI spec.\n\n- [Golang](https://github.com/kagisearch/kagi-openapi-golang)\n- [Python](https://github.com/kagisearch/kagi-openapi-python)\n- [TypeScript](https://github.com/kagisearch/kagi-openapi-typescript)\n- [Rust](https://github.com/kagisearch/kagi-openapi-rust)\n\nIf 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](https://kagi.redocly.app/_spec/openapi.yaml?download) to build your own custom library.\n\nIn 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!\n\n### MCP\n\nWe offer a hosted MCP server at: https://mcp.kagi.com/mcp\n\nAt 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](https://kagi.com/api/keys) and plug it into your local client with `Bearer` HTTP authentication.\n\nHere is an example to get started with Claude Code:\n\n```\nclaude mcp add kagi https://mcp.kagi.com/mcp --transport http --header \"Authorization: Bearer $(read -sp 'API key: ' k; echo $k)\" --scope user\n```\n\nYou can review and contribute to our [MCP server on GitHub](https://github.com/kagisearch/kagimcp/tree/rehan/v1-api)!\n\n### Support\n\nFor bug reports, feature requests, or billing related issues please reach out to [developers@kagi.com](mailto:developers@kagi.com) and we will be happy to assist you.\n\nTo help us answer your reports efficiently, please be prepared to provide as much info as you can:\n\n- For bugs, include request trace IDs from the `meta.trace` response field or the `X-Kagi-Trace` response header.\n- If issues are easily reproduced in our [playground](https://kagi.com/api/playground/search), send us a link to the playground - the URL will contain parameters to configure the request so that we can reproduce ourselves.\n- Include any code snippets or precise descriptions of the request you are making, and full samples of the response bodies from the API\n- Include mention of which wrapper you are using if any, or links to relevant application code we can review\n- Include the email address associated with your Kagi login if it is not the one you are emailing from\n\nThank you!\n\n### Discord\n\nJoin our [Discord](https://kagi.com/discord)! Good for quick questions or chatting about things you've made with our APIs!\n\nIn the server you will find the `#api` forum for API related inquiries.\n"},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"headers":{"accept":"*/*","accept-encoding":"gzip, br, zstd, deflate","cdn-loop":"google, cloudfront","host":"redocly-api-docs.kagi.com","user-agent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","via":"1.1 google, 2.0 05a63efd5ebb043211ccf075f3a8aa68.cloudfront.net (CloudFront), 1.1 Caddy","x-amz-cf-id":"ux3W9IrR0ZZMAZ_2-L1OQMfdkrq1iWuUw4VXf7AhOn2oIoPCRHFqhw==","x-cloud-trace-context":"1e567ba9f542b1786bb80bfd5d5345b8/14856016054005609781","x-forwarded-for":"34.127.198.8, 3.211.34.228, 15.158.215.98","x-forwarded-host":"redocly-api-docs.kagi.com","x-forwarded-proto":"https","x-request-id":"cds-8aaa38a2-1921-4aec-aec2-f538e9eafe7a"},"remoteAddr":{"hostname":"::ffff:10.0.2.121","port":52640},"lang":"default_locale","env":{"PUBLIC_REDOCLY_BRANCH_NAME":"main"}}},"pagePropGetterError":{"message":"","name":""}},"slug":"/openapi","userData":{"isAuthenticated":false,"teams":["anonymous"]}}