# Python API examples not correct

**URL:** <https://community.perplexity.ai/t/python-api-examples-not-correct/1613>\
**Category:** Bug Reports\
**Tags:** search-api\
**Created:** [September 26, 2025, 1:15pm UTC](https://community.perplexity.ai/t/python-api-examples-not-correct/1613 "2025-09-26T13:15:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Calder](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/matt_calder/32/1115_2.png) [@Matt\_Calder](https://community.perplexity.ai/u/Matt_Calder)\
**Post date:** [September 26, 2025, 1:15pm UTC](https://community.perplexity.ai/t/python-api-examples-not-correct/1613/1 "2025-09-26T13:15:10Z")

</div>

## 🐛 Python API search\_recency\_filter not supported

[The documentation shows](https://docs.perplexity.ai/guides/search-best-practices) a search\_recency\_filter arg in the Python API:

```auto
# For general information and current events
web_search = client.search.create(
    query="latest tech news",
    search_mode="web",
    search_recency_filter="day"
)

```

## ✅ Expected Behavior

I expect the parameter to be in the API

## ❌ Actual Behavior

TypeError: SearchResource.create() got an unexpected keyword argument ‘search\_recency\_filter’

## 🔄 Steps to Reproduce

1. Call the API in the documented way.
2. Observe the unexpected behavior.

## 🌍 Environment

- **API Version:**?
- **SDK (if applicable):** 0.11.0
- **Operating System:** Linux

##

---

<div class="post-metadata">

**Author:** ![kremalicious](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/kremalicious/32/1120_2.png) [@kremalicious](https://community.perplexity.ai/u/kremalicious)\
**Post date:** [September 26, 2025, 2:48pm UTC](https://community.perplexity.ai/t/python-api-examples-not-correct/1613/2 "2025-09-26T14:48:54Z")

</div>

FYI, this is the same with the TypeScript SDK, it seems that in general search\_recency\_filter is not implemented in the API endpoint. The API docs say it is, but the API reference does not list it. And the SDK typings do not have it either.

And there are more discrepancies between docs and implementation, started to collect them here:

> [@Search API implementation and SDKs do not match API docs and SDK docs](https://community.perplexity.ai/t/search-api-implementation-and-sdks-do-not-match-api-docs/1616):
>
> bug Describe the Bug There are significant differences between the [Search API docs](https://docs.perplexity.ai/guides/search-quickstart), the actual implementation shown in the [Search API references](https://docs.perplexity.ai/api-reference/search-post) and the SDKs and their [docs](https://docs.perplexity.ai/guides/perplexity-sdk-search): search\_recency\_filter does not exist as option in endpoint or Typescript SDK or Python SDK, the latter [being reported here](https://community.perplexity.ai/t/python-api-examples-not-correct/1613) return\_imagesalso does not exist in API references or in Typescript SDK. Likewise, does not include it in the SearchCreateResponse.Result typings either Same for return\_snippets, user\_location\_filter,…

---

<div class="post-metadata">

**Author:** ![iam](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@iam](https://community.perplexity.ai/u/iam)\
**Post date:** [September 30, 2025, 6:52am UTC](https://community.perplexity.ai/t/python-api-examples-not-correct/1613/3 "2025-09-30T06:52:28Z")

</div>

Similar issue here. Just want to note that `search_domain_filter`and other Date Range Filtering related arguments are also not working.

---

<div class="post-metadata">

**Author:** ![Kesku](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/kesku/32/898_2.png) [@Kesku](https://community.perplexity.ai/u/Kesku)\
**Post date:** [November 4, 2025, 4:17pm UTC](https://community.perplexity.ai/t/python-api-examples-not-correct/1613/4 "2025-11-04T16:17:06Z")

</div>

Hey all! We’ve made some fixes regarding this, is anyone still experiencing any issues with the above filters?
