Skip to content
PluginStats

@tanstack/ai-perplexity weekly downloads statistics

By tanstack (53 listings) · npm · AI SDKs

Perplexity Search API client and tool for TanStack AI

View on npm Outdated · Oct 29, 2026

@tanstack/ai-perplexity has 181 recorded weekly downloads on npm, a decrease of 23.3% over the past 30 days, ranking #2522 of 3,247 tracked listings.

Weekly downloads
181
Official API · Dec 5, 2026
7-day growth
0.0%
0 weekly downloads
30-day growth
-23.3%
-55 weekly downloads
90-day growth
+101%
+91 weekly downloads
Rank
#2522
▼ 128 in 7 days

About @tanstack/ai-perplexity

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/api/readme/ai.png?theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/api/readme/ai.png" /> <img src="https://tanstack.com/api/readme/ai.png" alt="TanStack AI" width="900" /> </picture> </div> <br />

@tanstack/ai-perplexity

Perplexity Search API for TanStack AI.

Wraps POST https://api.perplexity.ai/search as a tool (and a low-level HTTP client) so an agent can fetch ranked web results (title, url, snippet, date?, last_updated?) for grounding.

This package does not ship a TanStack text adapter. Pair the search tool with a function-calling adapter such as openaiText. For Sonar chat(), use openaiCompatible from @tanstack/ai-openai/compatible — Sonar already searches the web and does not accept custom tools.

Install

pnpm add @tanstack/ai @tanstack/ai-openai @tanstack/ai-perplexity

Set your API key (get one at https://console.perplexity.ai/group/keys):

export PERPLEXITY_API_KEY=...
# PPLX_API_KEY is also accepted

Search tool

import { chat } from '@tanstack/ai'
import { openaiText } from '@tanstack/ai-openai'
import { perplexitySearchTool } from '@tanstack/ai-perplexity'

const search = perplexitySearchTool({
  defaultMaxResults: 5,
})

const stream = chat({
  adapter: openaiText('gpt-5.2'),
  tools: [search],
  messages: [
    { role: 'user', content: 'What were the top AI papers this week?' },
  ],
  threadId: 'thread-1',
})

The tool input schema accepts:

fieldtypenotes
querystring (required)The search query.
max_resultsinteger (1–20)Defaults to defaultMaxResults when set, otherwise the API default (10).
search_domain_filterstring[]Max 20. Allowlist ("nytimes.com") or denylist ("-pinterest.com") — never both.
search_recency_filter"hour" | "day" | "week" | "month" | "year"Recency window.
search_after_date_filterstringm/d/yyyy — only results on/after this date.
search_before_date_filterstringm/d/yyyy — only results on/before this date.

Output: { results: Array<{ title, url, snippet, date?, last_updated? }> }.

Direct client usage
import { PerplexitySearchClient } from '@tanstack/ai-perplexity'

const client = new PerplexitySearchClient()
const { results } = await client.search({
  query: 'mars sample return mission',
  max_results: 5,
  search_recency_filter: 'month',
})

Chat (Sonar)

Use openaiCompatible from @tanstack/ai-openai/compatible. Do not pass perplexitySearchTool here. Pass getPerplexityIntegrationHeaders() if you want the same X-Pplx-Integration attribution header the Search client sends automatically.

import { chat } from '@tanstack/ai'
import { openaiCompatible } from '@tanstack/ai-openai/compatible'
import { getPerplexityIntegrationHeaders } from '@tanstack/ai-perplexity'

const perplexity = openaiCompatible({
  name: 'perplexity',
  baseURL: 'https://api.perplexity.ai',
  apiKey: process.env.PERPLEXITY_API_KEY!,
  models: ['sonar', 'sonar-pro'],
  defaultHeaders: getPerplexityIntegrationHeaders(),
})

const stream = chat({
  adapter: perplexity('sonar'),
  messages: [
    { role: 'user', content: 'What is the latest on the Mars rover?' },
  ],
  threadId: 'thread-1',
})

Docs

Description from the npm listing.

  • ai
  • ai-sdk
  • typescript
  • tanstack
  • perplexity
  • search

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@tanstack/ai-perplexity weekly downloads on npm, last 90 days: 181 weekly downloads as of Dec 5, 2026, +101% over 90 days.@tanstack/ai-perplexityWeekly downloads on npm · Last 90 days181downloads / week+101% over 90 days02004006008001K1.2K1.4K1.6K1.8KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@tanstack/ai-perplexity weekly downloads on npm, last 90 days: 181 weekly downloads as of Dec 5, 2026, +101% over 90 days.

7/30/90-day growth

@tanstack/ai-perplexity weekly downloads growth on npm: 0.0% over 7 days, -23.3% over 30 days, +101% over 90 days.@tanstack/ai-perplexityWeekly downloads growth on npm181downloads / week now7-day growth+0 weekly downloads0.0%30-day growth-55 weekly downloads-23.3%90-day growth+91 weekly downloads+101%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@tanstack/ai-perplexity weekly downloads growth on npm: 0.0% over 7 days, -23.3% over 30 days, +101% over 90 days.

Ranking history

@tanstack/ai-perplexity npm ranking history: currently #2522 (by weekly downloads).@tanstack/ai-perplexitynpm ranking · by weekly downloads · Last 90 days#2522current rank#500#1000#1500#2000#2500#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 24 observations · Updated Dec 5, 2026pluginstats.com
@tanstack/ai-perplexity npm ranking history: currently #2522 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 127, #2 (overall #2,522)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 16, #9 (overall #309)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for @tanstack/ai-perplexity
Date (UTC)Weekly downloadsChange vs. previous
181-21
202-3
205+11
194+10
184+2
182-1
183+2
181-30
211-11
2220
222-5
227+3
224+28
196—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@tanstack/ai-perplexity. First seen Oct 16, 2026; last successful collection Oct 29, 2026. See the methodology.