Search news
curl --request GET \
--url https://api.pipellm.ai/v1/websearch/search-news \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipellm.ai/v1/websearch/search-news"
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-news', 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-news"
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))
}Search news
Search recent news articles.
GET
/
v1
/
websearch
/
search-news
Search news
curl --request GET \
--url https://api.pipellm.ai/v1/websearch/search-news \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipellm.ai/v1/websearch/search-news"
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-news', 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-news"
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))
}Use this route when you want recent news articles instead of general web
results.
Endpoint
| Method | Endpoint |
|---|---|
GET | https://api.pipellm.ai/v1/websearch/search-news |
Authentication
Authorization: Bearer $PIPELLM_API_KEY
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | News query |
Example Request
curl -X GET "https://api.pipellm.ai/v1/websearch/search-news?q=OpenAI" \
-H "Authorization: Bearer $PIPELLM_API_KEY"
Response Shape
{
"code": 200,
"message": "ok",
"took_ms": 4200,
"data": {
"organic": [
{
"title": "Latest OpenAI news",
"link": "https://example.com/news",
"snippet": "Recent product and research updates...",
"contexts": [
{
"idx": 0,
"text": "..."
}
]
}
]
}
}
Notes
- This route proxies to the internal
/api/search-newshandler. - It uses the news-specific search source, then applies the same retrieval flow as deep search.
- If no results are found, this route returns
404withcode: 404andmessage: "no search results". - Successful requests cost $0.08 each and are recorded with internal model name
websearch-news. - PipeLLM derives the model name from the route; clients do not send it.
Related Docs
Deep Search
Search the general web with retrieval support
Simple Search
Fast snippets when you do not need news-specific retrieval
WebSearch Overview
Product overview and route matrix
Was this page helpful?