How To Automate Perplexity AI Web Search
By corbin
Key Concepts
- Perplexity AI API: A new capability allowing programmatic access to Perplexity AI's web search functionality.
- Zapier: An automation platform connecting over 8,000 applications, used here for orchestrating AI workflows.
- Web Search Integration: The core skill of embedding internet search queries directly into automated workflows.
- Traditional Web Parser: An older method for accessing web data, limited by requiring a specific webpage URL.
- Perplexity AI Models:
sonar: A faster model optimized for general web search queries (e.g., 10 seconds for output).deep research: A more extensive model for in-depth queries, taking longer (e.g., 30+ seconds), similar to advanced LLM reasoning.
- User Message (Prompt): The direct instruction or query given to the AI model, including explicit commands like "Web search".
- System Message: Instructions given to the AI to guide its behavior and output format (e.g., "give me a four sentence summary").
- Citations: Links to source articles and websites provided by Perplexity AI, enhancing reliability.
- Assistant Response: The final, summarized output generated by the AI based on the prompt and web search results.
- Automation Workflow: A sequence of automated steps (trigger, actions) designed to perform a task without manual intervention.
Introduction to Perplexity AI's Web Search API and Zapier Integration
Perplexity AI has released a significant update, enabling its web search capabilities to be leveraged automatically in software via its API. This video demonstrates how to integrate this functionality into over 8,000 applications within the Zapier ecosystem. The core intention is to teach the crucial skill of integrating internet access into automated workflows, allowing software to perform search queries, receive data, and utilize it.
This new method with Perplexity AI's API is highlighted as a substantial improvement over traditional web parsers, which were limited by requiring a specific webpage URL. Perplexity AI allows software to perform general web searches akin to Google, Bing, or DuckDuckGo, but with an added layer of AI in the search results.
Workflow Setup: Daily Stock News Automation
The tutorial outlines a practical workflow: creating an automation to follow a list of stocks, identify any new news related to them, generate a summary analysis, and then deliver this information via email, text, or Slack.
- Trigger Setup (Zapier Scheduler):
- The workflow begins by creating a new Zap in Zapier.
- The trigger is set to Zapier Scheduler.
- The event is scheduled to run every day at 6 AM, recognizing that stock news can change daily.
- This trigger is then tested to ensure it functions correctly.
Obtaining the Perplexity AI API Key
To access Perplexity AI's capabilities, an API key is required:
- Navigate to the Perplexity AI account settings and select "API."
- Go to "API keys," accept the terms, and click "Generate API key."
- Assign a name to the key (e.g., "my ZAP your key").
- Once generated, the secret key is displayed and must be copied for use in Zapier.
- Relevant documentation for the
sonarweb search control and its AI integration is available and will be linked in the video description.
Integrating Perplexity AI into Zapier
After setting up the trigger and obtaining the API key, Perplexity AI is added as an action step in Zapier:
- The Zap is renamed to "web search finally" for clarity.
- A new block/step is added, searching for and selecting Perplexity AI.
- The chosen event for Perplexity AI is Chat Completion.
- During the sign-in process, the previously copied Perplexity AI API key is pasted to authenticate the connection.
Configuring Perplexity AI: Model Selection and Prompting
The configuration of the Perplexity AI step involves selecting the appropriate model and crafting effective prompts:
- Model Selection:
- For most web search use cases, the
sonarmodel is recommended due to its speed and efficiency. - The video explains that
sonarmight take around 10 seconds for an output. - Other models, like
deep research, are available for more extensive queries, similar to advanced reasoning in ChatGPT or Claude, but they take longer (e.g., 30+ seconds) as they perform more search queries.
- For most web search use cases, the
- User Message (Prompting for Web Search):
- To activate the web searching capability, the prompt must explicitly state "Web search."
- Example prompt: "I want you to look at these stock tickers today. Web search Apple, Nvidia, Netflix."
- This explicit instruction signals to the AI that up-to-date internet information is required, distinguishing it from a general query.
- System Message (Output Formatting):
- The default system message is "be precise and concise."
- The example custom system message is: "give me a four sentence summary of the news if there is any."
- The presenter suggests more advanced prompts, such as asking if the news is "bearish or bullish," whether to "buy the stock right now," or "What price is the stock?"
- Prompting Lesson: The key to effective AI prompting is to treat the AI like a new human employee. Provide clear, step-by-step instructions, similar to an onboarding process, to achieve desired outputs.
Testing and Analyzing Perplexity AI's Output
Testing the Perplexity AI step reveals its "groundbreaking" ability to intuitively search the internet:
- Citations: A crucial feature is the provision of citations (relevant links) for all information found, addressing past concerns about AI-generated content lacking verifiable sources.
- Detailed Results: The output includes various news articles and specific result URLs, such as "Apple historical stock price data, US market, live quotes, news ideas, trading view."
- Assistant Response: The final, summarized output is found in the "assistant response" field. This contains the information requested in the prompt.
- Example Output Analysis: For October 1st, the AI provided summaries for Apple and Netflix, but explicitly stated, "no news on Nvidia on October 1st that's relevant enough for it to show up and there was no update." This demonstrates the AI's ability to discern relevant information and report when none is found. The presenter notes that the output's generality can be refined by making the prompt more specific (e.g., asking for bearish/bullish sentiment).
Delivering the Output via Gmail
The final step in the workflow is to deliver the summarized stock news:
- An action block is added for Gmail.
- The action event is Send Email.
- The email is sent to the user's own address (e.g.,
[email protected]). - The subject line is set to "daily summary of stocks."
- For the email body, data from the previous Perplexity AI step is dynamically inserted, specifically the "assistant response" field.
- Zapier's interface is highlighted for its helpful prioritization of relevant data from previous blocks, making it easy to select the correct output.
- The step is tested, and the email is successfully received, containing the AI-generated stock news summary.
Actionable Insights and Conclusion
The video concludes by emphasizing the transformative potential of integrating AI-powered web search into automations:
- Idea Generation Thought Experiment: Users are encouraged to identify recurring web search queries they manually perform in Perplexity AI, ChatGPT, or Claude (e.g., daily weather, specific industry news). These frequent queries are prime candidates for automation.
- Main Takeaway: The ability to connect the internet directly into automations eliminates the need for manual Google searches, allowing artificial intelligence to handle information retrieval with the help of Zapier.
- Accessibility: Users can start with Zapier's free tier and receive five free credits for Perplexity AI's API.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

Why Does This Guy Appear In Kids Videos?
sphynx

TIC en las Organizaciones - Electiva Complementaria II Unisimon
Julieth Güell S

How to Tame Your Advice Monster | Michael Bungay Stanier | TED
TED

Margaret Heffernan: Why it's time to forget the pecking order at work
TED

The importance of psychological safety: Amy Edmondson
The King's Fund

What Is Psychological Safety?
Harvard Business Review

13-Conflict Management: Listening in Conflict
Deliberate Development