Kagi Search API

App · 6 actions

Kagi's paid API, billed per call: premium web, news and video search without ads, clean page extraction, FastGPT answers with sources, the Universal Summarizer and Kagi's own Teclis and TinyGem indexes. For Kagi's free Small Web feed, use Kagi Small Web.

Actions

ActionWhat it does
Ask FastGPTGet a short answer to a question, written by Kagi's FastGPT from a live web search, with the pages it cites.
Extract page contentRead up to 10 web pages and get each one's main content as clean Markdown, ready for an AI step.
SearchSearch the web with Kagi: web pages, news, videos, images or podcasts, narrowed by country, lens, site, words or date, and optionally with the full text of the top pages.
Search Kagi's own indexesFind non-commercial web pages (Kagi's Teclis index) or independent news and discussions (TinyGem) on a topic: the results that make Kagi's searches different.
Summarize a web page or fileSummarize what is at a web address with Kagi's Universal Summarizer: an article, a PDF, a Word or PowerPoint file, an audio file or a YouTube video.
Summarize textSummarize text from an earlier step, such as an email, a transcript or a page's content, with Kagi's Universal Summarizer.

Ask FastGPT

Get a short answer to a question, written by Kagi's FastGPT from a live web search, with the pages it cites. One billed query; a cached answer is free.

Inputs

QuestionquerytextRequired
The question to answer, such as What is new in Python 3.13?
Use cached answersuse_cachetrue/false
Kagi answers a repeat question from its cache for free. Turn off to always get a fresh answer.Default: true.

Outputs

answertext
The answer, citing its sources as [1], [2] and so on
api_balancenumber
Your remaining Kagi API credit in US dollars after this call, when Kagi reports it; empty otherwise
referenceslist
The pages the answer cites, by number
tokensnumber
How many tokens FastGPT processed
Example output
{
  "answer": "Python 3.11 introduced several new features: a faster interpreter [1], exception groups [1] and clearer tracebacks [2].",
  "api_balance": 9.42,
  "references": [
    {
      "number": 1,
      "snippet": "Python 3.11 is between 10 and 60% faster than Python 3.10.",
      "title": "What's New In Python 3.11",
      "url": "https://docs.python.org/3/whatsnew/3.11.html"
    },
    {
      "number": 2,
      "snippet": "Tracebacks now point at the exact expression.",
      "title": "Introducing the New Features in Python 3.11",
      "url": "https://earthly.dev/blog/python-3.11-new-features/"
    }
  ],
  "tokens": 757
}

Extract page content

Read up to 10 web pages and get each one's main content as clean Markdown, ready for an AI step. Billed per page read.

Inputs

PagesurlslistRequired
The web addresses to read, up to 10, such as https://example.com/article.

Outputs

countnumber
How many pages were read
failednumber
How many pages could not be read
markdowntext
The first page's Markdown that could be read: handy when reading one page
pageslist
Each page asked for, in the order given
Example output
{
  "count": 1,
  "failed": 0,
  "markdown": "# Article Title\n\nThis is the extracted content...",
  "pages": [
    {
      "characters": 48,
      "error": "",
      "extracted": true,
      "markdown": "# Article Title\n\nThis is the extracted content...",
      "url": "https://example.com/article"
    }
  ]
}

Search the web with Kagi: web pages, news, videos, images or podcasts, narrowed by country, lens, site, words or date, and optionally with the full text of the top pages. One billed search.

Inputs

SearchquerytextRequired
What to search for. Kagi's search operators work here too, such as site:example.com or a phrase in quotes.
Resultsresult_typetext
Which kind of results to return. Defaults to web pages.One of: search (Web pages (default)), news, videos, images, podcasts. Default: search.
How many resultslimitnumber
At most this many results of each kind. Leave blank for everything Kagi finds in one pass.From 1 to 1024.
Pagepagenumber
Which page of results, 1 to 10. Defaults to the first.From 1 to 10.
Countryregiontext
Only results from this country. Leave blank for the key's own setting.One of: AF (Afghanistan), AX (Åland Islands), AL (Albania), DZ (Algeria), AS (American Samoa), AD (Andorra), AO (Angola), AI (Anguilla), AQ (Antarctica), AG (Antigua and Barbuda), and 239 more.
Lenslenstext
Search through one of Kagi's lenses, or type a shared lens's id or address from https://kagi.com/settings/lenses. Can't be combined with the site, word, file type or 'Updated in the past' fields.
Only these sitessiteslist
Search only these sites, such as example.com.
Leave out these sitesexclude_siteslist
Never return results from these sites.
Must mentionkeywordslist
Only results that contain these words.
Must not mentionexclude_keywordslist
Leave out results that contain these words.
File typefile_typetext
Only files of this type, by extension, such as pdf.
Updated in the pastrecencytext
Only pages published or updated within this time. Use this or the two date fields, not both.One of: day (Past day), week (Past week), month (Past month).
Updated afterupdated_afterdate
Only pages published or updated after this day.
Updated beforeupdated_beforedate
Only pages published or updated before this day.
Safe searchsafe_searchtrue/false
Leave out results that may be explicit. On unless turned off.Default: true.
Read the top results in fullread_top_resultsnumber
Also read this many of the top web results, 1 to 10, and return each page's text as Markdown. Billed as extra page extractions.From 1 to 10.
Rank these sites higherraise_siteslist
Move results from these sites up the list.
Rank these sites lowerlower_siteslist
Move results from these sites down the list.
Pin these sites to the toppin_siteslist
Put results from these sites first.

Outputs

countnumber
How many results there are
imageslist
Images Kagi mixed into a web search
newslist
News Kagi mixed into a web search
podcastslist
Podcasts Kagi mixed into a web search
querytext
The search that was run
related_searcheslist
Searches Kagi suggests trying next
result_typetext
The kind of results asked for: search (web pages), news, videos, images or podcasts
resultslist
The results of the kind asked for, best first
small_weblist
Finds from Kagi's small web index
videoslist
Videos Kagi mixed into a web search
Example output
{
  "count": 2,
  "images": [],
  "news": [
    {
      "content": "",
      "image_url": "",
      "published": "2026-10-27T12:59:35Z",
      "rank": 1,
      "snippet": "The Steve Jobs Archive is the authoritative home for Steve's story.",
      "title": "The Steve Jobs Archive opens its doors",
      "url": "https://stevejobsarchive.com/"
    }
  ],
  "podcasts": [],
  "query": "steve jobs",
  "related_searches": [
    "steve jobs biography",
    "steve jobs quotes"
  ],
  "result_type": "search",
  "results": [
    {
      "content": "",
      "image_url": "https://p.kagi.com/proxy/th?c=fl5H5doFdZVT3TYbM87OdIZHFmzy",
      "published": "2012-02-23T07:00:59Z",
      "rank": 1,
      "snippet": "Steven Paul Jobs (February 24, 1955 to October 5, 2011) was an American businessman, inventor, and investor.",
      "title": "Steve Jobs - Wikipedia",
      "url": "https://en.wikipedia.org/wiki/Steve_Jobs"
    },
    {
      "content": "",
      "image_url": "",
      "published": "2011-12-23T20:19:37Z",
      "rank": 2,
      "snippet": "Steve Jobs is the authorized self-titled biography of American business magnate and Apple co-founder Steve Jobs.",
      "title": "Steve Jobs (book) - Wikipedia",
      "url": "https://en.wikipedia.org/wiki/Steve_Jobs_(book)"
    }
  ],
  "small_web": [
    {
      "content": "",
      "image_url": "",
      "published": "",
      "rank": 1,
      "snippet": "A repository of all things Steve Jobs.",
      "title": "Remembering Steve Jobs",
      "url": "https://allaboutstevejobs.com/"
    }
  ],
  "videos": [
    {
      "content": "",
      "image_url": "https://p.kagi.com/proxy/th?c=UF8uR6Z6KLc",
      "published": "2008-03-07T00:00:00Z",
      "rank": 1,
      "snippet": "Drawing from some of the most pivotal points in his life.",
      "title": "Steve Jobs' 2005 Stanford Commencement Address",
      "url": "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
    }
  ]
}

Search Kagi's own indexes

Find non-commercial web pages (Kagi's Teclis index) or independent news and discussions (TinyGem) on a topic: the results that make Kagi's searches different. Billed only when something is found.

Inputs

SearchquerytextRequired
The topic to look up, such as solar cooking.
Indexindextext
Which of Kagi's indexes to search. Defaults to web pages.One of: web (Non-commercial web pages (Teclis, default)), news (Independent news and discussions (TinyGem)). Default: web.

Outputs

api_balancenumber
Your remaining Kagi API credit in US dollars after this call, when Kagi reports it; empty otherwise
countnumber
How many results there are
indextext
web (Teclis) or news (TinyGem)
querytext
The search that was run
resultslist
What the index found, best first
Example output
{
  "api_balance": 9.08,
  "count": 1,
  "index": "web",
  "query": "microsoft",
  "results": [
    {
      "published": "",
      "rank": 1,
      "snippet": "Microsoft Bob| Microsoft Bob And so Microsoft Bob disappeared in to obscurity.",
      "title": "Microsoft Bob",
      "url": "http://toastytech.com/guis/bob.html"
    }
  ]
}

Summarize a web page or file

Summarize what is at a web address with Kagi's Universal Summarizer: an article, a PDF, a Word or PowerPoint file, an audio file or a YouTube video. Billed by length; a cached summary is free.

Inputs

Web addressurltextRequired
The address of the page, document, audio file or YouTube video, such as https://example.com/report.pdf.
Engineenginetext
Which summarizer to use. Cecil and Agnes are billed by length; Muriel is billed at a flat rate per summary, much more than the others.One of: cecil (Cecil: friendly and descriptive (default)), agnes (Agnes: formal and technical), muriel (Muriel: Kagi's best, billed at a much higher flat rate). Default: cecil.
Summary typesummary_typetext
Paragraphs, or the key points as a bulleted list.One of: summary (Paragraphs (default)), takeaway (Key points as a bulleted list). Default: summary.
Languagetarget_languagetext
Write the summary in this language. Leave blank to let the document's own language decide.One of: BG (Bulgarian), ZH (Chinese (simplified)), ZH-HANT (Chinese (traditional)), CS (Czech), DA (Danish), NL (Dutch), EN (English), ET (Estonian), FI (Finnish), FR (French), and 20 more.
Use cached summariesuse_cachetrue/false
Kagi answers a repeat request from its cache for free. Turn off for sensitive documents, so Kagi keeps nothing after summarizing.Default: true.

Outputs

api_balancenumber
Your remaining Kagi API credit in US dollars after this call, when Kagi reports it; empty otherwise
enginetext
The engine that wrote it
summarytext
The summary
summary_typetext
summary (paragraphs) or takeaway (key points)
tokensnumber
How many tokens Kagi processed, in and out
urltext
The address that was summarized
Example output
{
  "api_balance": 9.12,
  "engine": "cecil",
  "summary": "In this video, Jonathan Blow discusses the decline of software technology and argues that simplifying software systems is the right approach.",
  "summary_type": "summary",
  "tokens": 11757,
  "url": "https://www.youtube.com/watch?v=ZSRHeXYDLko"
}

Summarize text

Summarize text from an earlier step, such as an email, a transcript or a page's content, with Kagi's Universal Summarizer. Billed by length.

Inputs

TexttexttextRequired
The text to summarize, up to about 1 MB.
Engineenginetext
Which summarizer to use. Cecil and Agnes are billed by length; Muriel is billed at a flat rate per summary, much more than the others.One of: cecil (Cecil: friendly and descriptive (default)), agnes (Agnes: formal and technical), muriel (Muriel: Kagi's best, billed at a much higher flat rate). Default: cecil.
Summary typesummary_typetext
Paragraphs, or the key points as a bulleted list.One of: summary (Paragraphs (default)), takeaway (Key points as a bulleted list). Default: summary.
Languagetarget_languagetext
Write the summary in this language. Leave blank to let the document's own language decide.One of: BG (Bulgarian), ZH (Chinese (simplified)), ZH-HANT (Chinese (traditional)), CS (Czech), DA (Danish), NL (Dutch), EN (English), ET (Estonian), FI (Finnish), FR (French), and 20 more.
Use cached summariesuse_cachetrue/false
Kagi answers a repeat request from its cache for free. Turn off for sensitive documents, so Kagi keeps nothing after summarizing.Default: true.

Outputs

api_balancenumber
Your remaining Kagi API credit in US dollars after this call, when Kagi reports it; empty otherwise
charactersnumber
How many characters were summarized
enginetext
The engine that wrote it
summarytext
The summary
summary_typetext
summary (paragraphs) or takeaway (key points)
tokensnumber
How many tokens Kagi processed, in and out
Example output
{
  "api_balance": 9.1,
  "characters": 2412,
  "engine": "cecil",
  "summary": "- Brothertiger's Mainsail is a hopeful song about escaping routine.\n- The chorus invites the listener to set sail.",
  "summary_type": "takeaway",
  "tokens": 543
}

On this page