# Perplexity Search

Perform AI-powered web searches with real-time information using Perplexity models via...

- Repository: https://github.com/LeonChaoX/qinyan-academic-skills (996 stars)
- Category: Data and ML
- License: MIT license
- Last updated: 2026-07-20
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add LeonChaoX/qinyan-academic-skills --skill perplexity-search -g -a claude-code -y`
Codex: `npx skills add LeonChaoX/qinyan-academic-skills --skill perplexity-search -g -a codex -y`
Cursor: `npx skills add LeonChaoX/qinyan-academic-skills --skill perplexity-search -g -a cursor -y`
Gemini CLI: `npx skills add LeonChaoX/qinyan-academic-skills --skill perplexity-search -g -a gemini-cli -y`

## Description

Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Perplexity Search

## Overview

Perform AI-powered web searches using Perplexity models through LiteLLM and OpenRouter. Perplexity provides real-time, web-grounded answers with source citations, making it ideal for finding current information, recent scientific literature, and facts beyond the model's training data cutoff.

This skill provides access to all Perplexity models through OpenRouter, requiring only a single API key (no separate Perplexity account needed).

## When to Use This Skill

Use this skill when:
- Searching for current information or recent developments (2024 and beyond)
- Finding latest scientific publications and research
- Getting real-time answers grounded in web sources
- Verifying facts with source citations
- Conducting literature searches across multiple domains
- Accessing information beyond the model's knowledge cutoff
- Performing domain-specific research (biomedical, technical, clinical)
- Comparing current approaches or technologies

**Do not use** for:
- Simple calculations or logic problems (use directly)
- Tasks requiring code execution (use standard tools)
- Questions well within the model's training data (unless verification needed)

## Quick Start

### Setup (One-time)

1. **Get OpenRouter API key**:
   - Visit https://openrouter.ai/keys
   - Create account and generate API key
   - Add credits to account (minimum $5 recommended)

2. **Configure environment**:
   ```bash
   # Set API key
   export OPENROUTER_API_KEY='sk-or-v1-your-key-here'

   # Or use setup script
   python scripts/setup_env.py --api-key sk-or-v1-your-key-here
   ```

3. **Install dependencies**:
   ```bash
   uv pip install litellm
   ```

4. **Verify setup**:
   ```bash
   python scripts/perplexity_search.py --check-setup
   ```

See `references/openrouter_setup.md` for detailed setup instructions, troubleshooting, and security best practices.

### Basic Usage

The rest: https://github.com/LeonChaoX/qinyan-academic-skills/blob/HEAD/skills/01-论文检索与文献管理/perplexity-search/SKILL.md
