> For the complete documentation index, see [llms.txt](https://help.cabi.org/cabi-digital-library-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.cabi.org/cabi-digital-library-help/search/proximity-searching.md).

# Proximity Searching

Enables searching for two or more terms that appear within a specified distance of one another.

Procedure: Place quotation marks around the terms you want to search for, followed by a tilde \~ and a number indicating the maximum number of words separating the terms.

For example:    &#x20;

> “metabolic mechanism”\~3&#x20;

searches for the words *metabolic* and *mechanism* within 3 words of each other.

{% hint style="info" %}
If a proximity operator is included inside double quotes “\~” it is ignored
{% endhint %}

In a proximity search the word order makes a difference. The search results returned for a proximity search will follow the order of the words placed within quotes when retrieving matching hits.&#x20;

For example: *"large cats"\~2* finds a totally different set of results from *"cats large"\~2.*

A proximity search can include more than two, or any number of words placed within quotes.&#x20;

Example: "natural forest brazil"\~4

Please note that the words placed within quotes are searched precisely. For example the noun *"Brazil"* would not find matches for the derivative adjective *"Brazilian"* when part of a proximity expression. A separate search i.e. *"natural forest brazilian "\~4* would be required to match results where the term "Brazilian" appears.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.cabi.org/cabi-digital-library-help/search/proximity-searching.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
