Deep search
curl --request GET \
--url https://api.pipellm.ai/v1/websearch/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipellm.ai/v1/websearch/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pipellm.ai/v1/websearch/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pipellm.ai/v1/websearch/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Deep search
Deep web search with content extraction and reranking.
GET
/
v1
/
websearch
/
search
Deep search
curl --request GET \
--url https://api.pipellm.ai/v1/websearch/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipellm.ai/v1/websearch/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pipellm.ai/v1/websearch/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pipellm.ai/v1/websearch/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PipeLLM exposes WebSearch through a public gateway route. Use this API when you
want web results in your own app, backend, or agent workflow without installing
the npm plugin.
PipeLLM assigns
Endpoint
| Method | Endpoint |
|---|---|
GET | https://api.pipellm.ai/v1/websearch/search |
Authentication
Authorization: Bearer $PIPELLM_API_KEY
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query |
What This Route Does
/v1/websearch/search is the full retrieval route. It starts with search
results, then extracts page content, runs embedding similarity, and reranks the
best contexts when available.
Example Request
- cURL
- Python
- Node.js
curl -X GET "https://api.pipellm.ai/v1/websearch/search?q=latest+AI+news" \
-H "Authorization: Bearer $PIPELLM_API_KEY"
import os
import requests
response = requests.get(
"https://api.pipellm.ai/v1/websearch/search",
params={"q": "latest AI news"},
headers={"Authorization": f"Bearer {os.getenv('PIPELLM_API_KEY')}"},
)
data = response.json()
for result in data.get("data", {}).get("organic", []):
print(f"- {result['title']}: {result['link']}")
const response = await fetch(
"https://api.pipellm.ai/v1/websearch/search?q=latest+AI+news",
{
headers: {
Authorization: `Bearer ${process.env.PIPELLM_API_KEY}`,
},
}
);
const data = await response.json();
data.data.organic.forEach((result) => {
console.log(`- ${result.title}: ${result.link}`);
});
Response Format
{
"code": 200,
"message": "ok",
"took_ms": 6050,
"data": {
"organic": [
{
"title": "AI News | Latest News | Insights Powering AI-Driven Business ...",
"link": "https://www.artificialintelligence-news.com/",
"snippet": "AI News delivers the latest updates in artificial intelligence..."
},
{
"title": "The Latest AI News and AI Breakthroughs that Matter Most",
"link": "https://www.crescendo.ai/news/latest-ai-news-and-updates",
"snippet": "Summary: Xiaomi has announced a next-gen AI voice model...",
"contexts": [
{
"idx": 0,
"text": "December 26, 2025\n\n# The Latest AI News and AI Breakthroughs..."
}
]
}
]
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
code | integer | 200 for success |
message | string | Status message |
took_ms | integer | Time taken in milliseconds |
data.organic | array | Organic search results |
data.organic[].title | string | Page title |
data.organic[].link | string | Page URL |
data.organic[].snippet | string | Search snippet |
data.organic[].contexts | array | Extracted page contexts when available |
data.organic[].contexts[].idx | integer | Context index |
data.organic[].contexts[].text | string | Extracted text content |
Error Response
{
"code": 400,
"message": "Bad Request, missing query parameter"
}
Pricing and Limits
| Item | Value |
|---|---|
| Price | $0.08 per successful deep search request |
| Internal model name | websearch-deepsearch |
| Limit model | Shares your account-level limits |
| Retry behavior | If you receive 503 Service Unavailable with Retry-After, wait and retry |
websearch-deepsearch from the route and stores it with the
usage and request-audit record. It is not a client-supplied parameter.
Example: RAG Context for an LLM
import os
import requests
from openai import OpenAI
search_response = requests.get(
"https://api.pipellm.ai/v1/websearch/search",
params={"q": "OpenAI o3 model capabilities"},
headers={"Authorization": f"Bearer {os.getenv('PIPELLM_API_KEY')}"},
)
search_data = search_response.json()
context = "\n".join(
f"[{r['title']}]({r['link']}): {r['snippet']}"
for r in search_data.get("data", {}).get("organic", [])[:5]
)
client = OpenAI(
api_key=os.getenv("PIPELLM_API_KEY"),
base_url="https://api.pipellm.ai/v1",
)
response = client.chat.completions.create(
model="gpt-5",
messages=[
{"role": "system", "content": f"Use this context:\n{context}"},
{"role": "user", "content": "What are the key features of OpenAI o3?"},
],
)
print(response.choices[0].message.content)
Related Docs
WebSearch Overview
Product overview, pricing, and entry points
Simple Search
Faster search route without deep retrieval
pipellm-websearch (npm)
Install the OpenClaw plugin from npm
Was this page helpful?