Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria.
Authentication behavior:
Personal Access Token (PAT) keys: Requests are attributed to the key’s user
Team-wide API keys: Requests are attributed to the team
Natural-language description of the pull requests to retrieve. Criteria
such as status, labels, or time range are expressed in the query text,
including references to people and their role (for example, authored by
or reviewed by). Repository scoping is provided separately via the
projects field.
Repository or project names that scope the query (for example, GitHub
repository names). Each value is resolved against all connected providers
and applied as a filter. When omitted or empty, all accessible
repositories are searched.
Name, display name, or username of a person referenced by the query. The
value is resolved to a known identity before the query runs; the literal
value me resolves to the user associated with the API key.
The issues or pull requests matching the query criteria.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Unblocked","colors":{"primary":"#3E2DDA","light":"#8A7EF9","dark":"#3E2DDA"},"logo":{"light":"https://mintcdn.com/unblocked/SNr4qjffJioxNaz0/img/Unblocked-logo-with-text-coloured.svg?fit=max\u0026auto=format\u0026n=SNr4qjffJioxNaz0\u0026q=85\u0026s=401dce22d95765942f25732336b5f46a","dark":"https://mintcdn.com/unblocked/SNr4qjffJioxNaz0/img/Unblocked-logo-with-text-transparent.svg?fit=max\u0026auto=format\u0026n=SNr4qjffJioxNaz0\u0026q=85\u0026s=79d1d5e9b85c1009d43c69131b3c9092","href":"https://www.getunblocked.com"},"favicon":"https://mintcdn.com/unblocked/Ot7bkvJ2zHKpe7gi/favicon.png?fit=max\u0026auto=format\u0026n=Ot7bkvJ2zHKpe7gi\u0026q=85\u0026s=4a0d15374f5a771bce02c878fb07c134","navbar":{"primary":{"type":"button","label":"Book a Demo","href":"https://getunblocked.com/demo/"}},"seo":{"indexing":"all"},"integrations":{"gtm":{"tagId":"GTM-KRHSC7M9"},"intercom":{"appId":"crhakcyc"}},"contextual":{"options":["copy","download-spec","claude","chatgpt",{"title":"Try Unblocked MCP","description":"Give rich context to your agentic apps with Unblocked MCP","icon":"robot","href":"https://getunblocked.com/unblocked-mcp/?ref=docs"}],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"unblocked","hasAudioNarration":false,"actualSubdomain":"unblocked","customDomains":["docs.getunblocked.com"],"gitSource":{"type":"github","owner":"unblocked","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae37c1703c5d60042d9deab","collectionId":"417b856b-48d4-4f73-96e2-78554080d594","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae37c1703c5d60042d9deab"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae37c1703c5d60042d9deab","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Documentation","count":112},{"language":"default","tag":"Product Guides","count":41},{"language":"default","tag":"Unblocked API","count":40},{"language":"default","tag":"Data Sources","count":37},{"language":"default","tag":"Unblocked MCP","count":16},{"language":"default","tag":"Team Settings","count":14},{"language":"default","tag":"SCIM","count":12},{"language":"default","tag":"Unblocked Chat","count":11},{"language":"default","tag":"Install","count":10},{"language":"default","tag":"Context","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".twoMinVideo{aspect-ratio:560/315;width:100%;border-radius:10px}div.img-outline{padding:1% 5.5%}.img-radius{border-radius:8px}.card-group>.card,a[class~=text-primary]{--nav-icon-color:rgb(var(--primary))}.dark .card-group>.card,.dark a[class~=text-primary]{--nav-icon-color:rgb(var(--primary-light))}.dark img[src*=\".svg\"].bg-transparent{background-color:var(--nav-icon-color, rgb(var(--gray-500)))}img[src*=\".svg\"].bg-transparent{object-fit:none;object-position:9999px 9999px;background-color:var(--nav-icon-color, rgb(var(--gray-400)));-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;-webkit-mask-size:100%;mask-repeat:no-repeat;mask-position:center;mask-size:100%}img[src*=\"datadog.svg\"]{-webkit-mask-image:url(/img/datadog.svg);mask-image:url(/img/datadog.svg)}img[src*=\"sentry.svg\"]{-webkit-mask-image:url(/img/sentry.svg);mask-image:url(/img/sentry.svg)}img[src*=\"circleci.svg\"]{-webkit-mask-image:url(/img/circleci.svg);mask-image:url(/img/circleci.svg)}img[src*=\"coda.svg\"]{-webkit-mask-image:url(/img/coda.svg);mask-image:url(/img/coda.svg)}img[src*=\"buildkite.svg\"]{-webkit-mask-image:url(/img/buildkite.svg);mask-image:url(/img/buildkite.svg)}img[src*=\"asana.svg\"]{-webkit-mask-image:url(/img/asana.svg);mask-image:url(/img/asana.svg)}img[src*=\"ado.svg\"]{-webkit-mask-image:url(/img/ado.svg);mask-image:url(/img/ado.svg)}img[src*=\"notion.svg\"]{-webkit-mask-image:url(/img/notion.svg);mask-image:url(/img/notion.svg)}img[src*=\"posthog.svg\"]{-webkit-mask-image:url(/img/posthog.svg);mask-image:url(/img/posthog.svg)}img[src*=\"linear.svg\"]{-webkit-mask-image:url(/img/linear.svg);mask-image:url(/img/linear.svg)}img[src*=\"databricks.svg\"]{-webkit-mask-image:url(/img/databricks.svg);mask-image:url(/img/databricks.svg)}img[src*=\"snowflake.svg\"]{-webkit-mask-image:url(/img/snowflake.svg);mask-image:url(/img/snowflake.svg)}img[src*=\"zendesk.svg\"]{-webkit-mask-image:url(/img/zendesk.svg);mask-image:url(/img/zendesk.svg)}img[src*=\"mcp.svg\"]{-webkit-mask-image:url(/img/mcp.svg);mask-image:url(/img/mcp.svg)}img[src*=\"claude.svg\"]{-webkit-mask-image:url(/img/claude.svg);mask-image:url(/img/claude.svg)}img[src*=\"openai.svg\"]{-webkit-mask-image:url(/img/openai.svg);mask-image:url(/img/openai.svg)}img[src*=\"cursor.svg\"]{-webkit-mask-image:url(/img/cursor.svg);mask-image:url(/img/cursor.svg)}img[src*=\"vscode.svg\"]{-webkit-mask-image:url(/img/vscode.svg);mask-image:url(/img/vscode.svg)}img[src*=\"windsurf.svg\"]{-webkit-mask-image:url(/img/windsurf.svg);mask-image:url(/img/windsurf.svg)}img[src*=\"jetbrains.svg\"]{-webkit-mask-image:url(/img/jetbrains.svg);mask-image:url(/img/jetbrains.svg)}img[src*=\"opencode.svg\"]{-webkit-mask-image:url(/img/opencode.svg);mask-image:url(/img/opencode.svg)}"}],"page":{"pagePath":"api-reference/context/query-pull-requests","slug":"/api-reference/context/query-pull-requests","pageMetadata":{"title":"Query Pull Requests","description":"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria.\n\n**Authentication behavior:**\n- **Personal Access Token (PAT) keys**: Requests are attributed to the key's user\n- **Team-wide API keys**: Requests are attributed to the team\n","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/query/prs","href":"/api-reference/context/query-pull-requests","autogeneratedByOpenApi":true},"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 li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria.\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Authentication behavior:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Personal Access Token (PAT) keys\"\n }), \": Requests are attributed to the key’s user\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Team-wide API keys\"\n }), \": Requests are attributed to the team\"]\n }), \"\\n\"]\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":"Query Pull Requests","description":"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria.\n\n**Authentication behavior:**\n- **Personal Access Token (PAT) keys**: Requests are attributed to the key's user\n- **Team-wide API keys**: Requests are attributed to the team\n","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/query/prs","href":"/api-reference/context/query-pull-requests","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/unblocked/ac3292a4816f3c55/script.js","/_mintlify/custom/unblocked/67c80997e68b13b2/cometly.js"],"openApiReferenceData":{"operation":{"description":"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria.\n\n**Authentication behavior:**\n- **Personal Access Token (PAT) keys**: Requests are attributed to the key's user\n- **Team-wide API keys**: Requests are attributed to the team\n","operationId":"contextQueryPrs","requestBody":"3a7b45e0-103d-4963-a785-fce016a428fa","responses":{"200":"41e91490-472c-4753-9d44-f160391e9399","400":"c1988eb4-a05c-4470-a5ce-66b901cecec5","401":"1845d6c6-499b-4cda-8330-4f69cccdcf1c","403":"109ade5d-693d-43f3-ab27-c1af701aeac0","500":"4a259de6-af09-4ffd-ba03-476cdc47bd26"},"summary":"Query Pull Requests","tags":["Context"],"x-api-key-audiences":["PublicApi","PAT"],"method":"post","type":"path","servers":["07e31a89-0f0e-4474-99ef-c2f92c7d4617"],"security":["5d625cb0-1901-484f-af9b-5b7ff5427730"],"path":"/context/query/prs","baseUrlOptions":["https://getunblocked.com/api/v1"],"title":"Query Pull Requests","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"query":{"description":"Natural-language description of the pull requests to retrieve. Criteria\nsuch as status, labels, or time range are expressed in the query text,\nincluding references to people and their role (for example, authored by\nor reviewed by). Repository scoping is provided separately via the\n`projects` field.\n","minLength":1,"type":"string","isRequired":true,"uniqueKey":"query","typeLabel":"string"},"projects":{"description":"Repository or project names that scope the query (for example, GitHub\nrepository names). Each value is resolved against all connected providers\nand applied as a filter. When omitted or empty, all accessible\nrepositories are searched.\n","items":{"type":"string","uniqueKey":"projects.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"projects","typeLabel":"string[]"},"userName":{"description":"Name, display name, or username of a person referenced by the query. The\nvalue is resolved to a known identity before the query runs; the literal\nvalue `me` resolves to the user associated with the API key.\n","type":"string","uniqueKey":"userName","typeLabel":"string"}},"required":["query"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"query":"\u003cstring>","projects":["\u003cstring>"],"userName":"\u003cstring>"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"41e91490-472c-4753-9d44-f160391e9399":{"content":{"application/json":{"schema":{"properties":{"sources":{"description":"The issues or pull requests matching the query criteria.","items":{"description":"A piece of content retrieved from a data source connected to Unblocked.","properties":{"content":{"description":"The text content of the source, in Markdown format.","type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].content","typeLabel":"string"},"title":{"description":"Human-readable title of the source.","type":"string","uniqueKey":"sources.items.[INDEX].title","typeLabel":"string"},"url":{"description":"Link to the source in its originating system.","format":"uri","type":"string","uniqueKey":"sources.items.[INDEX].url","typeLabel":"string\u003curi>"},"sourceType":{"description":"The category of content a context source belongs to. Known values are\n`code`, `pull_request`, `issue`, `message`, and `documentation`. Additional\nsource types may be introduced over time; clients should tolerate\nunrecognized values.\n","type":"string","uniqueKey":"sources.items.[INDEX].sourceType","typeLabel":"string"},"provider":{"description":"Identifier of the provider the source originates from. Values are\ncamelCase identifiers rather than display names (for example, `github`,\n`jira`, `azureDevOps`).\n","example":"github","type":"string","uniqueKey":"sources.items.[INDEX].provider","typeLabel":"string"}},"required":["content"],"type":"object","uniqueKey":"sources.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"sources","typeLabel":"object[]"}},"required":["sources"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"sources":[{"content":"\u003cstring>","title":"\u003cstring>","url":"\u003cstring>","sourceType":"\u003cstring>","provider":"github"}]}}},"exampleType":"generated"}},"description":"OK","exampleType":"generated"},"c1988eb4-a05c-4470-a5ce-66b901cecec5":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"The HTTP status code","example":400,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"}},"required":["status"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":400}}},"exampleType":"generated"}},"description":"Bad Request - Invalid or missing required fields","exampleType":"generated"},"1845d6c6-499b-4cda-8330-4f69cccdcf1c":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"The HTTP status code","example":400,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"}},"required":["status"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":400}}},"exampleType":"generated"}},"description":"Unauthorized - Invalid or missing API token","exampleType":"generated"},"109ade5d-693d-43f3-ab27-c1af701aeac0":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"The HTTP status code","example":400,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"}},"required":["status"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":400}}},"exampleType":"generated"}},"description":"Forbidden - Context API is not available on the team's current plan","exampleType":"generated"},"4a259de6-af09-4ffd-ba03-476cdc47bd26":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"The HTTP status code","example":400,"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"}},"required":["status"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":400}}},"exampleType":"generated"}},"description":"Internal Server Error","exampleType":"generated"}},"security":{"5d625cb0-1901-484f-af9b-5b7ff5427730":{"ApiKeyBearerAuth":{"bearerFormat":"Unblocked API Key","description":"The API key to authenticate requests. Obtainable from the web dashboard.","scheme":"bearer","type":"http","scopes":[],"schemeName":"ApiKeyBearerAuth"}}},"servers":{"07e31a89-0f0e-4474-99ef-c2f92c7d4617":{"url":"https://getunblocked.com/api/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"Unblocked API Key","description":"The API key to authenticate requests. Obtainable from the web dashboard.","scheme":"bearer","type":"http","scopes":[],"schemeName":"ApiKeyBearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"The API key to authenticate requests. Obtainable from the web dashboard.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyBearerAuth","name":"Authorization"}],"title":"ApiKeyBearerAuth"}]},"originalFileLocation":"https://getunblocked.com/api/v1/public-api.json"},"subdomain":"unblocked","siteName":"Unblocked","title":"Query Pull Requests - Unblocked","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T16:58:09.940Z","originalFileLocation":"api-reference/context/query-pull-requests.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=\"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria. Authentication behavior: - Personal Access Token (PAT) keys: Requests are attributed to the key\u0026#x27;s user - Team-wide API keys: Requests are attributed to the team\">\u003cmeta data-mint-head name=\"application-name\" content=\"Unblocked\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_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/unblocked/Df0LWHCcm9NXeCDY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Query Pull Requests - Unblocked\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria. Authentication behavior: - Personal Access Token (PAT) keys: Requests are attributed to the key\u0026#x27;s user - Team-wide API keys: Requests are attributed to the team\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Unblocked\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getunblocked.com/api-reference/context/query-pull-requests\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://unblocked.mintlify.app/_mintlify/api/og/v2?division=Context\u0026amp;title=Query+Pull+Requests\u0026amp;description=Retrieve+pull+requests+matching+a+natural-language+query+with+optional+repository+and+person+filters.+Unlike+search%2C+which+ranks+results+by+semantic+relevance%2C+\u0026amp;theme=c680f7db3819a4e838599c2e\u0026amp;signature=9c65e87626a8b2f1a85a2f93e2920b0c96a60c4f36958653de0bdb5f78fc3714\">\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=\"Query Pull Requests - Unblocked\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria. Authentication behavior: - Personal Access Token (PAT) keys: Requests are attributed to the key\u0026#x27;s user - Team-wide API keys: Requests are attributed to the team\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://unblocked.mintlify.app/_mintlify/api/og/v2?division=Context\u0026amp;title=Query+Pull+Requests\u0026amp;description=Retrieve+pull+requests+matching+a+natural-language+query+with+optional+repository+and+person+filters.+Unlike+search%2C+which+ranks+results+by+semantic+relevance%2C+\u0026amp;theme=c680f7db3819a4e838599c2e\u0026amp;signature=9c65e87626a8b2f1a85a2f93e2920b0c96a60c4f36958653de0bdb5f78fc3714\">\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/unblocked/Df0LWHCcm9NXeCDY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Unblocked\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3E2DDA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getunblocked.com/api-reference/context/query-pull-requests\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/context/query-pull-requests.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getunblocked.com/#organization\",\"name\":\"Unblocked\",\"url\":\"https://docs.getunblocked.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/unblocked/SNr4qjffJioxNaz0/img/Unblocked-logo-with-text-coloured.svg?fit=max\u0026auto=format\u0026n=SNr4qjffJioxNaz0\u0026q=85\u0026s=401dce22d95765942f25732336b5f46a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getunblocked.com#website\",\"name\":\"Unblocked\",\"url\":\"https://docs.getunblocked.com\",\"publisher\":{\"@id\":\"https://docs.getunblocked.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests#webpage\",\"url\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests\",\"name\":\"Query Pull Requests\",\"description\":\"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria. Authentication behavior: - Personal Access Token (PAT) keys: Requests are attributed to the key's user - Team-wide API keys: Requests are attributed to the team\",\"dateModified\":\"2026-10-29T16:58:09.940Z\",\"isPartOf\":{\"@id\":\"https://docs.getunblocked.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Context\",\"item\":\"https://docs.getunblocked.com/api-reference/context-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Query Pull Requests\",\"item\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests#apireference\",\"headline\":\"Query Pull Requests\",\"name\":\"Query Pull Requests\",\"description\":\"Retrieve pull requests matching a natural-language query with optional repository and person filters. Unlike search, which ranks results by semantic relevance, query returns the pull requests that match the given criteria. Authentication behavior: - Personal Access Token (PAT) keys: Requests are attributed to the key's user - Team-wide API keys: Requests are attributed to the team\",\"url\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getunblocked.com/api-reference/context/query-pull-requests#webpage\"},\"dateModified\":\"2026-10-29T16:58:09.940Z\",\"publisher\":{\"@id\":\"https://docs.getunblocked.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getunblocked.com#website\"}}]}\u003c/script>","siteName":"Unblocked","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/what-is-unblocked"}]},{"tab":"Unblocked API","groups":[{"group":"Overview","pages":[{"title":"Quickstart for the Unblocked API","sidebarTitle":"Quickstart","icon":"rocket-launch","href":"/api-reference/quickstart"},{"title":"Pagination in the Unblocked API","sidebarTitle":"Pagination","icon":"page","href":"/api-reference/pagination"},{"title":"Rate limits","icon":"gauge","href":"/api-reference/rate-limits"},{"title":"Errors","icon":"circle-exclamation","href":"/api-reference/errors"}]},{"group":"Answers","root":{"title":"Answers","href":"/api-reference/answers-overview"},"expanded":true,"pages":[{"title":"List Answers","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /answers","href":"/api-reference/answers/list-answers"},{"title":"Ask a Question","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json put /answers/{questionId}","href":"/api-reference/answers/ask-a-question"},{"title":"Retrieve an Answer","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /answers/{questionId}","href":"/api-reference/answers/retrieve-an-answer"},{"title":"Delete a Question","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json delete /answers/{questionId}","href":"/api-reference/answers/delete-a-question"}]},{"group":"Collections","root":{"title":"Collections","href":"/api-reference/collections-overview"},"expanded":true,"pages":[{"title":"List Collections","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /collections","href":"/api-reference/collections/list-collections"},{"title":"Create Collection","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /collections","href":"/api-reference/collections/create-collection"},{"title":"Get Collection","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /collections/{collectionId}","href":"/api-reference/collections/get-collection"},{"title":"Update Collection","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json patch /collections/{collectionId}","href":"/api-reference/collections/update-collection"},{"title":"Delete Collection","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json delete /collections/{collectionId}","href":"/api-reference/collections/delete-collection"}]},{"group":"Context","root":{"title":"Context","href":"/api-reference/context-overview"},"expanded":true,"pages":[{"title":"Research Context","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/research","href":"/api-reference/context/research-context"},{"title":"Search Code","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/search/code","href":"/api-reference/context/search-code"},{"title":"Search Documentation","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/search/documentation","href":"/api-reference/context/search-documentation"},{"title":"Search Issues","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/search/issues","href":"/api-reference/context/search-issues"},{"title":"Search Messages","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/search/messages","href":"/api-reference/context/search-messages"},{"title":"Search Pull Requests","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/search/prs","href":"/api-reference/context/search-pull-requests"},{"title":"Query Issues","description":"Retrieve issues matching a natural-language query with optional project and person filters. Unlike search, which ranks results by semantic relevance, query returns the issues that match the given criteria.\n\n**Authentication behavior:**\n- **Personal Access Token (PAT) keys**: Requests are attributed to the key's user\n- **Team-wide API keys**: Requests are attributed to the team\n","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/query/issues","href":"/api-reference/context/query-issues"},{"title":"Query Pull Requests","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/query/prs","href":"/api-reference/context/query-pull-requests"},{"title":"Get URL Content","description":"Retrieve the content of one or more URLs from systems connected to Unblocked, such as pull requests, issues, documents, and message threads.\n\n**Authentication behavior:**\n- **Personal Access Token (PAT) keys**: Requests are attributed to the key's user\n- **Team-wide API keys**: Requests are attributed to the team\n","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /context/get/urls","href":"/api-reference/context/get-url-content"}]},{"group":"Documents","root":{"title":"Documents","href":"/api-reference/documents-overview"},"expanded":true,"pages":[{"title":"List Documents","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /documents","href":"/api-reference/documents/list-documents"},{"title":"Put Document","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json put /documents","href":"/api-reference/documents/put-document"},{"title":"Delete Document","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json delete /documents/{documentId}","href":"/api-reference/documents/delete-document"}]},{"group":"SCIM","root":{"title":"SCIM","href":"/api-reference/scim-overview"},"expanded":true,"pages":[{"title":"List Users","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /scim/v2/Users","href":"/api-reference/scim/list-users"},{"title":"Create User","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /scim/v2/Users","href":"/api-reference/scim/create-user"},{"title":"Get User","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /scim/v2/Users/{userId}","href":"/api-reference/scim/get-user"},{"title":"Replace User","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json put /scim/v2/Users/{userId}","href":"/api-reference/scim/replace-user"},{"title":"Update User","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json patch /scim/v2/Users/{userId}","href":"/api-reference/scim/update-user"},{"title":"Delete User","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json delete /scim/v2/Users/{userId}","href":"/api-reference/scim/delete-user"},{"title":"List Groups","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /scim/v2/Groups","href":"/api-reference/scim/list-groups"},{"title":"Create Group","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json post /scim/v2/Groups","href":"/api-reference/scim/create-group"},{"title":"Get Group","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /scim/v2/Groups/{groupId}","href":"/api-reference/scim/get-group"},{"title":"Replace Group","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json put /scim/v2/Groups/{groupId}","href":"/api-reference/scim/replace-group"},{"title":"Update Group","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json patch /scim/v2/Groups/{groupId}","href":"/api-reference/scim/update-group"},{"title":"Delete Group","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json delete /scim/v2/Groups/{groupId}","href":"/api-reference/scim/delete-group"}]},{"group":"Security Events","root":{"title":"Security Events","href":"/api-reference/security-events-overview"},"expanded":true,"pages":[{"title":"List Audit Logs","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /audit-logs","href":"/api-reference/security-events/list-audit-logs"},{"title":"List Agent Access Logs","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /agent-access-logs","href":"/api-reference/security-events/list-agent-access-logs"}]},{"group":"Usage","root":{"title":"Usage","href":"/api-reference/usage-overview"},"expanded":true,"pages":[{"title":"List Coding Task Usage","deprecated":null,"version":null,"openapi":"https://getunblocked.com/api/v1/public-api.json get /coding-task-usage","href":"/api-reference/usage/list-coding-task-usage"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Query Pull Requests - Unblocked","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}