# Ability to search deleted posts in team/channel

**URL:** <https://forum.mattermost.com/t/ability-to-search-deleted-posts-in-team-channel/22368>\
**Category:** Uncategorized\
**Created:** [January 27, 2025, 9:47am UTC](https://forum.mattermost.com/t/ability-to-search-deleted-posts-in-team-channel/22368 "2025-01-27T09:47:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nubaid.srt](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@nubaid.srt](https://forum.mattermost.com/u/nubaid.srt)\
**Post date:** [January 27, 2025, 9:47am UTC](https://forum.mattermost.com/t/ability-to-search-deleted-posts-in-team-channel/22368/1 "2025-01-27T09:47:16Z")

</div>

Hi  
Is their an API that includes the deleted posts in the result? I see `SearchPostsWithParams` but it does not return deleted posts for a search term.  
Thanks.

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [January 29, 2025, 1:25am UTC](https://forum.mattermost.com/t/ability-to-search-deleted-posts-in-team-channel/22368/2 "2025-01-29T01:25:06Z")

</div>

Hi @Nubaid! The Mattermost API probably does not return deleted posts by default in search results. However, it looks like you can retrieve deleted posts using the `GetPostsForChannel` API with the `include_deleted` parameter set to `true`. More details can be found in the [API documentation](https://api.mattermost.com/#tag/channels/operation/GetAllChannels). Hope that helps!
