> ## 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.

# ごみ箱の検索

検索結果では、デフォルトで、ユーザーのごみ箱内のコンテンツは無視されます。ユーザーのごみ箱を検索するには、`trash_content`クエリパラメータを`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>
  現在、APIでサポートされているのは、ごみ箱にないコンテンツの検索 (`non_trashed_only`、デフォルト) かユーザーのごみ箱にあるコンテンツの検索 (`trashed_only`) のみです。現時点では、その両方の場所にある項目を同時に検索することはできません。
</Info>
