PageSourceSearch

https://sourcegraph.com/docs/api

html sourcegraph.com collected 2026-10-01 08:33:57 UTC 76,689 bytes, 37 lines download raw bytes

1<!DOCTYPE html><html data-dpl-id="dpl_47hmqTfGPL4KZSWpeP7BqHcmNtwU" lang="en" style="color-scheme:dark" class="h-full antialiased polysansvariable_7c8ad640-module__qkxgKa__variable polysansmono_8500b42b-module__LGNsUq__variable"><head>
1<script>(function(w,i,g){w[g]=w[g]||[];if(typeof w[g].push=='function')w[g].push(i)})
2(window,'GTM-TB4NLS7','google_tags_first_party');</script>
2<script>(function(w,d,s,l){w[l]=w[l]||[];(function(){w[l].push(arguments);})('set', 'developer_id.dY2E1Nz', true);
3		var f=d.getElementsByTagName(s)[0],
4		j=d.createElement(s);j.async=true;j.src='/sggtm/';
5		f.parentNode.insertBefore(j,f);
6		})(window,document,'script','dataLayer');</script>
6<meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/docs/_next/static/immutable/media/PolySans_Neutral-s.p.0fodm7w6eoab4.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/docs/_next/static/immutable/media/PolySans_NeutralItalic-s.p.0fz33w-sq3rz5.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/docs/_next/static/immutable/media/PolySans_NeutralMono-s.p.2k7x6vnwirk8t.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/docs/_next/static/immutable/media/PolySans_SlimMono-s.p.0408ut9oy3-vq.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" as="image" href="/docs/logo-theme-dark.svg"/><link rel="preload" as="image" href="/docs/logo-theme-light.svg"/><link rel="stylesheet" href="/docs/_next/static/immutable/chunks/1ix4tc909rkxc.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/docs/_next/static/immutable/chunks/2_ab657z_l6gp.js"/>
6<script src="/docs/_next/static/immutable/chunks/04arf15s5fltf.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/3f0xageq5ncd3.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/2ufzsljeb_zi5.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/turbopack-3i_tsgkicj6ov.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/1741v4eqjktd_.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/3vy36pz01ozs_.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js" async=""></script>
6<script src="/docs/_next/static/immutable/chunks/0po__7_9vektv.js" async=""></script>
6<title>Sourcegraph API - Sourcegraph docs</title><meta name="description" content="Documentation for Sourcegraph, the code intelligence platform."/><meta name="docsearch:language" content="en"/><meta name="docsearch:version" content="v8.0"/><link rel="canonical" href="https://sourcegraph.com/docs/api"/><meta property="og:title" content="Sourcegraph API - Sourcegraph docs"/><meta property="og:description" content="Documentation for Sourcegraph, the code intelligence platform."/><meta property="og:image" content="https://sourcegraph.com/docs/api/og/api"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Sourcegraph API - Sourcegraph docs"/><meta name="twitter:description" content="Documentation for Sourcegraph, the code intelligence platform."/><meta name="twitter:image" content="https://sourcegraph.com/docs/api/og/api"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/docs/icon.svg?icon.24pqlc06a_6hx.svg" sizes="any" type="image/svg+xml"/><meta name="next-size-adjust" content=""/><link rel="alternate" type="application/rss+xml" title="RSS Feed for Sourcegraph" href="https://sourcegraph.com/changelog/technical-changelog.rss"/>
6<script src="/docs/_next/static/immutable/chunks/0c0hxoamwjsbw.js" noModule=""></script>
6</head><body class="flex min-h-full bg-light-bg dark:bg-dark-bg"><a href="https://sourcegraph.com/cdn-cgi/content?id=550TSrg31BD9ilfWxqZN_yhFRjuprWuzr7D.QbcLp00-1790843624.6293554-1.2.1.1-NJhROxXRT5qYKnTIfV4eXjaamzD9RZm82Rsw7_z5_sbPdHSfjgO90rs0w3BVg2vr" aria-hidden="true" rel="nofollow noopener" style="display: none !important; visibility: hidden !important"></a><div hidden=""><!--$--><!--/$--></div><!--$?--><template id="B:0"></template><!--/$-->
6<script>requestAnimationFrame(function(){$RT=performance.now()});</script>
6<script src="/docs/_next/static/immutable/chunks/2_ab657z_l6gp.js" id="_R_" async=""></script>
6<div hidden id="S:0">
6<script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","system",null,["light","dark"],null,true,true)</script>
6<div class="flex w-full flex-col"><header class="sticky top-0 z-50"><div class="flex flex-none flex-wrap items-center justify-between bg-light-bg px-4 py-2.5 shadow-md shadow-slate-900/5 transition duration-500 dark:border-dark-border dark:shadow-none sm:px-6 lg:border-b lg:border-light-border lg:px-8 lg:py-6 dark:bg-transparent"><div class="mx-auto flex w-full max-w-8xl items-center justify-between sm:px-2 lg:px-8"><div class="-ml-2 mr-2 flex lg:hidden"><button type="button" class="relative flex h-11 w-11 items-center justify-center" aria-label="Open navigation"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" class="h-6 w-6 stroke-slate-500"><path d="M4 7h16M4 12h16M4 17h16"></path></svg></button><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span></div><div class="relative flex flex-grow basis-0 items-center"><a aria-label="Home page" class="relative z-10 hidden md:block" href="/docs"><img class="hidden h-[23px] w-[190px] dark:block" src="/docs/logo-theme-dark.svg" alt="Sourcegraph Docs"/><img class="block h-[23px] w-[190px] dark:hidden" src="/docs/logo-theme-light.svg" alt="Sourcegraph Docs"/></a><a class="relative z-10 flex h-11 w-11 items-center justify-center md:hidden" aria-label="Home page" href="/docs"><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" viewBox="0 0 155 155"><defs><style>.cls-1{fill:#ff5543}</style></defs><g id="Flattened"><g id="pictogram-dark-mode"><path class="cls-1" d="M62.44,42.8l18.78,5.01L68.43,0l-21.66,5.83,7.71,28.99c1.03,3.89,4.08,6.95,7.96,7.98Z"></path><polygon class="cls-1" points="45.66 125.24 51.68 119.23 69.07 101.88 70.7 100.25 71.66 99.29 72.01 100.6 72.61 102.83 76.92 118.94 81.14 134.7 86.57 155 108.23 149.17 102.78 128.69 102.57 127.98 86.65 68.28 26.9 52.35 26.15 52.16 25.71 52.04 25.71 52.02 5.76 46.72 0 68.5 20.23 73.91 31.41 76.9 52.11 82.43 54.35 83.03 55.66 83.38 54.7 84.34 53.07 85.98 41.22 97.83 29.69 109.37 14.86 124.21 30.69 140.18 45.66 125.24"></polygon><path class="cls-1" d="M107.08,73.69l5.03,18.86c1.04,3.89,4.09,6.94,7.96,7.97l29.16,7.75,5.76-21.78-47.92-12.81Z"></path><path class="cls-1" d="M124.31,14.82l-18.65,18.61c-2.06,2.06-3.23,4.79-3.31,7.71l-.3,11.81,10.51.38c.14,0,.27,0,.41,0,2.99,0,5.8-1.17,7.91-3.28l19.25-19.27-15.83-15.97Z"></path></g></g></svg></a></div><div class="order-last -mr-2 ml-2 lg:order-none lg:-my-5 lg:ml-0 lg:mr-0"><button type="button" aria-label="Search docs..."><div class="group flex h-11 w-11 items-center justify-center md:w-80 md:flex-none md:justify-start md:rounded-lg md:pl-4 md:pr-3.5 md:text-sm md:ring-1 md:ring-light-border md:hover:ring-slate-400 dark:md:bg-dark-bg-1 dark:md:ring-inset dark:md:ring-dark-border dark:md:hover:ring-slate-500 lg:h-9 lg:w-96"><svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" class="hidden h-5 w-5 fill-slate-400 group-hover:fill-slate-500 dark:fill-slate-500 md:block md:flex-none md:group-hover:fill-slate-400"><path d="M16.293 17.707a1 1 0 0 0 1.414-1.414l-1.414 1.414ZM9 14a5 5 0 0 1-5-5H2a7 7 0 0 0 7 7v-2ZM4 9a5 5 0 0 1 5-5V2a7 7 0 0 0-7 7h2Zm5-5a5 5 0 0 1 5 5h2a7 7 0 0 0-7-7v2Zm8.707 12.293-3.757-3.757-1.414 1.414 3.757 3.757 1.414-1.414ZM14 9a4.98 4.98 0 0 1-1.464 3.536l1.414 1.414A6.98 6.98 0 0 0 16 9h-2Zm-1.464 3.536A4.98 4.98 0 0 1 9 14v2a6.98 6.98 0 0 0 4.95-2.05l-1.414-1.414Z"></path></svg><div class="flex items-center justify-center rounded-lg md:hidden"><svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" class="h-6 w-6 text-slate-400"><path d="M16.293 17.707a1 1 0 0 0 1.414-1.414l-1.414 1.414ZM9 14a5 5 0 0 1-5-5H2a7 7 0 0 0 7 7v-2ZM4 9a5 5 0 0 1 5-5V2a7 7 0 0 0-7 7h2Zm5-5a5 5 0 0 1 5 5h2a7 7 0 0 0-7-7v2Zm8.707 12.293-3.757-3.757-1.414 1.414 3.757 3.757 1.414-1.414ZM14 9a4.98 4.98 0 0 1-1.464 3.536l1.414 1.414A6.98 6.98 0 0 0 16 9h-2Zm-1.464 3.536A4.98 4.98 0 0 1 9 14v2a6.98 6.98 0 0 0 4.95-2.05l-1.414-1.414Z"></path></svg></div><span class="sr-only md:not-sr-only md:ml-2 md:text-slate-500 md:dark:text-slate-400">Search docs...</span><kbd class="ml-auto hidden font-medium text-slate-500 dark:text-slate-400 md:block"><kbd class="font-sans">Ctrl</kbd><kbd class="font-sans">K</kbd></kbd></div></button></div><div class="relative flex items-center justify-end gap-2 lg:flex-grow lg:basis-0 lg:gap-6"><a href="https://sourcegraph.com/changelog" class="hidden whitespace-nowrap rounded-md text-xs font-medium text-slate-500 hover:text-vermilion-11 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-vermilion-11/50 dark:text-dark-paragraph-text dark:hover:text-vermilion-11 lg:inline-flex">Changelog<span class="ml-1" aria-hidden="true">↗</span></a><div class="relative inline-block text-left" data-headlessui-state=""><div><button class="inline-flex min-h-11 w-full items-center justify-center gap-x-1.5 whitespace-nowrap rounded-md px-2 py-2 text-sm font-medium text-slate-500 ring-inset ring-light-border-2 hover:bg-vermilion-08 hover:text-vermilion-11 dar
6k:text-dark-paragraph-text dark:ring-dark-border lg:min-h-0 lg:text-xs lg:shadow-sm lg:ring-1 lg:dark:bg-dark-bg-2" id="headlessui-menu-button-_R_7a6lb_" type="button" aria-haspopup="menu" aria-expanded="false" data-headlessui-state="">Latest<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon" class="-mr-1 h-4 w-4"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"></path></svg></button></div></div><div class="relative z-10 hidden lg:block" data-headlessui-state=""><div class="sr-only" id="headlessui-label-_R_re6lb_" data-headlessui-state="">Theme</div><button class="flex h-7 w-7 items-center justify-center rounded-lg shadow-md shadow-black/5 ring-1 ring-light-border-2 dark:bg-dark-bg-2 dark:ring-inset dark:ring-dark-border" aria-label="Theme" id="headlessui-listbox-button-_R_1be6lb_" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg aria-hidden="true" viewBox="0 0 16 16" class="h-4 w-4 fill-link dark:hidden"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 1a1 1 0 0 1 2 0v1a1 1 0 1 1-2 0V1Zm4 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm2.657-5.657a1 1 0 0 0-1.414 0l-.707.707a1 1 0 0 0 1.414 1.414l.707-.707a1 1 0 0 0 0-1.414Zm-1.415 11.313-.707-.707a1 1 0 0 1 1.415-1.415l.707.708a1 1 0 0 1-1.415 1.414ZM16 7.999a1 1 0 0 0-1-1h-1a1 1 0 1 0 0 2h1a1 1 0 0 0 1-1ZM7 14a1 1 0 1 1 2 0v1a1 1 0 1 1-2 0v-1Zm-2.536-2.464a1 1 0 0 0-1.414 0l-.707.707a1 1 0 0 0 1.414 1.414l.707-.707a1 1 0 0 0 0-1.414Zm0-8.486A1 1 0 0 1 3.05 4.464l-.707-.707a1 1 0 0 1 1.414-1.414l.707.707ZM3 8a1 1 0 0 0-1-1H1a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Z"></path></svg><svg aria-hidden="true" viewBox="0 0 16 16" class="hidden h-4 w-4 fill-link dark:block"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.23 3.333C7.757 2.905 7.68 2 7 2a6 6 0 1 0 0 12c.68 0 .758-.905.23-1.332A5.989 5.989 0 0 1 5 8c0-1.885.87-3.568 2.23-4.668ZM12 5a1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 2 1 1 0 0 0-1 1 1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 1 1 0-2 1 1 0 0 0 1-1 1 1 0 0 1 1-1Z"></path></svg></button></div><a class="group hidden lg:block" aria-label="GitHub" href="https://github.com/sourcegraph/docs"><span class="flex h-7 w-7 items-center justify-center rounded-lg shadow-md shadow-black/5 ring-1 ring-light-border-2 dark:bg-dark-bg-2 dark:ring-inset dark:ring-dark-border"><svg aria-hidden="true" viewBox="0 0 16 16" class="h-5 w-5 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300"><path d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z"></path></svg></span></a></div></div></div></header><div class="relative mx-auto flex w-full max-w-8xl flex-auto justify-center sm:px-2 lg:px-8 xl:px-12"><div class="hidden lg:relative lg:block lg:flex-none"><div class="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-transparent dark:block"></div><div class="absolute bottom-0 right-0 top-28 hidden w-px bg-transparent dark:block"></div><div class="sticky top-[4.75rem] -ml-0.5 h-[calc(100vh-4.75rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-72 xl:pr-16"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--></div></div><main class="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16"><nav class="mb-8 flex" aria-label="Breadcrumb"><ol role="list" class="flex items-center space-x-4"><li><div><a class="text-sm font-medium text-gray-500 hover:text-link-light dark:text-gray-400 dark:hover:text-link" href="/docs">Docs</a></div></li><li><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon" class="h-5 w-5 flex-shrink-0 text-gray-400"><path fill-rule="evenodd" d="M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"></path></svg><a class="ml-4 text-sm font-medium text-link-light hover:underline dark:text-link" href="/docs/api">api</a></div></li></ol></nav><article><div class="prose prose-slate max-w-none dark:prose-invert dark:text-dark-paragraph-text prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-headings:relative prose-headings:flex prose-headings:items-center prose-lead:text-slate-500 dark:prose-lead:text-dark-paragraph-text prose-a:font-semibold prose-a:text-vermilion-00 dar
6k:prose-a:text-vermilion-11 dark:hover:prose-a:text-dark-text-secondary prose-a:underline hover:prose-a:text-[#606060] hover:prose-a:underline dark:prose-a:underline dark:hover:prose-a:underline prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800 prose-th:table-cell prose-strong:text-vermilion-05 dark:prose-strong:text-vermilion-08 prose-code:before:content-none prose-code:after:content-none [&amp;_summary]:cursor-pointer [&amp;_details&gt;p:first-of-type]:mt-2 prose-video:rounded-xl [&amp;_#nav_ul]:ml-0 [&amp;_#nav_ul]:list-none [&amp;_#nav_ul]:pl-0 [&amp;_#nav_a]:font-normal [&amp;_#nav_a]:text-slate-500 hover:[&amp;_#nav_a]:text-slate-700 dark:[&amp;_#nav_a]:text-dark-text-secondary dark:hover:[&amp;_#nav_a]:text-slate-300 [&amp;_#nav_a]:no-underline hover:[&amp;_#nav_a]:underline dark:hover:[&amp;_#nav_a]:underline [&amp;_#nav_h5.nav-group-section-title_a]:font-normal [&amp;_#nav_h5.nav-group-section-title_a]:text-slate-500 hover:[&amp;_#nav_h5.nav-group-section-title_a]:text-slate-700 dark:[&amp;_#nav_h5.nav-group-section-title_a]:text-dark-text-secondary dark:hover:[&amp;_#nav_h5.nav-group-section-title_a]:text-slate-300 [&amp;_#nav_h5.nav-group-section-title_a]:no-underline hover:[&amp;_#nav_h5.nav-group-section-title_a]:underline dark:hover:[&amp;_#nav_h5.nav-group-section-title_a]:underline"><h1 id="sourcegraph-api"><a href="#sourcegraph-api" aria-hidden="true" tabindex="-1" class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary"><span class="icon icon-link"></span></a>Sourcegraph API</h1>
7<p>Starting in <a href="https://sourcegraph.com/changelog/releases/7.0" target="_blank" rel="noopener noreferrer" class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary">Sourcegraph 7.0</a>, a new versioned external API is being introduced for custom integrations (see the <a href="https://sourcegraph.com/changelog/sourcegraph-api" target="_blank" rel="noopener noreferrer" class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary">announcement</a>). The currently available API surface can be seen in <code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">/api-reference</code> (e.g. <code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">https://sourcegraph.example.com/api-reference</code>). From this page, integrators can view the available operations and download the OpenAPI schema. We are committed to supporting integrations built on top of these new APIs with backwards compatibility and migration assistance for breaking changes.</p>
8<div class="mb-4 overflow-hidden rounded-xl border px-5 py-4 border-sky-500/20 bg-sky-50/50 dark:border-[#002533] dark:bg-[#001118]"><div class="flex items-center space-x-3"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen text-sky-500 h-5 w-5"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M18.4 2.6a2.17 2.17 0 0 1 3 3L16 11l-4 1 1-4Z"></path></svg><div class="prose flex-1 overflow-x-auto text-sm text-sky-800 [--tw-prose-background:theme(colors.sky.50)] prose-a:text-sky-900 prose-code:text-sky-900 dark:text-[#85cfe9] dark:prose-code:text-[#85cfe9]"><p>The new Sourcegraph API is a work in progress, and capabilities are
9gradually being ported over. If you have an integration you&#x27;d like to build
10that is not currently served by the new Sourcegraph API, please reach out at
11<a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dar
11k:hover:text-dark-text-secondary" href="mailto:[email protected]">[email protected]</a>.</p></div></div></div>
12<p>For specific types of integrations, Sourcegraph also offers the following APIs:</p>
13<ul>
14<li><a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="/docs/api/stream-api">Sourcegraph streaming search API</a>, for consuming search results as a stream of events</li>
15<li><a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="/docs/api/mcp">Sourcegraph MCP server</a>, for connecting AI agents and applications to Sourcegraph&#x27;s code search capabilities</li>
16<li><a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="/docs/analytics/api">Sourcegraph Analytics API</a>, for accessing your Sourcegraph Analytics data</li>
17<li><a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="/docs/admin/webhooks">Webhooks</a>, for receiving event notifications from Sourcegraph</li>
18</ul>
19<p>For diagnostics use cases, the <a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="/docs/api/graphql">Sourcegraph GraphQL debug API</a> is also available without any compatibility guarantees.</p>
20<div class="mb-4 overflow-hidden rounded-xl border px-5 py-4 border-amber-500/20 bg-amber-50/50 dark:border-amber-500/30 dark:bg-amber-500/10"><div class="flex items-center space-x-3"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="text-amber-500 h-5 w-5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"></path></svg><div class="prose flex-1 overflow-x-auto text-sm text-amber-800 [--tw-prose-underline:theme(colors.amber.400)] [--tw-prose-background:theme(colors.amber.50)] prose-a:text-amber-900 prose-code:text-amber-900 dark:text-slate-300 dark:[--tw-prose-underline:theme(colors.sky.700)] dark:prose-code:text-slate-300"><p>The Sourcegraph GraphQL API has historically been an internal interface
21without formal compatibility guarantees. For external integrations,
22<a href="https://sourcegraph.com/changelog/releases/7.0" target="_blank" rel="noopener noreferrer" class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary">Sourcegraph 7.0</a> introduces a new, supported API at <code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">/api-reference</code>.
23The GraphQL API remains available, but we recommend migrating to the
24new API for a stable integration experience.</p><p>If you have a
25use case that is not currently served by the new Sourcegraph API, please
26reach out at <a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="mailto:[email protected]">[email protected]</a>.</p></div></div></div>
27<h2 id="tracking-integration-usage"><a class="text-inherit not-prose hover:text-inherit group" href="#tracking-integration-usage"><div class="absolute ml-[-28px] mt-1 hidden opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50"><svg viewBox="0 0 20 20" fill="none" stroke-linecap="round" aria-hidden="true" class="h-5 w-5 stroke-black transition group-focus:stroke-link-light dark:stroke-slate-200 dark:group-focus:stroke-link"><path d="m6.5 11.5-.964-.964a3.535 3.535 0 1 1 5-5l.964.964m2 2 .964.964a3.536 3.536 0 0 1-5 5L8.5 13.5m0-5 3 3"></path></svg></div><span class="icon icon-link"></span>Tracking integration usage</a></h2>
28<p>If you&#x27;d like our help breaking down and analyzing API usage across different integrations, include some or all of the following headers in your requests:</p>
29<ul>
30<li>
30<code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">X-Requested-With: &lt;your-app-name&gt;/&lt;version&gt;</code> — a stable identifier for the calling integration</li>
31<li><code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">X-Sourcegraph-API-Client-Name: &lt;caller-name&gt;</code> — the caller&#x27;s name, for example, <code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">my-integration</code></li>
32<li><code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">X-Sourcegraph-API-Client-Feature: &lt;feature-or-tool&gt;</code> — the feature or tool making the request, so that different call sites from the same integration are distinguishable</li>
33<li><code class="border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700">X-Sourcegraph-API-Client-Version: &lt;version&gt;</code> — the integration&#x27;s build or version</li>
34</ul>
35<p>When an API request triggers a <a class="text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary" href="/docs/admin/telemetry">telemetry</a> event, Sourcegraph includes the values of these headers in the event.</p></div></article><dl class="mt-12 flex border-t border-slate-200 pt-6 dark:border-slate-800"><div><dt class="font-display text-sm font-medium text-slate-900 dark:text-white">Previous</dt><dd class="mt-1"><a class="flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-dark-text-secondary dark:hover:text-slate-300 flex-row-reverse" href="/docs/integration/editor">Editor integrations<svg viewBox="0 0 16 16" aria-hidden="true" class="h-4 w-4 flex-none fill-current -scale-x-100"><path d="m9.182 13.423-1.17-1.16 3.505-3.505H3V7.065h8.517l-3.506-3.5L9.181 2.4l5.512 5.511-5.511 5.512Z"></path></svg></a></dd></div><div class="ml-auto text-right"><dt class="font-display text-sm font-medium text-slate-900 dark:text-white">Next</dt><dd class="mt-1"><a class="flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-dark-text-secondary dark:hover:text-slate-300" href="/docs/api/stream-api">Sourcegraph streaming search API<svg viewBox="0 0 16 16" aria-hidden="true" class="h-4 w-4 flex-none fill-current"><path d="m9.182 13.423-1.17-1.16 3.505-3.505H3V7.065h8.517l-3.506-3.5L9.181 2.4l5.512 5.511-5.511 5.512Z"></path></svg></a></dd></div></dl></main><div class="hidden py-16 xl:sticky xl:-mr-6 xl:block xl:h-[calc(100vh-8.75rem)] xl:flex-none xl:overflow-y-auto xl:pr-6"><nav aria-labelledby="on-this-page-title" class="w-56"><h2 id="on-this-page-title" class="font-display text-sm font-medium text-slate-900 dark:text-white">On this page</h2><ol role="list" class="mt-4 space-y-3 text-sm"><li><h3><a class="font-semibold text-link-light dark:text-link" href="#sourcegraph-api">Sourcegraph API</a></h3></li><li><ol role="list" class="mt-2 space-y-3 pl-5 text-slate-500 dark:text-dark-text-secondary"><li><a class="hover:text-slate-600 dark:hover:text-slate-300" href="#tracking-integration-usage">Tracking integration usage</a></li></ol></li></ol><hr class="mt-4"/><div class="mt-4 flex items-center text-sm"><a href="https://github.com/sourcegraph/docs/edit/main/docs/api/index.mdx" target="_blank" rel="noopener noreferrer" class="flex items-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-1 h-4 w-4"><path d="M12 20h9"></path><path d="M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z"></path><path d="m15 5 3 3"></path></svg>Edit this page on GitHub</a></div><div class="mt-2 flex items-center text-sm"><button class="flex items-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mr-1 h-4 w-4"><path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9.75a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"></path></svg>Copy page as Markdown</button></div><div class="mt-2 flex items-center text-sm"><a href="/docs/api.md" target="_blank" rel="noopener noreferrer" class="flex items-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mr-1 h-4 w-4"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"></path></svg>View as Markdown</a></div></nav></div><!--$--><!--/$--></div></div></div>
35<script>$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
36$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};$RC("B:0","S:0")</script>
36<script>(self.__next_f=self.__next_f||[]).push([0])</script>
36<script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"$Sreact.suspense\"\n3:I[44636,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"Providers\"]\n4:I[75802,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"Layout\"]\n5:I[82781,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"default\"]\n6:I[73153,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"default\"]\n7:I[21983,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"/docs/_next/static/immutable/chunks/3vy36pz01ozs_.js\"],\"NotFoundLinks\"]\nc:I[14112,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"default\",1]\n:HL[\"/docs/_next/static/immutable/chunks/1ix4tc909rkxc.css\",\"style\"]\n:HL[\"/docs/_next/static/immutable/media/PolySans_Neutral-s.p.0fodm7w6eoab4.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n:HL[\"/docs/_next/static/immutable/media/PolySans_NeutralItalic-s.p.0fz33w-sq3rz5.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n:HL[\"/docs/_next/static/immutable/media/PolySans_NeutralMono-s.p.2k7x6vnwirk8t.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n:HL[\"/docs/_next/static/immutable/media/PolySans_SlimMono-s.p.0408ut9oy3-vq.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\na:X\n0:{\"P\":null,\"c\":[\"\",\"api\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[[\"slug\",\"api\",\"c\",[\"api\"]],{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/docs/_next/static/immutable/chunks/1ix4tc909rkxc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"style\":{\"colorScheme\":\"dark\"},\"className\":\"h-full antialiased polysansvariable_7c8ad640-module__qkxgKa__variable polysansmono_8500b42b-module__LGNsUq__variable\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"link\",null,{\"rel\":\"alternate\",\"type\":\"application/rss+xml\",\"title\":\"RSS Feed for Sourcegraph\",\"href\":\"https://sourcegraph.com/changelog/technical-changelog.rss\"}]}],[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"flex min-h-full bg-light-bg dark:bg-dark-bg\",\"children\":[\"$\",\"$2\",null,{\"fallback\":null,\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"main\",null,{\"className\":\"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex h-full flex-col items-center justify-center text-center\",\"children\":[[\"$\",\"p\",null,{\"className\":\"font-display text-sm font-medium text-slate-900 dark:text-white\",\"children\":\"404\"}],[\"$\",\"h1\",null,{\"className\":\"mt-3 font-display text-3xl tracking-tight text-slate-900 dark:text-white\",\"children\":\"Page not found\"}],[\"$\",\"p\",null,{\"className\":\"mt-2 text-sm text-slate-500 dark:text-dark-paragraph-text\",\"children\":\"Sorry, we couldn’t find the page you’re looking for.\"}],[\"$\",\"$L7\",null,{\"pagePaths\":[\"/context-filters\",\"/\",\"/legacy\",\"/releases\",\"/slack-integration\",\"/supported-countries\",\"/admin/architecture\",\"/admin/audit-log\",\"/admin/enterprise-portal\",\"/admin/entitlements\",\"/admin/faq\",\"/admin\",\"/admin/licensing\",\"/admin/markdown\",\"/admin/monorepo\",\"/admin/oauth-apps\",\"/admin/organizations\",\"/admin/outbound-request-log\",\"/admin/pings\",\"/admin/privileges\",\"/admin/scim\",\"/admin/search\",\"/admin/security-event-logs\",\"/admin/service-accounts\",\"/admin/subscriptions\",\"/admin/user-data-deletion\",\"/admin/user-surveys\",\"/agentic-batch-changes/configuration\",\"/agentic-batch-changes\",\"/agentic-batch-changes/writing-prompts\",\"/ai\",\"/ai/models\",\"/analytics/api\",\"/analytics\",\"/analytics/pcw\",\"/api\",\"/batch-changes/batch-spec-cheat-sheet\",\"/batch-changes/batch-spec-templating\",\"/batch-changes/batch-spec-yaml-reference\",\"/batch-changes/bulk-operations-on-changesets\",\"/batch-changes/configuring-credentials\",\"/batch-changes/create-a-batch-change\",\"/batch-changes/creating-changesets-per-project-in-monorepos\",\"/batch-changes/creating-multiple-changesets-in-large-repositories\",\"/batch-changes/delete-a-batch-change\",\"/batch-changes/design\",\"/batch-changes/examples\",\"/batch-changes/faq\",\"/batch-changes/handling-errored-changesets\",\"/batch-changes/how-src-executes-a-batch-spec\",\"/batch-changes\",\"/batch-changes/permissions-in-batch-changes\",\"/batch-changes/publishing-changesets\",\"/batch-changes/push-only-changesets\",\"/batch-changes/quickstart\",\"/batch-changes/rebasing-changesets\",\"/batch-changes/reexecuting-batch-specs-multiple-times\",\"/batch-changes/refactor-go-comby\",\"/batch-changes/requirements\",\"/batch-changes/search-and-replace-specific-terms\",\"/batch-changes/server-side\",\"/batch-changes/site-admin-configuration\",\"/batch-changes/tracking-existing-changesets\",\"/batch-changes/troubleshooting\",\"/batch-changes/update-a-batch-change\",\"/batch-changes/update-base-images-in-dockerfiles\",\"/batch-changes/updating-go-import-statements\",\"/batch-changes/view-batch-changes\",\"/beta-and-experimental\",\"/cli\",\"/cli/quickstart\",\"/cloud\",\"/cloud/logpush-gcs\",\"/cloud/logpush-s3\",\"/cloud/private-connectivity-aws\",\"/cloud/private-connectivity-gcp\",\"/cloud/private-connectivity-public-lb\",\"/cloud/private-connectivity-sourcegraph-connect\",\"/code-insights\",\"/code-insights/language-insight-quickstart\",\"/code-insights/quickstart\",\"/code-monitoring\",\"/code-navigation/auto-indexing-configuration\",\"/code-navigation/auto-indexing\",\"/code-navigation/envvars\",\"/code-navigation/features\",\"/code-navigation\",\"/code-navigation/inference-configuration\",\"/code-navigation/precise-code-navigation\",\"/code-navigation/private-maven-repository-configuration\",\"/code-navigation/rockskip\",\"/code-navigation/search-based-code-navigation\",\"/code-navigation/smart-hover\",\"/code-navigation/syntactic-code-navigation\",\"/code-navigation/troubleshooting\",\"/code-navigation/writing-an-indexer\",\"/code-ownership/codeowners-format\",\"/code-ownership\",\"/code-search/compare-file-filtering\",\"/code-search/faq\",\"/code-search/features\",\"/code-search\",\"/code-search/query-assist\",\"/cody/faq\",\"/cody\",\"/cody/prompts-guide\",\"/cody/quickstart\",\"/cody/troubleshooting\",\"/deep-search/api\",\"/deep-search\",\"/diff-tour\",\"/dotcom\",\"/dotcom/indexing-open-source-code\",\"/getting-started/cloud-instance\",\"/getting-started/github-vs-sourcegraph\",\"/getting-started\",\"/getting-started/tour\",\"/how-to/aws-instance-sizing\",\"/integration/aws-codecommit\",\"/integration/bitbucket-cloud\",\"/integration/bitbucket-server\",\"/integration/editor\",\"/integration/github\",\"/integration/gitlab\",\"/integration/gitolite\",\"/integration/gitpod\",\"/integration\",\"/integration/jetbrains\",\"/integration/migrating-firefox-extension\",\"/integration/open-in-editor\",\"/integration/phabricator\",\"/model-provider\",\"/pricing/faqs\",\"/self-hosted/advanced-config-file\",\"/self-hosted/deployment-best-practices\",\"/self-hosted/email\",\"/self-hosted/encryption\",\"/self-hosted/faq\",\"/self-hosted/http-https-configuration\",\"/self-hosted\",\"/self-hosted/network-filter
36ing\",\"/self-hosted/postgres-conf\",\"/self-hosted/postgres\",\"/self-hosted/postgres12-end-of-life-notice\",\"/self-hosted/postgresql-collation-version-mismatch-resolution\",\"/self-hosted/pprof\",\"/self-hosted/private-network\",\"/self-hosted/restore\",\"/self-hosted/sourcegraph-nginx-mermaid\",\"/self-hosted/ssl-https-self-signed-cert-nginx\",\"/self-hosted/url\",\"/self-hosted/validation\",\"/self-hosted/workers\",\"/sla\",\"/sourcegraph-accounts\",\"/tutorials\",\"/admin/access-control/batch-changes\",\"/admin/access-control\",\"/admin/auth/builtin\",\"/admin/auth\",\"/admin/auth/login-form\",\"/admin/auth/troubleshooting\",\"/admin/code-hosts/aws-codecommit\",\"/admin/code-hosts/azuredevops\",\"/admin/code-hosts/bitbucket-cloud\",\"/admin/code-hosts/bitbucket-server\",\"/admin/code-hosts/gerrit\",\"/admin/code-hosts/github\",\"/admin/code-hosts/gitlab\",\"/admin/code-hosts/gitolite\",\"/admin/code-hosts\",\"/admin/code-hosts/non-git\",\"/admin/code-hosts/other\",\"/admin/code-hosts/phabricator\",\"/admin/code-hosts/rate-limits\",\"/admin/code-hosts/src-serve-git\",\"/admin/config/authorization-and-authentication\",\"/admin/config/batch-changes\",\"/admin/config/settings\",\"/admin/config/site-config\",\"/admin/executors/executor-secrets\",\"/admin/executors\",\"/admin/how-to/enable-experimental-feature\",\"/admin/how-to/export-search-results\",\"/admin/how-to\",\"/admin/how-to/internal-github-repos\",\"/admin/how-to/manage-feature-flags-with-graphql\",\"/admin/how-to/monorepo-issues\",\"/admin/how-to/mutate-user-api\",\"/admin/how-to/remove-repo\",\"/admin/how-to/repo-not-updated\",\"/admin/how-to/site-admin-quickstart\",\"/admin/how-to/submodule-configuration\",\"/admin/how-to/unknown-error-login\",\"/admin/how-to/update-repo-failure\",\"/admin/migration\",\"/admin/migration/opengrok\",\"/admin/permissions/api\",\"/admin/permissions\",\"/admin/permissions/syncing\",\"/admin/permissions/webhooks\",\"/admin/repo/add\",\"/admin/repo/auth\",\"/admin/repo/git-config\",\"/admin/repo\",\"/admin/repo/metadata\",\"/admin/repo/perforce\",\"/admin/repo/plasticscm\",\"/admin/repo/recording\",\"/admin/repo/update-frequency\",\"/admin/repo/webhooks\",\"/admin/telemetry\",\"/admin/telemetry/private-metadata-allowlist\",\"/admin/telemetry/protocol\",\"/admin/webhooks/incoming\",\"/admin/webhooks\",\"/admin/webhooks/outgoing\",\"/api/graphql\",\"/api/mcp/authentication\",\"/api/mcp/client-integrations\",\"/api/mcp\",\"/api/stream-api\",\"/cli/explanations/env\",\"/cli/explanations\",\"/cli/explanations/versioning\",\"/cli/explanations/windows\",\"/cli/how-tos/creating-an-access-token\",\"/cli/how-tos/fetch-sboms\",\"/cli/how-tos\",\"/cli/how-tos/managing-access-tokens\",\"/cli/how-tos/revoking-an-access-token\",\"/cli/how-tos/verify-container-signatures\",\"/cli/references/api\",\"/cli/references/debug\",\"/cli/references\",\"/cli/references/login\",\"/cli/references/lsp\",\"/cli/references/search-jobs\",\"/cli/references/search\",\"/cli/references/serve-git\",\"/cli/references/snapshot\",\"/cli/references/teams\",\"/cli/references/version\",\"/code-insights/explanations/administration-and-security-of-code-insights\",\"/code-insights/explanations/automatically-generated-data-series\",\"/code-insights/explanations/code-insights-filters\",\"/code-insights/explanations/current-limitations-of-code-insights\",\"/code-insights/explanations/data-retention\",\"/code-insights/explanations\",\"/code-insights/explanations/search-results-aggregations\",\"/code-insights/explanations/viewing-code-insights\",\"/code-insights/how-tos/Troubleshooting\",\"/code-insights/how-tos/creating-a-custom-dashboard-of-code-insights\",\"/code-insights/how-tos/filtering-an-insight\",\"/code-insights/how-tos\",\"/code-insights/references/common-reasons-code-insights-may-not-match-search-results\",\"/code-insights/references/common-use-cases\",\"/code-insights/references/incomplete-data-points\",\"/code-insights/references\",\"/code-insights/references/license\",\"/code-insights/references/repository-scope\",\"/code-insights/references/requirements\",\"/code-insights/references/search-aggregations-use-cases\",\"/code-insights/types/inventory-stats\",\"/code-navigation/explanations/auto-indexing-inference\",\"/code-navigation/explanations/uploads\",\"/code-navigation/how-to/adding-scip-to-workflows\",\"/code-navigation/how-to/combining-scip-uploads-from-ci-cd-and-auto-indexing\",\"/code-navigation/how-to/index-a-go-repository\",\"/code-navigation/how-to/index-a-typescript-and-javascript-repository\",\"/code-navigation/how-to/index-other-languages\",\"/code-navigation/how-to\",\"/code-navigation/how-to/policies-resource-usage-best-practices\",\"/code-search/how-to\",\"/code-search/how-to/opengrok\",\"/code-search/queries/examples\",\"/code-search/queries\",\"/code-search/queries/language\",\"/code-search/types/fuzzy\",\"/code-search/types/search-jobs\",\"/code-search/types/structural\",\"/code-search/types/symbol\",\"/code-search/working/saved-searches\",\"/code-search/working/search-contexts\",\"/code-search/working/search-filters\",\"/code-search/working/search-subexpressions\",\"/code-search/working/snippets\",\"/cody/capabilities/agentic-context-fetching\",\"/cody/capabilities/auto-edit\",\"/cody/capabilities/autocomplete\",\"/cody/capabilities/chat\",\"/cody/capabilities/debug-code\",\"/cody/capabilities/edit-modes\",\"/cody/capabilities/ignore-context\",\"/cody/capabilities\",\"/cody/capabilities/ollama\",\"/cody/capabilities/openctx\",\"/cody/capabilities/prompts\",\"/cody/capabilities/proxy-setup\",\"/cody/capabilities/supported-models\",\"/cody/clients/cody-with-sourcegraph\",\"/cody/clients/enable-cody-enterprise\",\"/cody/clients/feature-reference\",\"/cody/clients\",\"/cody/clients/install-cli\",\"/cody/clients/install-jetbrains\",\"/cody/clients/install-neovim\",\"/cody/clients/install-visual-studio\",\"/cody/clients/install-vscode\",\"/cody/core-concepts/code-graph\",\"/cody/core-concepts/context\",\"/cody/core-concepts\",\"/cody/core-concepts/keyword-search\",\"/cody/core-concepts/local-indexing\",\"/cody/core-concepts/token-limits\",\"/cody/enterprise/completions-configuration\",\"/cody/enterprise/features\",\"/cody/enterprise/model-config-examples\",\"/cody/enterprise/model-configuration\",\"/cody/use-cases/build-ui\",\"/cody/use-cases/generate-unit-tests\",\"/cody/use-cases/vsc-tutorial\",\"/getting-started/personalization/badges\",\"/getting-started/personalization\",\"/getting-started/personalization/themes\",\"/integration/browser-extension\",\"/integration/browser-extension/quickstart\",\"/pricing/plans/enterprise-starter\",\"/pricing/plans/enterprise\",\"/self-hosted/deploy\",\"/self-hosted/deploy/instance-size\",\"/self-hosted/deploy/migrate-backup\",\"/self-hosted/deploy/repositories\",\"/self-hosted/deploy/resource-estimator\",\"/self-hosted/deploy/scale\",\"/self-hosted/deploy/without-service-discovery\",\"/self-hosted/executors/custom-certificates\",\"/self-hosted/executors/deploy-executors-binary-offline\",\"/self-hosted/executors/deploy-executors-binary\",\"/self-hosted/executors/deploy-executors-dind\",\"/self-hosted/executors/deploy-executors-docker\",\"/self-hosted/executors/deploy-executors-kubernetes\",\"/self-hosted/executors/deploy-executors-terraform-aws\",\"/self-hosted/executors/deploy-executors-terraform-gcp\",\"/self-hosted/executors/deploy-executors-terraform\",\"/self-hosted/executors/executors-config\",\"/self-hosted/executors/executors-troubleshooting\",\"/self-hosted/executors/firecracker\",\"/self-hosted/executors\",\"/self-hosted/executors/private-registries\",\"/self-hosted/executors/resource-sizing\",\"/self-hosted/external-services\",\"/self-hosted/external-services/object-storage\",\"/self-hosted/external-services/postgres\",\"/self-hosted/external-services/redis\",\"/self-hosted/how-to/blobstore-debugging\",\"/self-hosted/how-to/clear-codeintel-data\",\"/self-hosted/how-to/dirty-database\",\"/self-hosted/how-to\",\"/self-hosted/how-to/monitoring-guide\",\"/self-hosted/how-to/postgres-12-to-16-drift\",\"/self-hosted/how-to/postgres14-index-corruption\",\"/self-hosted/how-to/privileged-migrations\",\"/self-hosted/how-to/rebuild-corrupt-postgres-indexe
36s\",\"/self-hosted/how-to/redis-configmap\",\"/self-hosted/how-to/rollback-database\",\"/self-hosted/how-to/run-psql\",\"/self-hosted/how-to/setup-https\",\"/self-hosted/how-to/troubleshoot-pod-eviction\",\"/self-hosted/how-to/unfinished-migration\",\"/self-hosted/how-to/upgrade-postgres-12-16-builtin-dbs\",\"/self-hosted/observability/alerting-custom-consumption\",\"/self-hosted/observability/alerting\",\"/self-hosted/observability/alerts\",\"/self-hosted/observability/dashboards\",\"/self-hosted/observability/health-checks\",\"/self-hosted/observability\",\"/self-hosted/observability/logs\",\"/self-hosted/observability/metrics\",\"/self-hosted/observability/opentelemetry\",\"/self-hosted/observability/tracing\",\"/self-hosted/observability/troubleshooting\",\"/self-hosted/updates/automatic\",\"/self-hosted/updates\",\"/admin/auth/saml/azure-ad\",\"/admin/auth/saml/generic\",\"/admin/auth/saml\",\"/admin/auth/saml/jump-cloud\",\"/admin/auth/saml/microsoft-adfs\",\"/admin/auth/saml/okta\",\"/admin/auth/saml/one-login\",\"/cli/references/abc\",\"/cli/references/auth\",\"/cli/references/auth/token\",\"/cli/references/batch/apply\",\"/cli/references/batch/exec\",\"/cli/references/batch\",\"/cli/references/batch/new\",\"/cli/references/batch/preview\",\"/cli/references/batch/remote\",\"/cli/references/batch/repositories\",\"/cli/references/batch/validate\",\"/cli/references/code-intel\",\"/cli/references/code-intel/upload\",\"/cli/references/codeowners/create\",\"/cli/references/codeowners/delete\",\"/cli/references/codeowners/get\",\"/cli/references/codeowners\",\"/cli/references/codeowners/update\",\"/cli/references/config/edit\",\"/cli/references/config/get\",\"/cli/references/config\",\"/cli/references/config/list\",\"/cli/references/debug/compose\",\"/cli/references/debug\",\"/cli/references/debug/kube\",\"/cli/references/debug/server\",\"/cli/references/extsvc/create\",\"/cli/references/extsvc/edit\",\"/cli/references/extsvc\",\"/cli/references/extsvc/list\",\"/cli/references/orgs/create\",\"/cli/references/orgs/delete\",\"/cli/references/orgs/get\",\"/cli/references/orgs\",\"/cli/references/orgs/list\",\"/cli/references/repos/add-metadata\",\"/cli/references/repos/delete-metadata\",\"/cli/references/repos/delete\",\"/cli/references/repos/get\",\"/cli/references/repos\",\"/cli/references/repos/list\",\"/cli/references/repos/update-metadata\",\"/cli/references/search-jobs/cancel\",\"/cli/references/search-jobs/create\",\"/cli/references/search-jobs/delete\",\"/cli/references/search-jobs/get\",\"/cli/references/search-jobs\",\"/cli/references/search-jobs/list\",\"/cli/references/search-jobs/logs\",\"/cli/references/search-jobs/restart\",\"/cli/references/search-jobs/results\",\"/cli/references/snapshot/databases\",\"/cli/references/snapshot\",\"/cli/references/snapshot/restore\",\"/cli/references/snapshot/summary\",\"/cli/references/snapshot/test\",\"/cli/references/snapshot/upload\",\"/cli/references/users/create\",\"/cli/references/users/delete\",\"/cli/references/users/get\",\"/cli/references/users\",\"/cli/references/users/list\",\"/cli/references/users/prune\",\"/cli/references/users/tag\",\"/integration/browser-extension/how-tos/browser-search-engine\",\"/integration/browser-extension/how-tos/google-workspace\",\"/integration/browser-extension/how-tos\",\"/integration/browser-extension/how-tos/troubleshooting\",\"/integration/browser-extension/references/features\",\"/integration/browser-extension/references\",\"/integration/browser-extension/references/privacy\",\"/self-hosted/deploy/docker-compose/aws\",\"/self-hosted/deploy/docker-compose/azure\",\"/self-hosted/deploy/docker-compose/configuration\",\"/self-hosted/deploy/docker-compose/digitalocean\",\"/self-hosted/deploy/docker-compose/google-cloud\",\"/self-hosted/deploy/docker-compose\",\"/self-hosted/deploy/docker-compose/migrate\",\"/self-hosted/deploy/docker-compose/operations\",\"/self-hosted/deploy/docker-compose/upgrade\",\"/self-hosted/deploy/kubernetes/azure\",\"/self-hosted/deploy/kubernetes/configure\",\"/self-hosted/deploy/kubernetes/eks\",\"/self-hosted/deploy/kubernetes\",\"/self-hosted/deploy/kubernetes/kustomize\",\"/self-hosted/deploy/kubernetes/operations\",\"/self-hosted/deploy/kubernetes/scale\",\"/self-hosted/deploy/kubernetes/troubleshoot\",\"/self-hosted/deploy/kubernetes/upgrade\",\"/self-hosted/deploy/machine-images/aws-ami\",\"/self-hosted/deploy/machine-images/aws-oneclick\",\"/self-hosted/deploy/machine-images/gce\",\"/self-hosted/deploy/machine-images\",\"/self-hosted/deploy/single-node\",\"/self-hosted/deploy/single-node/script\",\"/self-hosted/updates/migrator/downgrading\",\"/self-hosted/updates/migrator\",\"/self-hosted/updates/migrator/migrator-operations\",\"/self-hosted/updates/migrator/schema-drift\",\"/self-hosted/updates/migrator/troubleshooting-upgrades\",\"/self-hosted/updates/migrator/upgrading-early-versions\",\"/cli/references/abc/variables/delete\",\"/cli/references/abc/variables\",\"/cli/references/abc/variables/set\",\"/cli/references/orgs/members/add\",\"/cli/references/orgs/members\",\"/cli/references/orgs/members/remove\",\"/self-hosted/deploy/kubernetes/kustomize/eks\",\"/self-hosted/deploy/kubernetes/kustomize/gke\",\"/self-hosted/deploy/kubernetes/kustomize\",\"/self-hosted/deploy/kubernetes/kustomize/migrate\"]}]]}]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}]]}],{\"children\":[\"$L8\",{\"children\":[\"$L9\",{}
36,null,false,null]},null,false,\"$a\"]},null,false,null],\"$Lb\",false]],\"m\":\"$undefined\",\"G\":[\"$c\",[\"$Ld\"]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\"}\nf:I[9359,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"OutletBoundary\"]\n11:I[9359,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"ViewportBoundary\"]\n13:I[9359,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"MetadataBoundary\"]\n8:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n9:[\"$\",\"$1\",\"c\",{\"children\":[\"$Le\",[[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/immutable/chunks/0po__7_9vektv.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$2\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@10\"}]}]]}]\nb:[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L11\",null,{\"children\":\"$L12\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L13\",null,{\"children\":[\"$\",\"$2\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L14\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]\nd:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/docs/_next/static/immutable/chunks/1ix4tc909rkxc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n15:I[7335,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js\",\"/docs/_next/static/immutable/chunks/0po__7_9vektv.js\"],\"Breadcrumbs\"]\na:C\n16:T6f0,prose prose-slate max-w-none dark:prose-invert dark:text-dark-paragraph-text prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-headings:relative prose-headings:flex prose-headings:items-center prose-lead:text-slate-500 dark:prose-lead:text-dark-paragraph-text prose-a:font-semibold prose-a:text-vermilion-00 dark:prose-a:text-vermilion-11 dark:hover:prose-a:text-dark-text-secondary prose-a:underline hover:prose-a:text-[#606060] hover:prose-a:underline dark:prose-a:underline dark:hover:prose-a:underline prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800 prose-th:table-cell prose-strong:text-vermilion-05 dark:prose-strong:text-vermilion-08 prose-code:before:content-none prose-code:after:content-none [\u0026_summary]:cursor-pointer [\u0026_details\u003ep:first-of-type]:mt-2 prose-video:rounded-xl [\u0026_#nav_ul]:ml-0 [\u0026_#nav_ul]:list-none [\u0026_#nav_ul]:pl-0 [\u0026_#nav_a]:font-normal [\u0026_#nav_a]:text-slate-500 hover:[\u0026_#nav_a]:text-slate-700 dark:[\u0026_#nav_a]:text-dark-text-secondary dark:hover:[\u0026_#nav_a]:text-slate-300 [\u0026_#nav_a]:no-underline hover:[\u0026_#nav_a]:underline dark:hover:[\u0026_#nav_a]:underline [\u0026_#nav_h5.nav-group-section-title_a]:font-normal [\u0026_#nav_h5.nav-group-section-title_a]:text-slate-500 hover:[\u0026_#nav_h5.nav-group-section-title_a]:text-slate-700 dark:[\u0026_#nav_h5.nav-group-section-title_a]:text-dark-text-secondary dark:hover:[\u0026_#nav_h5.nav-group-section-title_a]:text-slate-300 [\u0026_#nav_h5.nav-group-section-title_a]:no-underline hover:[\u0026_#nav_h5.nav-group-section-title_a]:underline dark:hover:[\u0026_#nav_h5.nav-group-section-title_a]:underlinee:[[\"$\",\"main\",null,{\"className\":\"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16\",\"children\":[[\"$\",\"$L15\",null,{\"path\":[\"api\"]}],[\"$\",\"article\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"$16\",\"children\":[[\"$\",\"h1\",null,{\"id\":\"sourcegraph-api\",\"children\":[[\"$\",\"a\",null,{\"href\":\"#sourcegraph-api\",\"aria-hidden\":\"true\",\"tabIndex\":\"-1\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dar
36k:hover:text-dark-text-secondary\",\"children\":[\"$\",\"span\",null,{\"className\":\"icon icon-link\"}]}],\"Sourcegraph API\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Starting in \",[\"$\",\"a\",null,{\"href\":\"https://sourcegraph.com/changelog/releases/7.0\",\"target\":\"_blank\",\"rel\":\"noopener noreferrer\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Sourcegraph 7.0\"}],\", a new versioned external API is being introduced for custom integrations (see the \",[\"$\",\"a\",null,{\"href\":\"https://sourcegraph.com/changelog/sourcegraph-api\",\"target\":\"_blank\",\"rel\":\"noopener noreferrer\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"announcement\"}],\"). The currently available API surface can be seen in \",\"$L17\",\" (e.g. \",\"$L18\",\"). From this page, integrators can view the available operations and download the OpenAPI schema. We are committed to supporting integrations built on top of these new APIs with backwards compatibility and migration assistance for breaking changes.\"]}],\"\\n\",[\"$\",\"div\",null,{\"className\":\"mb-4 overflow-hidden rounded-xl border px-5 py-4 border-sky-500/20 bg-sky-50/50 dark:border-[#002533] dark:bg-[#001118]\",\"children\":\"$L19\"}],\"\\n\",\"$L1a\",\"\\n\",\"$L1b\",\"\\n\",\"$L1c\",\"\\n\",\"$L1d\",\"\\n\",\"$L1e\",\"\\n\",\"$L1f\",\"\\n\",\"$L20\",\"\\n\",\"$L21\"]}]}],\"$L22\"]}],\"$L23\"]\n24:I[70847,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js\",\"/docs/_next/static/immutable/chunks/0po__7_9vektv.js\"],\"\"]\n26:I[8926,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js\",\"/docs/_next/static/immutable/chunks/0po__7_9vektv.js\"],\"Heading\"]\n2c:I[3503,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js\",\"/docs/_next/static/immutable/chunks/0po__7_9vektv.js\"],\"PrevNextLinks\"]\n2d:I[84646,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\",\"/docs/_next/static/immutable/chunks/0zbbiygr3-qhj.js\",\"/docs/_next/static/immutable/chunks/0po__7_9vektv.js\"],\"TableOfContents\"]\n19:[\"$\",\"div\",null,{\"className\":\"flex items-center space-x-3\",\"children\":[[\"$\",\"svg\",null,{\"ref\":\"$undefined\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":24,\"height\":24,\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":2,\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"className\":\"lucide lucide-notebook-pen text-sky-500 h-5 w-5\",\"children\":[[\"$\",\"path\",\"re6nr2\",{\"d\":\"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4\"}],[\"$\",\"path\",\"aawbzj\",{\"d\":\"M2 6h4\"}],[\"$\",\"path\",\"l0bgd4\",{\"d\":\"M2 10h4\"}],[\"$\",\"path\",\"1gsvsf\",{\"d\":\"M2 14h4\"}],[\"$\",\"path\",\"1bu2t1\",{\"d\":\"M2 18h4\"}],[\"$\",\"path\",\"1dba1m\",{\"d\":\"M18.4 2.6a2.17 2.17 0 0 1 3 3L16 11l-4 1 1-4Z\"}],\"$undefined\"]}],[\"$\",\"div\",null,{\"className\":\"prose flex-1 overflow-x-auto text-sm text-sky-800 [--tw-prose-background:theme(colors.sky.50)] prose-a:text-sky-900 prose-code:text-sky-900 dark:text-[#85cfe9] dark:prose-code:text-[#85cfe9]\",\"children\":[\"$\",\"p\",null,{\"children\":[\"The new Sourcegraph API is a work in progress, and capabilities are\\ngradually being ported over. If you have an integration you'd like to build\\nthat is not currently served by the new Sourcegraph API, please reach out at\\n\",[\"$\",\"$L24\",null,{\"href\":\"mailto:[email protected]\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dar
36k:hover:text-dark-text-secondary\",\"children\":\"[email protected]\"}],\".\"]}]}]]}]\n1a:[\"$\",\"p\",null,{\"children\":\"For specific types of integrations, Sourcegraph also offers the following APIs:\"}]\n1b:[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L24\",null,{\"href\":\"/api/stream-api/\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Sourcegraph streaming search API\"}],\", for consuming search results as a stream of events\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L24\",null,{\"href\":\"/api/mcp/\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Sourcegraph MCP server\"}],\", for connecting AI agents and applications to Sourcegraph's code search capabilities\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L24\",null,{\"href\":\"/analytics/api/\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Sourcegraph Analytics API\"}],\", for accessing your Sourcegraph Analytics data\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L24\",null,{\"href\":\"/admin/webhooks/\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Webhooks\"}],\", for receiving event notifications from Sourcegraph\"]}],\"\\n\"]}]\n1c:[\"$\",\"p\",null,{\"children\":[\"For diagnostics use cases, the \",[\"$\",\"$L24\",null,{\"href\":\"/api/graphql/\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Sourcegraph GraphQL debug API\"}],\" is also available without any compatibility guarantees.\"]}]\n1d:[\"$\",\"div\",null,{\"className\":\"mb-4 overflow-hidden rounded-xl border px-5 py-4 border-amber-500/20 bg-amber-50/50 dark:border-amber-500/30 dark:bg-amber-500/10\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex items-center space-x-3\",\"children\":[[\"$\",\"svg\",null,{\"xmlns\":\"http://www.w3.org/2000/svg\",\"fill\":\"none\",\"viewBox\":\"0 0 24 24\",\"strokeWidth\":1.5,\"stroke\":\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",\"ref\":\"$undefined\",\"aria-labelledby\":\"$undefined\",\"className\":\"text-amber-500 h-5 w-5\",\"children\":[null,[\"$\",\"path\",null,{\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"d\":\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z\"}]]}],[\"$\",\"div\",null,{\"className\":\"prose flex-1 overflow-x-auto text-sm text-amber-800 [--tw-prose-underline:theme(colors.amber.400)] [--tw-prose-background:theme(colors.amber.50)] prose-a:text-amber-900 prose-code:text-amber-900 dark:text-slate-300 dark:[--tw-prose-underline:theme(colors.sky.700)] dark:prose-code:text-slate-300\",\"children\":[[\"$\",\"p\",null,{\"children\":[\"The Sourcegraph GraphQL API has historically been an internal interface\\nwithout formal compatibility guarantees. For external integrations,\\n\",[\"$\",\"a\",null,{\"href\":\"https://sourcegraph.com/changelog/releases/7.0\",\"target\":\"_blank\",\"rel\":\"noopener noreferrer\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"Sourcegraph 7.0\"}],\" introduces a new, supported API at \",\"$L25\",\".\\nThe GraphQL API remains available, but we recommend migrating to the\\nnew API for a stable integration experience.\"]}],[\"$\",\"p\",null,{\"children\":[\"If you have a\\nuse case that is not currently served by the new Sourcegraph API, please\\nreach out at \",[\"$\",\"$L24\",null,{\"href\":\"mailto:[email protected]\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"[email protected]\"}],\".\"]}]]}]]}]}]\n1e:[\"$\",\"$L26\",null,{\"level\":\"2\",\"id\":\"tracking-integration-usage\",\"props\":{\"id\":\"tracking-integration-usage\",\"children\":[[\"$\",\"a\",null,{\"href\":\"#tracking-integration-usage\",\"aria-hidden\":\"true\",\"tabIndex\":\"-1\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dar
36k:hover:text-dark-text-secondary\",\"children\":[\"$\",\"span\",null,{\"className\":\"icon icon-link\"}]}],\"Tracking integration usage\"]}}]\n1f:[\"$\",\"p\",null,{\"children\":\"If you'd like our help breaking down and analyzing API usage across different integrations, include some or all of the following headers in your requests:\"}]\n20:[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[\"$L27\",\" — a stable identifier for the calling integration\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[\"$L28\",\" — the caller's name, for example, \",\"$L29\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[\"$L2a\",\" — the feature or tool making the request, so that different call sites from the same integration are distinguishable\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[\"$L2b\",\" — the integration's build or version\"]}],\"\\n\"]}]\n21:[\"$\",\"p\",null,{\"children\":[\"When an API request triggers a \",[\"$\",\"$L24\",null,{\"href\":\"/admin/telemetry/\",\"className\":\"text-vermilion-00 underline hover:text-[#606060] dark:text-vermilion-11 dark:hover:text-dark-text-secondary\",\"children\":\"telemetry\"}],\" event, Sourcegraph includes the values of these headers in the event.\"]}]\n22:[\"$\",\"$L2c\",null,{}]\n2e:Tb3f,# Sourcegraph API\n\nStarting in [Sourcegraph 7.0](https://sourcegraph.com/changelog/releases/7.0), a new versioned external API is being introduced for custom integrations (see the [announcement](https://sourcegraph.com/changelog/sourcegraph-api)). The currently available API surface can be seen in `/api-reference` (e.g. `https://sourcegraph.example.com/api-reference`). From this page, integrators can view the available operations and download the OpenAPI schema. We are committed to supporting integrations built on top of these new APIs with backwards compatibility and migration assistance for breaking changes.\n\n\u003cCallout type=\"note\"\u003e\n\tThe new Sourcegraph API is a work in progress, and capabilities are\n\tgradually being ported over. If you have an integration you'd like to build\n\tthat is not currently served by the new Sourcegraph API, please reach out at\n\[email protected].\n\u003c/Callout\u003e\n\nFor specific types of integrations, Sourcegraph also offers the following APIs:\n\n- [Sourcegraph streaming search API](/api/stream-api/), for consuming search results as a stream of events\n- [Sourcegraph MCP server](/api/mcp/), for connecting AI agents and applications to Sourcegraph's code search capabilities\n- [Sourcegraph Analytics API](/analytics/api/), for accessing your Sourcegraph Analytics data\n- [Webhooks](/admin/webhooks/), for receiving event notifications from Sourcegraph\n\nFor diagnostics use cases, the [Sourcegraph GraphQL debug API](/api/graphql/) is also available without any compatibility guarantees.\n\n\u003cCallout type=\"warning\"\u003e\n\t\u003cp\u003eThe Sourcegraph GraphQL API has historically been an internal interface\n\twithout formal compatibility guarantees. For external integrations,\n\t[Sourcegraph 7.0](https://sourcegraph.com/changelog/releases/7.0) introduces a new, supported API at `/api-reference`.\n\tThe GraphQL API remains available, but we recommend migrating to the\n\tnew API for a stable integration experience.\u003c/p\u003e\n\n    \u003cp\u003eIf you have a\n    use case that is not currently served by the new Sourcegraph API, please\n    reach out at [email protected].\u003c/p\u003e\n\n\u003c/Callout\u003e\n\n## Tracking integration usage\n\nIf you'd like our help breaking down and analyzing API usage across different integrations, include some or all of the following headers in your requests:\n\n- `X-Requested-With: \u003cyour-app-name\u003e/\u003cversion\u003e` — a stable identifier for the calling integration\n- `X-Sourcegraph-API-Client-Name: \u003ccaller-name\u003e` — the caller's name, for example, `my-integration`\n- `X-Sourcegraph-API-Client-Feature: \u003cfeature-or-tool\u003e` — the feature or tool making the request, so that different call sites from the same integration are distinguishable\n- `X-Sourcegraph-API-Client-Version: \u003cversion\u003e` — the integration's build or version\n\nWhen an API request triggers a [telemetry](/admin/telemetry/) event, Sourcegraph includes the values of these headers in the event.\n23:[\"$\",\"$L2d\",null,{\"headings\":[{\"level\":1,\"title\":\"Sourcegraph API\",\"id\":\"sourcegraph-api\"}
36,{\"level\":2,\"title\":\"Tracking integration usage\",\"id\":\"tracking-integration-usage\"}],\"rawMarkdown\":\"$2e\",\"editPath\":\"api/index.mdx\"}]\n12:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n17:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"/api-reference\"}]\n18:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"https://sourcegraph.example.com/api-reference\"}]\n25:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"/api-reference\"}]\n27:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"X-Requested-With: \u003cyour-app-name\u003e/\u003cversion\u003e\"}]\n28:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"X-Sourcegraph-API-Client-Name: \u003ccaller-name\u003e\"}]\n29:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"my-integration\"}]\n2a:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"X-Sourcegraph-API-Client-Feature: \u003cfeature-or-tool\u003e\"}]\n2b:[\"$\",\"code\",null,{\"className\":\"border font-medium bg-slate-100 dark:bg-slate-900 px-1 py-0.5 rounded-md border-slate-300 dark:border-slate-700\",\"children\":\"X-Sourcegraph-API-Client-Version: \u003cversion\u003e\"}]\n2f:I[51301,[\"/docs/_next/static/immutable/chunks/31rnv7uqc5rds.js\",\"/docs/_next/static/immutable/chunks/1741v4eqjktd_.js\",\"/docs/_next/static/immutable/chunks/147f1iuo1u9zo.js\"],\"IconMark\"]\n10:null\n14:[[\"$\",\"title\",\"0\",{\"children\":\"Sourcegraph API - Sourcegraph docs\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Documentation for Sourcegraph, the code intelligence platform.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"docsearch:language\",\"content\":\"en\"}],[\"$\",\"meta\",\"3\",{\"name\":\"docsearch:version\",\"content\":\"v8.0\"}],[\"$\",\"link\",\"4\",{\"rel\":\"canonical\",\"href\":\"https://sourcegraph.com/docs/api\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:title\",\"content\":\"Sourcegraph API - Sourcegraph docs\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:description\",\"content\":\"Documentation for Sourcegraph, the code intelligence platform.\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:image\",\"content\":\"https://sourcegraph.com/docs/api/og/api\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"10\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:title\",\"content\":\"Sourcegraph API - Sourcegraph docs\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:description\",\"content\":\"Documentation for Sourcegraph, the code intelligence platform.\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:image\",\"content\":\"https://sourcegraph.com/docs/api/og/api\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"15\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"16\",{\"rel\":\"icon\",\"href\":\"/docs/icon.svg?icon.24pqlc06a_6hx.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$L2f\",\"17\",{}]]\n"])</script>
36<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a43a1fcdeb50127b',t:'MTc5MDg0MzYyNA=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>
36<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"250e6287192a41f09056d5b0674929ca","spa":2}' crossorigin="anonymous"></script>
36
37</body></html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.