Documentation Index
Fetch the complete documentation index at: https://docs.new-gen.ai/llms.txt
Use this file to discover all available pages before exploring further.
All API endpoints are protected with API key authentication. You must
include a valid API key in the Authorization header with each request.
Email us and we’ll help you get set up.
Authentication
To authenticate with the API, include your API key in the Authorization header of your requests.
Example
curl -X GET "https://api.new-gen.ai/v1/products/search?q=shoes" \
-H "Authorization: YOUR_API_KEY"
If you’re using a client library:
// JavaScript example
const response = await fetch(
"https://api.new-gen.ai/v1/products/search?q=shoes",
{
headers: {
Authorization: "YOUR_API_KEY",
},
},
);
# Python example
import requests
headers = {
'Authorization': 'YOUR_API_KEY'
}
response = requests.get('https://api.new-gen.ai/v1/products/search?q=shoes', headers=headers)
Obtaining an API Key
Email us to obtain an API key and we’ll help you get set up. API keys should be kept secure and not shared.
Product Search
curl GET /api/v1/products/search
Search for products using text queries and LLM reranking.
Query Parameters
| Parameter | Type | Description |
|---|
| q | string | Search query text (required) |
| brand_url | string | Base brand URL to filter by, e.g., nike.com (optional) |
| limit | number | Maximum number of results (default: 20) |
| include_raw_data | boolean | Include raw html/json data from pdp (default: false) |
Get a Product by ID
curl GET /api/v1/products/:id
Retrieve a product by its ID.
Path Parameters
| Parameter | Type | Description |
|---|
| id | string | Product ID |
Query Parameters
| Parameter | Type | Description |
|---|
| include_raw_data | boolean | Include raw html/json data from pdp (default: false) |
Filter Products by URL
curl GET /api/v1/products?url={url}
Retrieve a product by its URL.
Query Parameters
| Parameter | Type | Description |
|---|
| url | string | The product URL to fetch |
| include_raw_data | boolean | Include raw html/json data from pdp (default: false) |
Health Check
Check API health status.