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.

curl GET /api/v1/products/search

Search for products using text queries and LLM reranking.

Query Parameters

ParameterTypeDescription
qstringSearch query text (required)
brand_urlstringBase brand URL to filter by, e.g., nike.com (optional)
limitnumberMaximum number of results (default: 20)
include_raw_databooleanInclude 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

ParameterTypeDescription
idstringProduct ID

Query Parameters

ParameterTypeDescription
include_raw_databooleanInclude 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

ParameterTypeDescription
urlstringThe product URL to fetch
include_raw_databooleanInclude raw html/json data from pdp (default: false)

Health Check

GET /health

Check API health status.