Skip to content
PluginStats

@perplexity-ai/ai-sdk weekly downloads statistics

By perplexity-ai (3 listings) · npm · AI SDKs

Search the web with real-time results and advanced filtering powered by Perplexity's Search API

View on npm Fresh · Dec 6, 2026

@perplexity-ai/ai-sdk has 15,945 recorded weekly downloads on npm, a decrease of 51.2% over the past 30 days, ranking #1117 of 3,247 tracked listings.

Weekly downloads
15,945
Official API · Dec 5, 2026
7-day growth
-4.3%
-710 weekly downloads
30-day growth
-51.2%
-16.8K weekly downloads
90-day growth
+19.1%
+2.6K weekly downloads
Rank
#1117
▼ 26 in 7 days

About @perplexity-ai/ai-sdk

Perplexity Search for the Vercel AI SDK

npm version

A powerful web search tool powered by Perplexity's Search API for use with the Vercel AI SDK. Search the web for real-time information, news, research papers, and articles with advanced filtering options including domain, language, date range, and recency filters.

Installation

pnpm install @perplexity-ai/ai-sdk

Usage

import { perplexitySearch } from "@perplexity-ai/ai-sdk";
import { generateText, gateway } from "ai";

const result = await generateText({
  model: gateway("openai/gpt-4o-mini"),
  prompt: "What are the latest AI developments? Use search to find current information.",
  tools: {
    search: perplexitySearch(),
  },
});
Options

You can configure the API key for your tool. The perplexitySearch tool accepts an optional configuration object:

type PerplexitySearchConfig = {
  apiKey?: string;
};

Features

  • Real-time web search using Perplexity's continuously refreshed index
  • Multi-query support - search with multiple queries in a single request
  • Advanced filtering - domain, language, date range, and recency filters
  • Regional search - get geographically relevant results by country
  • Flexible content extraction - control how much content is extracted per page
  • Type-safe - Full TypeScript support with comprehensive type definitions

Advanced Usage

Regional Search
const { text } = await generateText({
  model: openai('gpt-4o-mini'),
  prompt: 'What are the latest government policies on renewable energy in the US?',
  tools: {
    search: perplexitySearch(),
  },
});

The AI can use the country parameter to get region-specific results:

// The AI will automatically use parameters like:
// { query: "government policies renewable energy", country: "US" }
Domain Filtering
const { text } = await generateText({
  model: openai('gpt-4o-mini'),
  prompt: 'Find recent climate change research from scientific journals only.',
  tools: {
    search: perplexitySearch(),
  },
});

The AI can filter to specific domains:

// The AI might use:
// { 
//   query: "climate change research", 
//   search_domain_filter: ["nature.com", "science.org", "pnas.org"] 
// }
Multi-Query Search
const { text } = await generateText({
  model: openai('gpt-4o-mini'),
  prompt: 'Research AI safety, AGI development, and AI regulation. Use multiple searches.',
  tools: {
    search: perplexitySearch(),
  },
});

The AI can perform multiple searches:

// The AI might use:
// { 
//   query: ["AI safety research", "AGI development timeline", "AI regulation 2025"] 
// }

Configuration Options

The AI can use these parameters when calling the search tool:

  • query - Search query (string or array of up to 5 strings)
  • max_results - Number of results (1-20, default: 10)
  • max_tokens_per_page - Content extraction limit (256-2048, default: 1024)
  • country - ISO country code for regional results (e.g., "US", "GB")
  • search_domain_filter - Include/exclude domains (max 20)
  • search_language_filter - Language filtering (max 10 ISO codes)
  • search_after_date - Results after date (MM/DD/YYYY format)
  • search_before_date - Results before date (MM/DD/YYYY format)
  • search_recency_filter - Time-based filtering ("day", "week", "month", "year")

API Configuration

You can also pass the API key directly:

import { perplexitySearch } from "@perplexity-ai/ai-sdk";

const search = perplexitySearch({
  apiKey: "your-api-key-here"
});

Response Format

The tool returns structured search results:

{
  results: [
    {
      title: "Article Title",
      url: "https://example.com/article",
      snippet: "Content preview...",
      date: "2025-01-15",
      last_updated: "2025-01-20"
    }
  ],
  id: "search-request-id"
}

Development

Setup
  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Create a .env file:
cp env.example .env
  1. Add your Perplexity API key to .env
Testing

Test your tool locally:

pnpm test
Building

Build the package:

pnpm build
Publishing

Before publishing, update the package name in package.json to your desired package name.

The package automatically builds before publishing:

pnpm publish

Project Structure

.
├── src/
│   ├── tools/
│   │   └── perplexity-search.ts  # Perplexity search tool implementation
│   ├── types.ts                  # TypeScript type definitions
│   ├── index.ts                  # Tool exports
│   └── test.ts                   # Test script
├── dist/                         # Build output (generated)
├── package.json
├── tsconfig.json
├── env.example
├── .gitignore
└── README.md

License

MIT

Links

Description from the npm listing.

  • ai
  • ai-sdk
  • tools
  • perplexity-ai
  • search
  • web-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

@perplexity-ai/ai-sdk weekly downloads on npm, last 90 days: 15,945 weekly downloads as of Dec 5, 2026, +19.1% over 90 days.@perplexity-ai/ai-sdkWeekly downloads on npm · Last 90 days15,945downloads / week+19.1% over 90 days010K20K30K40K50KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@perplexity-ai/ai-sdk weekly downloads on npm, last 90 days: 15,945 weekly downloads as of Dec 5, 2026, +19.1% over 90 days.

7/30/90-day growth

@perplexity-ai/ai-sdk weekly downloads growth on npm: -4.3% over 7 days, -51.2% over 30 days, +19.1% over 90 days.@perplexity-ai/ai-sdkWeekly downloads growth on npm15,945downloads / week now7-day growth-710 weekly downloads-4.3%30-day growth-16,759 weekly downloads-51.2%90-day growth+2,562 weekly downloads+19.1%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@perplexity-ai/ai-sdk weekly downloads growth on npm: -4.3% over 7 days, -51.2% over 30 days, +19.1% over 90 days.

Ranking history

@perplexity-ai/ai-sdk npm ranking history: currently #1117 (by weekly downloads).@perplexity-ai/ai-sdknpm ranking · by weekly downloads · Last 90 days#1117current rank#800#850#900#950#1000#1050#1100#1150Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@perplexity-ai/ai-sdk npm ranking history: currently #1117 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 56, #17 (overall #1,117)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 4, #14 (overall #74)
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 (170)
Recent weekly downloads observations for @perplexity-ai/ai-sdk
Date (UTC)Weekly downloadsChange vs. previous
15,945+241
15,704+1.6K
14,142+728
13,414+1.3K
12,085-1K
13,088-1.7K
14,748-1.9K
16,655-1.4K
18,018-3.3K
21,282-2.8K
24,111-8K
32,153-3.1K
35,236-3.7K
38,909—

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/@perplexity-ai/ai-sdk. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.