perplexity-webhooks-events

Featured

Build event-driven architectures around Perplexity Sonar API with streaming, batch pipelines, and scheduled search monitoring. Trigger with phrases like "perplexity streaming", "perplexity events", "perplexity batch search", "perplexity news monitor", "perplexity SSE".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Perplexity Events & Async Patterns ## Overview Build event-driven architectures around Perplexity Sonar API. Perplexity does not have webhooks -- all interactions are request/response. Event patterns are built using streaming SSE, job queues for batch processing, and cron-triggered monitoring. ## Event Patterns | Pattern | Trigger | Use Case | |---------|---------|----------| | Streaming SSE | Client request | Real-time search with progressive rendering | | Batch queue | Job submission | Research automation, report generation | | Scheduled search | Cron job | News monitoring, trend alerts, competitive intel | | Citation pipeline | Post-processing | Source verification, link validation | ## Prerequisites - `openai` package installed - `PERPLEXITY_API_KEY` set - Queue system (BullMQ, SQS) for batch patterns - Cron scheduler for monitoring patterns ## Instructions ### Step 1: Streaming Search (Server-Sent Events) ```typescript import OpenAI from "openai"; import express from "express"; const perplexity = new OpenAI({ apiKey: process.env.PERPLEXITY_API_KEY!, baseURL: "https://api.perplexity.ai", }); const app = express(); app.use(express.json()); app.post("/api/search/stream", async (req, res) => { const { query, model = "sonar" } = req.body; res.writeHead(200, { "Content-Type": "text/event-stream", "Cache-Control": "no-cache", Connection: "keep-alive", }); try { const stream = await perplexity.chat.completions.create({ model, ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category