Exa AI Search API
Exa is a web search engine built from scratch for AI workflows, optimized for relevance, freshness, and semantically-driven results rather than click-based ranking.
Search as Code (SaC) is a new search architecture for AI agents that generates Python code to directly compose search primitives, bypassing multi-turn tool calling.
Similar Tools
Other tools you might consider
Exa AI Search API
Exa is a web search engine built from scratch for AI workflows, optimized for relevance, freshness, and semantically-driven results rather than click-based ranking.
Parallel AI Search
Parallel is an AI-native web search and research API designed as infrastructure for AI systems to search, retrieve, verify, and reason over live web information.
Cloudflare AI Search
Cloudflare AI Search offers a plug-and-play search primitive with hybrid search capabilities and built-in storage, allowing dynamic instance creation and management via API for agents.
Brave Search API
Brave Search API provides direct, structured API access to its independently built web index, offering flexibility and customization for RAG pipelines and AI systems.
overview
Search as Code (SaC) is a new search architecture tool developed by Perplexity AI that enables AI agents and developers building AI systems to generate and execute Python code to assemble tailored retrieval pipelines. It bypasses traditional multi-turn tool calling interfaces by exposing search stack components as programmable primitives. This architecture moves beyond monolithic search services, allowing AI models to directly program and control the search stack. The generated Python code is executed within a secure sandbox, providing AI agents with fine-grained control over individual search steps such as retrieval, ranking, filtering, fanouts, and rendering. This approach is designed to improve the efficiency and capability of AI agents in complex, open-ended information retrieval tasks, enabling them to design bespoke search pipelines spanning thousands of operations and optimize them in-flight.
quick facts
| Attribute | Value |
|---|---|
| Developer | Perplexity AI |
| Business Model | Freemium (Usage-based) |
| Pricing | Sonar API: $0.00025 per 1k input tokens; Sonar Pro: $0.003 per 1k input tokens; Agent API: Varies by provider |
| Platforms | API |
| API Available | Yes |
| EU AI Act Category | Limited |
| API Documentation | https://docs.perplexity.ai/ |
features
Search as Code (SaC) provides a robust set of features designed to empower AI agents with advanced search capabilities, moving beyond traditional fixed search pipelines. These features enable dynamic, programmable control over information retrieval processes.
use cases
Search as Code (SaC) is primarily designed for AI agents and developers who require fine-grained, programmatic control over information retrieval processes for complex and dynamic tasks. Its architecture is particularly beneficial for scenarios demanding highly customized search strategies.
pricing
Search as Code (SaC) is offered through Perplexity AI's freemium model, with pricing primarily usage-based across its API tiers. The pricing structure is designed to scale with cumulative API spending, unlocking higher rate limits as usage increases. Perplexity AI offers tiered rate limits for its Agent, Search, Embeddings, and Sonar APIs. For example, the Agent API ranges from 1 QPS (Tier 0) to 17 QPS (Tier 3), while the Search API maintains a sustained rate limit of 50 QPS with a burst capacity of 50 requests. Users can monitor their current usage tier via the API Platform console.
competitors
Search as Code (SaC) differentiates itself in the competitive landscape by offering a programmable search architecture that empowers AI agents to generate and execute code for dynamic retrieval pipelines, contrasting with traditional fixed search models and even advanced AI search tools.
Exa is a web search engine built from scratch for AI workflows, optimized for relevance, freshness, and semantically-driven results rather than click-based ranking.
Similar to SaC, Exa provides structured, up-to-date information for AI agents and RAG systems, acting as a retrieval layer. While SaC emphasizes programmable primitives for dynamic pipeline assembly, Exa focuses on delivering highly relevant and semantically understood results tailored for AI consumption.
Parallel is an AI-native web search and research API designed as infrastructure for AI systems to search, retrieve, verify, and reason over live web information.
Parallel, like SaC, targets AI agents as its primary users, providing a different kind of web infrastructure for AI systems. It aims to go deeper into how AI agents interact with the web, offering a foundational layer for complex reasoning, which aligns with SaC's goal of evolving search to programmable primitives.
Cloudflare AI Search offers a plug-and-play search primitive with hybrid search capabilities and built-in storage, allowing dynamic instance creation and management via API for agents.
Cloudflare AI Search directly positions itself as a 'search primitive' for agents, enabling developers to dynamically create and manage search instances, which closely mirrors SaC's concept of programmable primitives. It simplifies the infrastructure needed for agents to access and search data, similar to how SaC aims to provide building blocks for agentic search.
Brave Search API provides direct, structured API access to its independently built web index, offering flexibility and customization for RAG pipelines and AI systems.
The Brave Search API offers a foundational retrieval API for AI products, emphasizing control over ranking and summarization, and providing structured results. This aligns with SaC's goal of moving beyond monolithic search by offering customizable building blocks, though Brave's focus is on its independent index and structured output rather than the dynamic assembly of search pipelines through code generation.
Search as Code (SaC) is a new search architecture tool developed by Perplexity AI that enables AI agents and developers building AI systems to generate and execute Python code to assemble tailored retrieval pipelines. It bypasses traditional multi-turn tool calling interfaces by exposing search stack components as programmable primitives.
Search as Code (SaC) operates on a freemium model through Perplexity AI's API. While there might be a free tier for basic usage, advanced features and higher rate limits are usage-based. For example, the Sonar API costs $0.00025 per 1k input tokens, and the Sonar Pro API costs $0.003 per 1k input tokens, with output tokens priced separately.
Key features of Search as Code (SaC) include enabling AI models to generate and execute Python code within a secure sandbox for search, exposing search stack components as programmable primitives, allowing direct control over individual search steps (retrieval, ranking, filtering), bypassing multi-turn tool calling, and providing efficient access to intermediate search states for iterative refinement.
Search as Code (SaC) is intended for AI agents and developers building AI systems that require fine-grained, programmatic control over information retrieval. It is particularly useful for complex, open-ended tasks, in-depth research, and orchestrating search operations through model-generated Python code to improve efficiency and capability in information retrieval.
Search as Code (SaC) differentiates itself by offering a programmable search architecture where AI agents generate code to control search primitives, unlike traditional search engines that provide static results or older AI search systems with fixed pipelines. Compared to competitors like Exa AI Search API or Parallel AI Search, SaC focuses on the dynamic assembly of search pipelines through code generation, providing a more fundamental level of control over the search process for AI agents.
More on Stork
Other tools in this category, ranked by community signal
Pounce
🤖 AI Tools
AI monitors X and Reddit for the right conversations — you just reply and build relationships.
Hermes
🤖 AI Tools
Self-hosted AI agent that remembers your projects, builds skills automatically, and reaches you on Telegram, Discord & more. MIT license. No tracking.
Upstash Agent Analytics
🤖 AI Tools
Upstash is a serverless data platform providing low latency and high scalability for real-time applications. Optimize your data infrastructure with Upstash's managed services for Redis, Vector, QStash, and other key data technologies.
Novu Connect
🤖 AI Tools
Novu is an open-source notification platform that empowers developers to create robust, multi-channel notifications for web and mobile apps. With powerful workflows, seamless integrations, and a flexible API-first approach, Novu enables product teams.
Tinfoil Pigeons
🤖 AI Tools
Tinfoil Pigeons is a live radar scope: enter your postcode and see the flights overhead right now, then tap one to find out what it is.
Verol
🤖 AI Tools
Real-time AI fact checker and hallucination detector for ChatGPT, Claude, Gemini & Grok. Automatically verifies responses.
For builders
AI agents read it. Buyers find it. Backlinks accrue. Your tool can have one too — live in 24 hours, indexed by Claude, ChatGPT, and Perplexity, queryable via MCP.