> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Searching trash

By default, any content in the user's trash is ignored in the search results.
To search the user's trash, the `trash_content` query parameter can be set to
`trashed_only`.

<CodeGroup>
  ```sh cURL theme={null}
  curl -i -X GET "https://api.box.com/2.0/search?query=sales&trash_content=trashed_only" \
      -H "Authorization: Bearer <ACCESS_TOKEN>"
  ```

  ```java Java theme={null}
  long offsetValue = 0;
  long limitValue = 10;

  BoxSearch boxSearch = new BoxSearch(api);
  BoxSearchParameters searchParams = new BoxSearchParameters();
  searchParams.setQuery("sales");
  searchParams.setTrashContent("trashed_only");

  PartialCollection<BoxItem.Info> searchResults = boxSearch.searchRange(offsetValue, limitValue, searchParams);
  ```

  ```csharp .NET theme={null}
  BoxCollection<BoxItem> results = await client.SearchManager
      .QueryAsync("sales", mdFilters: filters, trashContent: "trashed_only");
  ```

  ```python Python theme={null}
  client.search().query("sales", metadata_filters=metadata_search_filters, trash_content="trashed_only")
  ```

  ```js Node theme={null}
  client.search.query(
      'sales',
      {
          trash_content: "trashed_only"
      })
      .then(results => {
          // ...
      });
  ```
</CodeGroup>

<Info>
  Currently the API only supports searching for content not in the trash
  (`non_trashed_only`, default) or in the user's trash (`trashed_only`). It is
  currently not possible to search for items in both locations at once.
</Info>
