Search API implementation and SDKs do not match API docs and SDK docs

:bug: Describe the Bug

There are significant differences between the Search API docs, the actual implementation shown in the Search API references and the SDKs and their docs:

  • search_recency_filter does not exist as option in endpoint or Typescript SDK or Python SDK, the latter being reported here
  • 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, and more, basically almost everything listed in the advanced search for the SDK canโ€™t be used:
  • for many options thereโ€™s a discrepancy in casing between docs and SDKs, e.g all Quick Start examples for Typescript SDK use maxTokens but the typings expect max_tokens

:white_check_mark: Expected Behavior

I expect the API docs to match the actual implementation and SDKs and their typings

:cross_mark: Actual Behavior

Endpoint and/or SDK do not support all options mentioned in API docs

:pushpin: API Request & Response

E.g. Best Practices examples for Typescript say:

const webSearch = await client.search.create({
query: "latest tech news",
searchMode: "web",
searchRecencyFilter: "day"
});

When based on the typings it should be:

const webSearch = await client.search.create({
query: "latest tech news",
search_mode: "web",
search_recency_filter: "day"
});

But even then search_recency_filter does not exist in the typings.

:globe_showing_europe_africa: Environment

  • API Version: Search API
  • SDK (if applicable): Python, Typescript (@perplexity-ai/perplexity_ai v0.6.0)
  • Operating System: all of them

:memo: Additional Context

Mismatched documentation also applies to the GitHub repo readme accessible through npm where the documented code examples are not what the underlying library expects. The linked api.md in there leads to 404 on GitHub as I would assume the underlying GitHub repo has not been made public for whatever reason. All in all a pretty frustrating experience trying to use this new API where all developer touchpoints are either wrong or incomplete or not accessible.

Multi-Query Search example not working either. Only returning results for the first element in a query list

When I pass search_domain_filter in the body payload to https://api.perplexity.ai/search it returns 400.

This was strangely working for me until yesterday.