# Get a query rule **GET /_query_rules/{ruleset_id}/_rule/{rule_id}** Get details about a query rule within a query ruleset. ## Required authorization * Cluster privileges: `manage_search_query_rules` [See rules and rulesets in Query Rules UI](https://www.elastic.co/docs/solutions/search/query-rules-ui#accessing-the-query-rules-ui) ## Servers - http://api.example.com: http://api.example.com () ## Authentication methods - Api key auth - Basic auth - Bearer auth ## Parameters ### Path parameters - **ruleset_id** (string) The unique identifier of the query ruleset containing the rule to retrieve - **rule_id** (string) The unique identifier of the query rule within the specified ruleset to retrieve ## Responses ### 200 #### Body: application/json (object) - **rule_id** (string) A unique identifier for the rule. - **type** (string) The type of rule. `pinned` will identify and pin specific documents to the top of search results. `exclude` will exclude specific documents from search results. - **criteria** (object | array[object]) The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied. - **actions** (object) The actions to take when the rule is matched. The format of this action depends on the rule type. - **priority** (number) [Powered by Bump.sh](https://bump.sh)