> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
