If the stream parameter is set to true, the result will be streamed back to the client as a series of SSE events.
Otherwise, the result will be returned as a QueryResult object.
If true, an english summary of the result in context of the original query will be returned.
Applies only when calling the query API and only available when stream=True
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Aryn Documentation","description":"Aryn is an agentic unstructured data warehouse that enables deep analyitcs and seach on documents at scale.","colors":{"primary":"#417586","light":"#417586","dark":"#417586"},"logo":{"light":"https://mintcdn.com/aryn/NmC_FCDeIgvkLjlo/logo/aryn_logo_full.png?fit=max\u0026auto=format\u0026n=NmC_FCDeIgvkLjlo\u0026q=85\u0026s=a98c5e045ec1cf0148d9df24e5e6b97a","dark":"https://mintcdn.com/aryn/NmC_FCDeIgvkLjlo/logo/aryn_logo_full.png?fit=max\u0026auto=format\u0026n=NmC_FCDeIgvkLjlo\u0026q=85\u0026s=a98c5e045ec1cf0148d9df24e5e6b97a"},"favicon":"aryn_logo.png","background":{"decoration":"windows"},"navbar":{"links":[{"href":"mailto:info@aryn.ai","label":"Get Support"},{"href":"https://aryn.instatus.com/","label":"Status Page"}],"primary":{"type":"button","label":"Website","href":"https://www.aryn.ai/"}},"footer":{"socials":{"x":"https://x.com/ArynInc","github":"https://github.com/aryn-ai","linkedin":"https://www.linkedin.com/company/aryn-ai"}},"seo":{"indexing":"all"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Aryn Blog","icon":"newspaper","href":"https://www.aryn.ai/blog"},{"anchor":"Slack Community","icon":"slack","href":"https://join.slack.com/t/aryn-community/shared_invite/zt-36vhennsx-mN3UsqD6PT2vxVZxpqdHsw"},{"anchor":"Sycamore - Document ETL","icon":"bars-staggered","href":"https://github.com/aryn-ai/sycamore"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aryn","hasAudioNarration":false,"actualSubdomain":"aryn","customDomains":["docs.aryn.ai"],"gitSource":{"type":"github","owner":"aryn-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21f617a51a213e6e8ae6a0","collectionId":"ec9289d9-c22b-4193-b659-b8e5c72c5200","schemaVersion":"v2"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae9227764072a14c6718870:success","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"DocParse","count":41},{"language":"default","tag":"Aryn Platform","count":32},{"language":"default","tag":"API Reference","count":29},{"language":"default","tag":"Deep Analytics (Preview)","count":12},{"language":"default","tag":"Tutorials","count":10},{"language":"default","tag":"Document","count":10},{"language":"default","tag":"DocSet","count":7},{"language":"default","tag":"Partition","count":5},{"language":"default","tag":"Querying Data","count":4},{"language":"default","tag":"Query","count":4}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@aryn.ai"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/query/run-query","slug":"/api-reference/query/run-query","pageMetadata":{"title":"Run Query","description":"Run the given query.\n\nIf the `stream` parameter is set to true, the result will be streamed back to the client as a series of SSE events.\nOtherwise, the result will be returned as a QueryResult object.","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/query","href":"/api-reference/query/run-query","autogeneratedByOpenApi":true,"hidden":false},"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 code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Run the given query.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If the \", _jsx(_components.code, {\n children: \"stream\"\n }), \" parameter is set to true, the result will be streamed back to the client as a series of SSE events.\\nOtherwise, the result will be returned as a QueryResult object.\"]\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":"Run Query","description":"Run the given query.\n\nIf the `stream` parameter is set to true, the result will be streamed back to the client as a series of SSE events.\nOtherwise, the result will be returned as a QueryResult object.","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/query","href":"/api-reference/query/run-query","autogeneratedByOpenApi":true,"hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Query"],"summary":"Run Query","description":"Run the given query.\n\nIf the `stream` parameter is set to true, the result will be streamed back to the client as a series of SSE events.\nOtherwise, the result will be returned as a QueryResult object.","operationId":"run_query_v1_query_post","requestBody":"f924e03f-1e8d-41e5-8b25-8cce08e80c27","responses":{"200":"b85fb056-48f6-4c7b-9e0a-b7fd650b0149","404":"1ba75360-8a7f-4b73-9209-3c380d124c90","422":"dd07c89f-442f-43c4-abde-d4f399ad24f1"},"security":["c0a21898-5827-450d-a6d2-43b1d5150325"],"method":"post","type":"path","servers":["8f578b92-3513-451f-b34a-fce1ad6f83c3","8f62d6ca-6607-41db-84eb-8ccfc3ac24ec","bf169c67-b51a-48cb-b7ce-eb33167cd490","5f7a6f84-8d3c-4d22-b2cd-dab551ecd408"],"path":"/v1/query","baseUrlOptions":["https://api.aryn.cloud","https://api.aryn.ai","https://api.us.aryn.cloud","https://api.us.aryn.ai"],"title":"Run Query","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"docset_id":{"oneOf":[{"type":"string","title":"Docset Id","description":"The docset against which to run the query","uniqueKey":"docset_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Docset Id","description":"The docset against which to run the query","uniqueKey":"docset_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"docset_id","typeLabel":"string | null"},"query":{"oneOf":[{"type":"string","title":"Query","description":"The natural language query to run. if specified, `plan` must not be set.","uniqueKey":"query.oneOf.0","typeLabel":"string"},{"type":"null","title":"Query","description":"The natural language query to run. if specified, `plan` must not be set.","uniqueKey":"query.oneOf.1","typeLabel":"null"}],"uniqueKey":"query","typeLabel":"string | null"},"plan":{"oneOf":[{"type":"object","title":"LogicalPlan","description":"The logical query plan to run. If specified, `query` must not be set.","required":["query","nodes","result_node"],"properties":{"query":{"type":"string","title":"Query","description":"The query that the plan is for.","isRequired":true,"uniqueKey":"plan.oneOf.0.query","typeLabel":"string"},"nodes":{"additionalProperties":{"properties":{"node_id":{"type":"integer","title":"Node Id","description":"A unique integer ID representing this node.","isRequired":true,"uniqueKey":"plan.oneOf.0.nodes.additionalProperties.node_id","typeLabel":"integer"},"node_type":{"oneOf":[{"type":"string","title":"Node Type","description":"The type of this node.","uniqueKey":"plan.oneOf.0.nodes.additionalProperties.node_type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Node Type","description":"The type of this node.","uniqueKey":"plan.oneOf.0.nodes.additionalProperties.node_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.oneOf.0.nodes.additionalProperties.node_type","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","title":"Description","description":"A detailed description of why this operator was chosen for this query plan.","uniqueKey":"plan.oneOf.0.nodes.additionalProperties.description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Description","description":"A detailed description of why this operator was chosen for this query plan.","uniqueKey":"plan.oneOf.0.nodes.additionalProperties.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.oneOf.0.nodes.additionalProperties.description","typeLabel":"string | null"},"inputs":{"items":{"type":"integer","uniqueKey":"plan.oneOf.0.nodes.additionalProperties.inputs.items.[INDEX]","typeLabel":"integer"},"type":"array","title":"Inputs","description":"A list of node IDs that this operation depends on.","default":[],"uniqueKey":"plan.oneOf.0.nodes.additionalProperties.inputs","typeLabel":"integer[]"}},"additionalProperties":true,"type":"object","required":["node_id"],"title":"Node","description":"A single operation in a logical plan.","uniqueKey":"plan.oneOf.0.nodes.additionalProperties","typeLabel":"Node · object"},"type":"object","title":"Nodes","description":"A mapping of node IDs to nodes in the query plan.","isRequired":true,"uniqueKey":"plan.oneOf.0.nodes","typeLabel":"Nodes · object"},"result_node":{"type":"integer","title":"Result Node","description":"The ID of the node that is the result of the query.","isRequired":true,"uniqueKey":"plan.oneOf.0.result_node","typeLabel":"integer"},"llm_prompt":{"oneOf":[{"title":"Llm Prompt","description":"The LLM prompt that was used to generate this query plan.","uniqueKey":"plan.oneOf.0.llm_prompt.oneOf.0","typeLabel":"any"},{"type":"null","title":"Llm Prompt","description":"The LLM prompt that was used to generate this query plan.","uniqueKey":"plan.oneOf.0.llm_prompt.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.oneOf.0.llm_prompt","typeLabel":"any | null"},"llm_plan":{"oneOf":[{"type":"string","title":"Llm Plan","description":"The result generated by the LLM.","uniqueKey":"plan.oneOf.0.llm_plan.oneOf.0","typeLabel":"string"},{"type":"null","title":"Llm Plan","description":"The result generated by the LLM.","uniqueKey":"plan.oneOf.0.llm_plan.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan.oneOf.0.llm_plan","typeLabel":"string | null"}},"uniqueKey":"plan.oneOf.0","typeLabel":"LogicalPlan · object"},{"type":"null","description":"The logical query plan to run. If specified, `query` must not be set.","uniqueKey":"plan.oneOf.1","typeLabel":"null"}],"uniqueKey":"plan","typeLabel":"LogicalPlan · object | null"},"stream":{"type":"boolean","title":"Stream","description":"If true, query results will be streamed back to the client as they are generated. Applies only when calling the query api.","default":false,"uniqueKey":"stream","typeLabel":"boolean"},"summarize_result":{"type":"boolean","title":"Summarize Result","description":"If true, an english summary of the result in context of the original query will be returned.\nApplies only when calling the query API and only available when `stream=True`","default":false,"uniqueKey":"summarize_result","typeLabel":"boolean"},"rag_mode":{"type":"boolean","title":"Rag Mode","description":"If true, the query will only run a RAG query plan.","default":false,"uniqueKey":"rag_mode","typeLabel":"boolean"}},"type":"object","title":"Query","description":"A query against a DocSet. Contains either a natural language string or a query plan.","uniqueKey":"","typeLabel":"Query · object"},"examples":{"Example":{"title":"Example","value":{"docset_id":"\u003cstring>","query":"\u003cstring>","plan":{"query":"\u003cstring>","nodes":{},"result_node":123,"llm_prompt":"\u003cunknown>","llm_plan":"\u003cstring>"},"stream":false,"summarize_result":false,"rag_mode":false}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"b85fb056-48f6-4c7b-9e0a-b7fd650b0149":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"exampleType":"generated"},"1ba75360-8a7f-4b73-9209-3c380d124c90":{"description":"Not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"dd07c89f-442f-43c4-abde-d4f399ad24f1":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"c0a21898-5827-450d-a6d2-43b1d5150325":{"HTTPBearer":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"8f578b92-3513-451f-b34a-fce1ad6f83c3":{"url":"https://api.aryn.cloud","description":"US Region"},"8f62d6ca-6607-41db-84eb-8ccfc3ac24ec":{"url":"https://api.aryn.ai","description":"US Region"},"bf169c67-b51a-48cb-b7ce-eb33167cd490":{"url":"https://api.us.aryn.cloud","description":"US Region"},"5f7a6f84-8d3c-4d22-b2cd-dab551ecd408":{"url":"https://api.us.aryn.ai","description":"US Region"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"api-reference/endpoint/platform/openapi.json"},"subdomain":"aryn","siteName":"Aryn Documentation","title":"Run Query - Aryn Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-12-10T22:09:50.288Z","originalFileLocation":"api-reference/query/run-query.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=\"Run the given query. If the stream parameter is set to true, the result will be streamed back to the client as a series of SSE events. Otherwise, the result will be returned as a QueryResult object.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Aryn Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_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/aryn/w2LZ1a3vrOj9YzXF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run Query - Aryn Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run the given query. If the stream parameter is set to true, the result will be streamed back to the client as a series of SSE events. Otherwise, the result will be returned as a QueryResult object.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Aryn Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.aryn.ai/api-reference/query/run-query\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aryn.mintlify.site/_mintlify/api/og/v2?division=Query\u0026amp;title=Run+Query\u0026amp;description=Run+the+given+query.%0A%0AIf+the+%60stream%60+parameter+is+set+to+true%2C+the+result+will+be+streamed+back+to+the+client+as+a+series+of+SSE+events.%0AOtherwise%2C+the+result+\u0026amp;theme=be158e76b417b7e99b2d8f02\u0026amp;signature=87aefe3a49a8c92e094046f8c87965df33ac9d9ed2cd910b8d4f63e1270d0f6d\">\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=\"Run Query - Aryn Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run the given query. If the stream parameter is set to true, the result will be streamed back to the client as a series of SSE events. Otherwise, the result will be returned as a QueryResult object.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aryn.mintlify.site/_mintlify/api/og/v2?division=Query\u0026amp;title=Run+Query\u0026amp;description=Run+the+given+query.%0A%0AIf+the+%60stream%60+parameter+is+set+to+true%2C+the+result+will+be+streamed+back+to+the+client+as+a+series+of+SSE+events.%0AOtherwise%2C+the+result+\u0026amp;theme=be158e76b417b7e99b2d8f02\u0026amp;signature=87aefe3a49a8c92e094046f8c87965df33ac9d9ed2cd910b8d4f63e1270d0f6d\">\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/aryn/w2LZ1a3vrOj9YzXF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Aryn Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#417586\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.aryn.ai/api-reference/query/run-query\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/query/run-query.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.aryn.ai/#organization\",\"name\":\"Aryn Documentation\",\"url\":\"https://docs.aryn.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/aryn/NmC_FCDeIgvkLjlo/logo/aryn_logo_full.png?fit=max\u0026auto=format\u0026n=NmC_FCDeIgvkLjlo\u0026q=85\u0026s=a98c5e045ec1cf0148d9df24e5e6b97a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.aryn.ai#website\",\"name\":\"Aryn Documentation\",\"url\":\"https://docs.aryn.ai\",\"publisher\":{\"@id\":\"https://docs.aryn.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.aryn.ai/api-reference/query/run-query#webpage\",\"url\":\"https://docs.aryn.ai/api-reference/query/run-query\",\"name\":\"Run Query\",\"description\":\"Run the given query. If the stream parameter is set to true, the result will be streamed back to the client as a series of SSE events. Otherwise, the result will be returned as a QueryResult object.\",\"dateModified\":\"2025-12-10T22:09:50.288Z\",\"isPartOf\":{\"@id\":\"https://docs.aryn.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.aryn.ai/api-reference/query/run-query#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.aryn.ai/api-reference/query/run-query#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Aryn Platform\",\"item\":\"https://docs.aryn.ai/api-reference/document/list-docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Query\",\"item\":\"https://docs.aryn.ai/api-reference/query/generate-plan\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Run Query\",\"item\":\"https://docs.aryn.ai/api-reference/query/run-query\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.aryn.ai/api-reference/query/run-query#apireference\",\"headline\":\"Run Query\",\"name\":\"Run Query\",\"description\":\"Run the given query. If the stream parameter is set to true, the result will be streamed back to the client as a series of SSE events. Otherwise, the result will be returned as a QueryResult object.\",\"url\":\"https://docs.aryn.ai/api-reference/query/run-query\",\"mainEntityOfPage\":{\"@id\":\"https://docs.aryn.ai/api-reference/query/run-query#webpage\"},\"dateModified\":\"2025-12-10T22:09:50.288Z\",\"publisher\":{\"@id\":\"https://docs.aryn.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.aryn.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Aryn Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Aryn Documentation","nav":{"global":{"anchors":[{"anchor":"Aryn Blog","icon":"newspaper","href":"https://www.aryn.ai/blog"},{"anchor":"Slack Community","icon":"slack","href":"https://join.slack.com/t/aryn-community/shared_invite/zt-36vhennsx-mN3UsqD6PT2vxVZxpqdHsw"},{"anchor":"Sycamore - Document ETL","icon":"bars-staggered","href":"https://github.com/aryn-ai/sycamore"}]},"tabs":[{"tab":"DocParse","pages":[{"title":"DocParse","href":"/docparse/introduction"}]},{"tab":"Deep Analytics (Preview)","pages":[{"title":"Deep Analytics (Preview)","href":"/introduction"}]},{"tab":"SDK Reference","pages":[{"title":"SDK Reference","href":"/sdk-reference/partition"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"DocParse","pages":[{"group":"Partition","pages":[{"title":"Partition Document","deprecated":null,"version":null,"openapi":"api-reference/endpoint/docparse/openapi.json post /v1/document/partition","href":"/api-reference/partition/partition-document"},{"title":"Submit Document for Async Partitioning","deprecated":null,"version":null,"openapi":"api-reference/endpoint/docparse/openapi.json post /v1/async/submit/document/partition","href":"/api-reference/partition/submit-document-for-async-partitioning"},{"title":"Get Async Task Status","deprecated":null,"version":null,"openapi":"api-reference/endpoint/docparse/openapi.json get /v1/async/result/{task_id}","href":"/api-reference/partition/get-async-task-status"},{"title":"Cancel Async Task","deprecated":null,"version":null,"openapi":"api-reference/endpoint/docparse/openapi.json post /v1/async/cancel/{task_id}","href":"/api-reference/partition/cancel-async-task"},{"title":"List Async Tasks","deprecated":null,"version":null,"openapi":"api-reference/endpoint/docparse/openapi.json get /v1/async/list","href":"/api-reference/partition/list-async-tasks"}]}]},{"group":"Aryn Platform","pages":[{"group":"Document","pages":[{"title":"List Docs","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/storage/docsets/{docset_id}/docs","href":"/api-reference/document/list-docs"},{"title":"Add Doc","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/storage/docsets/{docset_id}/docs","href":"/api-reference/document/add-doc"},{"title":"Submit Document for Async Add Doc","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/async/submit/storage/docsets/{docset_id}/docs","href":"/api-reference/document/submit-document-for-async-add-doc"},{"title":"Get Async Task Status","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/async/result/{task_id}","href":"/api-reference/document/get-async-task-status"},{"title":"Cancel Async Task for Add Doc","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/async/cancel/{task_id}","href":"/api-reference/document/cancel-async-task-for-add-doc"},{"title":"List Async Tasks for Add Doc","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/async/list","href":"/api-reference/document/list-async-tasks-for-add-doc"},{"title":"Get Doc","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/storage/docsets/{docset_id}/docs/{doc_id}","href":"/api-reference/document/get-doc"},{"title":"Delete Doc","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json delete /v1/storage/docsets/{docset_id}/docs/{doc_id}","href":"/api-reference/document/delete-doc"},{"title":"Update Doc Properties","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json patch /v1/storage/docsets/{docset_id}/docs/{doc_id}/properties","href":"/api-reference/document/update-doc-properties"},{"title":"Get Doc Binary","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/storage/docsets/{docset_id}/docs/{doc_id}/binary","href":"/api-reference/document/get-doc-binary"}]},{"group":"DocSet","pages":[{"title":"List Docsets","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/storage/docsets","href":"/api-reference/docset/list-docsets"},{"title":"Create Docset","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/storage/docsets","href":"/api-reference/docset/create-docset"},{"title":"Get Docset","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json get /v1/storage/docsets/{docset_id}","href":"/api-reference/docset/get-docset"},{"title":"Delete Docset","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json delete /v1/storage/docsets/{docset_id}","href":"/api-reference/docset/delete-docset"},{"title":"Update Docset","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json patch /v1/storage/docsets/{docset_id}","href":"/api-reference/docset/update-docset"},{"title":"Clone Docset","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/storage/docsets/{docset_id}/clone","href":"/api-reference/docset/clone-docset"},{"title":"Set Readonly Docset","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/storage/docsets/{docset_id}/readonly/{value}","href":"/api-reference/docset/set-readonly-docset"}]},{"group":"Query","pages":[{"title":"Generate Plan","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/query/plan","href":"/api-reference/query/generate-plan"},{"title":"Edit Plan","description":"Take an existing plan and user feedback to rewrite it.","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json patch /v1/query/plan","href":"/api-reference/query/edit-plan"},{"title":"Run Query","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/query","href":"/api-reference/query/run-query"},{"title":"Search","description":"Run a search query.","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/query/search/{docset_id}","href":"/api-reference/query/search"}]},{"group":"Transform","pages":[{"title":"Extract Properties","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/jobs/extract-properties","href":"/api-reference/transform/extract-properties"},{"title":"Delete Properties","deprecated":null,"version":null,"openapi":"api-reference/endpoint/platform/openapi.json post /v1/jobs/delete-properties","href":"/api-reference/transform/delete-properties"}]}]}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/example-code/introduction"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/release_notes"}]},{"tab":"Model Context Protocol (MCP) Server","pages":[{"title":"Model Context Protocol (MCP) Server","href":"/mcp-server/aryn_mcp"}]}]},"basePath":"","title":"Run Query - Aryn Documentation","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}