Agent Native Explore
Randomized product discovery for AI agent exploration and serendipitous finding.
Base URL: https://api.buywhere.ai/v2/agents/explore
Overview
The Agent Native Explore endpoint provides randomized product discovery, useful for AI agents that need to browse and discover products without a specific search query. It returns products with full agent-native metadata.
HTTP Method
GET /v2/agents/explore
Authentication
Requires API key in the Authorization header:
Authorization: Bearer bw_live_xxxxxxxxxxxxxxxx
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
category | string | No | - | Filter by category |
limit | integer | No | 20 | Results per page (1-100) |
offset | integer | No | 0 | Pagination offset |
currency | string | No | SGD | Response currency |
Request Example
cURL
curl -X GET "https://api.buywhere.ai/v2/agents/explore?category=electronics&limit=20" \
-H "Authorization: Bearer bw_live_xxxxxxxxxxxxxxxx"
Python
import httpx
API_KEY = "bw_live_xxxxxxxxxxxxxxxx"
BASE_URL = "https://api.buywhere.ai"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = httpx.get(
f"{BASE_URL}/v2/agents/explore",
params={
"category": "electronics",
"limit": 20
},
headers=headers
)
data = response.json()
print(f"Discovered {data['total']} products")
for item in data['results']:
print(f"\n{item['title']}")
print(f" Price: {item['currency']} {item['price']}")
print(f" Confidence: {item['confidence_score']}")
JavaScript (Node.js)
const API_KEY = "bw_live_xxxxxxxxxxxxxxxx";
const BASE_URL = "https://api.buywhere.ai";
const response = await fetch(
`${BASE_URL}/v2/agents/explore?category=electronics&limit=20`,
{
headers: { "Authorization": `Bearer ${API_KEY}` }
}
);
const data = await response.json();
console.log(`Discovered ${data.total} products`);
data.results.forEach(item => {
console.log(`\n${item.title}`);
console.log(` Price: ${item.currency} ${item.price}`);
console.log(` Confidence: ${item.confidence_score}`);
});
Go
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func explore(apiKey, category string) error {
baseURL, _ := url.Parse("https://api.buywhere.ai/v2/agents/explore")
params := url.Values{}
params.Set("category", category)
params.Set("limit", "20")
baseURL.RawQuery = params.Encode()
req, _ := http.NewRequest("GET", baseURL.String(), nil)
req.Header.Set("Authorization", "Bearer "+apiKey)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
total := int(result["total"].(float64))
fmt.Printf("Discovered %d products\n", total)
results := result["results"].([]interface{})
for _, r := range results {
m := r.(map[string]interface{})
fmt.Printf("\n%s\n", m["title"])
fmt.Printf(" Price: %s %s\n", m["currency"], m["price"])
fmt.Printf(" Confidence: %.2f\n", m["confidence_score"].(float64))
}
return nil
}
Response
Success Response (200 OK)
{
"total": 125430,
"limit": 20,
"offset": 0,
"has_more": true,
"results": [
{
"id": 18472931,
"sku": "SAMSUNG-TV-55",
"source": "shopee_sg",
"title": "Samsung 55 inch 4K Smart TV",
"price": "899.00",
"currency": "SGD",
"url": "https://shopee.sg/product/18472931",
"brand": "Samsung",
"category": "TVs & Home Cinema",
"image_url": "https://cf.shopee.sg/file/xxxxx.jpg",
"rating": 4.6,
"review_count": 1205,
"is_available": true,
"confidence_score": 0.94,
"availability_prediction": "in_stock",
"competitor_count": 12,
"buybox_price": "849.00",
"affiliate_url": "https://buywhere.ai/track/abc123"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
total | integer | Total products in category |
limit | integer | Results per page |
offset | integer | Current offset |
has_more | boolean | More results available |
results | array | Array of discovered products |
Related Endpoints
- Agent Native Search - Search with query
- Agent Native Trending by Category - Trending products
- V2 Search - Standard V2 search