Search for relevant document chunks based on a query. Under the hood, Captide’s RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query.
This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents.
This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.
GET
/
api
/
v2
/
rag
/
chunks
Search document chunks (v2)
curl --request GET \
--url https://rest-api.captide.co/api/v2/rag/chunks \
--header 'X-API-Key: <api-key>'
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Captide API","colors":{"primary":"#478ef8","light":"#478ef8","dark":"#478ef8"},"logo":{"light":"https://mintcdn.com/captide/9nTwxd7pkhCHGj3r/logo/light.svg?fit=max\u0026auto=format\u0026n=9nTwxd7pkhCHGj3r\u0026q=85\u0026s=f6615b1fe22f08cba979a10550c982df","dark":"https://mintcdn.com/captide/9nTwxd7pkhCHGj3r/logo/dark.svg?fit=max\u0026auto=format\u0026n=9nTwxd7pkhCHGj3r\u0026q=85\u0026s=1b6ed8e12928c3d8d768f7c25647cdd6"},"favicon":"https://mintcdn.com/captide/9nTwxd7pkhCHGj3r/favicon.svg?fit=max\u0026auto=format\u0026n=9nTwxd7pkhCHGj3r\u0026q=85\u0026s=98836a1114e87469711b68f291635b09","api":{"openapi":"https://rest-api.captide.co/openapi.json","playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:support@captide.co","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/captideai","github":"https://github.com/captide-tech","linkedin":"https://linkedin.com/company/captide"}},"integrations":{"ga4":{"measurementId":"G-S25SS09G77"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"captide","hasAudioNarration":false,"actualSubdomain":"captide","customDomains":["docs.captide.ai"],"gitSource":{"type":"github","owner":"captide-tech","repo":"captide-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e6a133a4518725aabcf2","collectionId":"c590f4b5-13d8-404c-aa76-ed44e192b0b9","schemaVersion":"v2"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6a21e6a133a4518725aabcf2:success","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"API Reference","count":10},{"language":"default","tag":"Agentic RAG","count":4},{"language":"default","tag":"Guides","count":4},{"language":"default","tag":"Companies","count":3},{"language":"default","tag":"Getting started","count":3},{"language":"default","tag":"Documents","count":2},{"language":"default","tag":"API documentation","count":1},{"language":"default","tag":"Integration","count":1}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/chunks","slug":"/api-reference/endpoint/chunks","pageMetadata":{"title":"Chunk Retrieval","openapi":"GET /api/v2/rag/chunks","description":"Search for relevant document chunks based on a query. Under the hood, Captide's RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query.\n This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents.\n \n This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.","href":"/api-reference/endpoint/chunks"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Search for relevant document chunks based on a query. Under the hood, Captide’s RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query.\\nThis endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Chunk Retrieval","openapi":"GET /api/v2/rag/chunks","description":"Search for relevant document chunks based on a query. Under the hood, Captide's RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query.\n This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents.\n \n This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.","href":"/api-reference/endpoint/chunks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Retrieval Augmented Generation"],"summary":"Search document chunks (v2)","description":"Search for relevant document chunks based on a query. Under the hood, Captide's RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query.\n This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents.\n \n This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.","operationId":"search_chunks_api_v2_rag_chunks_get","security":["e31f95bd-3621-4c9c-9b6a-85d925623b28"],"parameters":["486c0ba5-1fd2-49b9-9d82-a2d386a5649e","7f3f39fd-1edb-47ce-8d48-85d05c094d06"],"responses":{"200":"a228430a-28c0-4e6d-85b5-79d33b817a2d","400":"ae1d97af-01aa-4798-9085-711c1fbace4e","401":"159d4bde-c35c-4c16-b917-9bdd498d178c","404":"525f7b5b-c5f7-4960-aca6-59f6a7081c66","422":"1e6cb867-b807-4f42-9bb3-b08e4264307f","429":"98a42ae3-471e-43f8-b715-795d8abe5dbd","500":"d948a515-3c55-4c89-b990-e0bf25cd9cd7"},"method":"get","type":"path","servers":["72488370-a235-46bc-b6d9-cbcd647bdafe"],"path":"/api/v2/rag/chunks","baseUrlOptions":["https://rest-api.captide.co"],"title":"Search document chunks (v2)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"486c0ba5-1fd2-49b9-9d82-a2d386a5649e":{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The natural language query","examples":["What is Zscaler's net dollar retention rate?"],"title":"Query","isRequired":true,"uniqueKey":"","typeLabel":"string"},"description":"The natural language query"},"7f3f39fd-1edb-47ce-8d48-85d05c094d06":{"name":"document_ids","in":"query","required":false,"schema":{"oneOf":[{"type":"string","title":"Document Ids","description":"Comma-separated string of document file IDs. If provided and non-empty, skips document and company selection and goes directly to retrieval.","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Document Ids","description":"Comma-separated string of document file IDs. If provided and non-empty, skips document and company selection and goes directly to retrieval.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"},"description":"Comma-separated string of document file IDs. If provided and non-empty, skips document and company selection and goes directly to retrieval."}},"responses":{"a228430a-28c0-4e6d-85b5-79d33b817a2d":{"description":"Chunks found successfully","content":{"application/json":{"schema":{"properties":{"relevantChunks":{"items":{"properties":{"content":{"type":"string","title":"Content","description":"Text content of the chunk","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].content","typeLabel":"string"},"pageNumber":{"type":"integer","title":"Pagenumber","description":"Page number in the document","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].pageNumber","typeLabel":"integer"},"documentMetadata":{"properties":{"id":{"type":"string","title":"Id","description":"Unique document ID","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.id","typeLabel":"string"},"title":{"type":"string","title":"Title","description":"Document title","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.title","typeLabel":"string"},"documentCategory":{"type":"string","title":"Documentcategory","description":"Document categories. For detailed category descriptions, please refer to [this page](/coverage)","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.documentCategory","typeLabel":"string"},"date":{"type":"string","title":"Date","description":"Date the document relates to (e.g., the press release date for a current report, or the fiscal period end date for annual and interim reports)","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.date","typeLabel":"string"},"companyName":{"type":"string","title":"Companyname","description":"Name of the company filing the document","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.companyName","typeLabel":"string"},"tickers":{"items":{"type":"string","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.tickers.items.[INDEX]","typeLabel":"string"},"type":"array","title":"Tickers","description":"Tickers of the company filing the document","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.tickers","typeLabel":"string[]"},"formType":{"oneOf":[{"type":"string","title":"Formtype","description":"Document SEC form type (only applicable if the document is an SEC filing)","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.formType.oneOf.0","typeLabel":"string"},{"type":"null","title":"Formtype","description":"Document SEC form type (only applicable if the document is an SEC filing)","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.formType.oneOf.1","typeLabel":"null"}],"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.formType","typeLabel":"string | null"},"fiscalQuarter":{"oneOf":[{"type":"integer","title":"Fiscalquarter","description":"Fiscal quarter the document relates to (from 1 to 4)","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.fiscalQuarter.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Fiscalquarter","description":"Fiscal quarter the document relates to (from 1 to 4)","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.fiscalQuarter.oneOf.1","typeLabel":"null"}],"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.fiscalQuarter","typeLabel":"integer | null"},"fiscalYear":{"oneOf":[{"type":"integer","title":"Fiscalyear","description":"Fiscal year the document relates to (e.g., 2024)","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.fiscalYear.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Fiscalyear","description":"Fiscal year the document relates to (e.g., 2024)","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.fiscalYear.oneOf.1","typeLabel":"null"}],"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.fiscalYear","typeLabel":"integer | null"},"metadata":{"oneOf":[{"type":"object","title":"Metadata","description":"Metadata for the document","additionalProperties":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.metadata.oneOf.0","typeLabel":"Metadata · object"},{"type":"null","title":"Metadata","description":"Metadata for the document","uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata.metadata","typeLabel":"Metadata · object | null"}},"type":"object","required":["id","title","documentCategory","date","companyName","tickers"],"title":"SourceDocument","description":"Metadata for the chunk's document","isRequired":true,"uniqueKey":"relevantChunks.items.[INDEX].documentMetadata","typeLabel":"SourceDocument · object"},"excerpt":{"oneOf":[{"type":"string","title":"Excerpt","description":"Specific part of the chunk that the agent used to answer the user's question. Used for source linking and highlighting.","uniqueKey":"relevantChunks.items.[INDEX].excerpt.oneOf.0","typeLabel":"string"},{"type":"null","title":"Excerpt","description":"Specific part of the chunk that the agent used to answer the user's question. Used for source linking and highlighting.","uniqueKey":"relevantChunks.items.[INDEX].excerpt.oneOf.1","typeLabel":"null"}],"uniqueKey":"relevantChunks.items.[INDEX].excerpt","typeLabel":"string | null"}},"type":"object","required":["content","pageNumber","documentMetadata"],"title":"Chunk","description":"A chunk of document content with metadata.","uniqueKey":"relevantChunks.items.[INDEX]","typeLabel":"Chunk · object"},"type":"array","title":"Relevantchunks","description":"List of relevant document chunks","isRequired":true,"uniqueKey":"relevantChunks","typeLabel":"Chunk · object[]"}},"type":"object","required":["relevantChunks"],"title":"ChunksResponse","description":"Response model for chunk search results.","uniqueKey":"","typeLabel":"ChunksResponse · object"},"example":{"relevantChunks":[{"pageNumber":2,"documentMetadata":{"id":"2dfd0c2a-fb6d-486a-ad62-3b1830eb30bf","title":"ASML 2024 Annual Report","documentCategory":"annual-financial-report","date":"2024-12-31","fiscalQuarter":4,"fiscalYear":2024,"companyName":"ASML HOLDING NV","tickers":["ASML","ASML.AS"]}}]},"examples":{"Example":{"title":"Example","value":{"relevantChunks":[{"pageNumber":2,"documentMetadata":{"id":"2dfd0c2a-fb6d-486a-ad62-3b1830eb30bf","title":"ASML 2024 Annual Report","documentCategory":"annual-financial-report","date":"2024-12-31","fiscalQuarter":4,"fiscalYear":2024,"companyName":"ASML HOLDING NV","tickers":["ASML","ASML.AS"]}}]}}},"exampleType":"examples"}},"exampleType":"examples"},"ae1d97af-01aa-4798-9085-711c1fbace4e":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response model for all API endpoints.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"159d4bde-c35c-4c16-b917-9bdd498d178c":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response model for all API endpoints.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"525f7b5b-c5f7-4960-aca6-59f6a7081c66":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response model for all API endpoints.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"1e6cb867-b807-4f42-9bb3-b08e4264307f":{"description":"Validation error","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response model for all API endpoints.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"98a42ae3-471e-43f8-b715-795d8abe5dbd":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response model for all API endpoints.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"d948a515-3c55-4c89-b990-e0bf25cd9cd7":{"description":"Internal server error","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response model for all API endpoints.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"e31f95bd-3621-4c9c-9b6a-85d925623b28":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[]}}},"servers":{"72488370-a235-46bc-b6d9-cbcd647bdafe":{"url":"https://rest-api.captide.co","description":"Prod server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[]},"schema":{"title":"X-API-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"X-API-Key"}],"title":"APIKeyHeader"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"captide","siteName":"Captide API","title":"Chunk Retrieval - Captide API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-10T10:46:04.823Z","originalFileLocation":"api-reference/endpoint/chunks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Search for relevant document chunks based on a query. Under the hood, Captide\u0026#x27;s RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query. This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents. This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Captide API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chunk Retrieval - Captide API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Search for relevant document chunks based on a query. Under the hood, Captide\u0026#x27;s RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query. This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents. This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Captide API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.captide.ai/api-reference/endpoint/chunks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://captide.mintlify.app/_mintlify/api/og/v2?division=Agentic+RAG\u0026amp;title=Chunk+Retrieval\u0026amp;description=Search+for+relevant+document+chunks+based+on+a+query.+Under+the+hood%2C+Captide%27s+RAG+system+uses+a+combination+of+LLMs+and+vector+databases+to+find+the+most+rele\u0026amp;theme=9b0f99567cd7e39d13fdfb91\u0026amp;signature=0126da7f65e3a61e51bc81113698d4edc2983a7d3f4fc1880fba26a6118f0945\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Chunk Retrieval - Captide API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Search for relevant document chunks based on a query. Under the hood, Captide\u0026#x27;s RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query. This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents. This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://captide.mintlify.app/_mintlify/api/og/v2?division=Agentic+RAG\u0026amp;title=Chunk+Retrieval\u0026amp;description=Search+for+relevant+document+chunks+based+on+a+query.+Under+the+hood%2C+Captide%27s+RAG+system+uses+a+combination+of+LLMs+and+vector+databases+to+find+the+most+rele\u0026amp;theme=9b0f99567cd7e39d13fdfb91\u0026amp;signature=0126da7f65e3a61e51bc81113698d4edc2983a7d3f4fc1880fba26a6118f0945\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/captide/-FVRvyiygpJBqmBK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Captide API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#478ef8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.captide.ai/api-reference/endpoint/chunks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/chunks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.captide.ai/#organization\",\"name\":\"Captide API\",\"url\":\"https://docs.captide.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/captide/9nTwxd7pkhCHGj3r/logo/light.svg?fit=max\u0026auto=format\u0026n=9nTwxd7pkhCHGj3r\u0026q=85\u0026s=f6615b1fe22f08cba979a10550c982df\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.captide.ai#website\",\"name\":\"Captide API\",\"url\":\"https://docs.captide.ai\",\"publisher\":{\"@id\":\"https://docs.captide.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.captide.ai/api-reference/endpoint/chunks#webpage\",\"url\":\"https://docs.captide.ai/api-reference/endpoint/chunks\",\"name\":\"Chunk Retrieval\",\"description\":\"Search for relevant document chunks based on a query. Under the hood, Captide's RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query. This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents. This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.\",\"dateModified\":\"2026-02-10T10:46:04.823Z\",\"isPartOf\":{\"@id\":\"https://docs.captide.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.captide.ai/api-reference/endpoint/chunks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.captide.ai/api-reference/endpoint/chunks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agentic RAG\",\"item\":\"https://docs.captide.ai/api-reference/endpoint/company_retrieval\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chunk Retrieval\",\"item\":\"https://docs.captide.ai/api-reference/endpoint/chunks\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.captide.ai/api-reference/endpoint/chunks#apireference\",\"headline\":\"Chunk Retrieval\",\"name\":\"Chunk Retrieval\",\"description\":\"Search for relevant document chunks based on a query. Under the hood, Captide's RAG system uses a combination of LLMs and vector databases to find the most relevant chunks of text from corporate disclosures that are most relevant to the query. This endpoint returns chunks of text from corporate disclosures that are most relevant to the query, along with metadata about their source documents. This endpoint is useful for building search interfaces or retrieving specific content from documents. This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.\",\"url\":\"https://docs.captide.ai/api-reference/endpoint/chunks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.captide.ai/api-reference/endpoint/chunks#webpage\"},\"dateModified\":\"2026-02-10T10:46:04.823Z\",\"publisher\":{\"@id\":\"https://docs.captide.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.captide.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Captide API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Captide API","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","groups":[{"group":"API documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Companies","pages":[{"title":"Find Companies","openapi":"GET /api/v2/companies/list","href":"/api-reference/endpoint/companies"},{"title":"Get Company by ID","openapi":"GET /api/v2/companies/{id}","href":"/api-reference/endpoint/get_company"},{"title":"Search Company","openapi":"GET /api/v2/companies/search","href":"/api-reference/endpoint/search_company"}]},{"group":"Documents","pages":[{"title":"Find Documents","openapi":"GET /api/v1/documents/list","href":"/api-reference/endpoint/documents"},{"title":"Get Document by ID","openapi":"GET /api/v2/documents/{id}","href":"/api-reference/endpoint/get_document"}]},{"group":"Agentic RAG","pages":[{"title":"Company Retrieval","openapi":"POST /api/v2/rag/company-retrieval","description":"Retrieves a list of companies from the Captide database based on a natural language query. \n This endpoint uses Captide's RAG system to understand company names, tickers, or informal references \n and returns matching companies with their full details.\n \n **Example queries:**\n - \"Give me Estee Lauder and Louis Vuitton\"\n - \"Show me Apple and Microsoft\"\n - \"Find companies with tickers AAPL and MSFT\"\n \n This v2 endpoint is functionally identical to v1. It is provided for API version consistency.","href":"/api-reference/endpoint/company_retrieval"},{"title":"Chunk Retrieval","openapi":"GET /api/v2/rag/chunks","href":"/api-reference/endpoint/chunks"},{"title":"Agent Response","openapi":"POST /api/v2/rag/agent-response","description":"Returns cited Markdown responses, sourced exclusively from corporate disclosures, in response to natural language queries.\n This endpoint provides AI-generated answers with proper citations to source documents, making it ideal for building Q\u0026A interfaces or research tools.\n \n **Response Behavior:**\n - When relevant documents are found: Returns an AI-generated response with citations in the `sourceMap` field\n - When no relevant documents are found: Returns an informative message explaining why no documents were found, with an empty `sourceMap` field (HTTP 200 status)\n \n This v2 endpoint supports newer document categories in source mappings (e.g., earnings-presentation, investor-event-presentation, shareholder-meeting-circular, etc.). Agent response quality is exactly the same compared to v1.","href":"/api-reference/endpoint/agent"},{"title":"Agent Response (Stream)","openapi":"POST /api/v2/rag/agent-response-stream","href":"/api-reference/endpoint/agent_stream"}]}]}]},"title":"Chunk Retrieval - Captide API","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","Page-kQh739Uz.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}