📖
/ THE PRODUCT LLM /
HomePlayground
  • 👋Welcome
  • Getting Started
    • 🏃‍♂️Quickstart
  • Endpoints
    • 🔎/search-products
    • 🧠/match-products
    • 🔎/search-and-match
  • Topics
    • 📖Guidelines for Input Data
    • 📦Product Field
    • ‼️ Error Types
  • 🚨 Alerts
Powered by GitBook
On this page
  • /search-products
  • Request
  1. Endpoints

/search-products

Available at https://api.theproductllm.com/search-products

Last updated 18 days ago

Our /search-products endpoint accepts a product description and uses AI to search the web for match candidates. Based on the limited search result text, we can filter out many non-matching results, but to get matching products, the next steps are to visit candidate pages and match using product page data.

Search-products/ is part of a multi-step flow where you bring your own e-commerce page data. The steps are as follows:

  1. Search a product with the /search-products endpoint

  2. Ping an external API to get detailed product descriptions

  3. Score the match with /match-products, using the product data from step 2

To make this easier, our /search-products-with-page-visit endpoint takes care of the full product search flow, including fetching product page data. See . However, visiting ecommerce sites (especially class 1 sites) adds to the cost considerably.

/search-products

Required Parameters:

  • product: dict. Provide a JSON object of your product with key value pairs such as {'title':'value'}. You must define the product title under the 'title' key. You can specify familiar or unfamiliar keys. Familiar keys such as 'code', 'brand', 'description', and 'price' will be added under their own key value pair. All other key value pairs will be added to the 'description' key value pair. See .

  • site: string. Limit search to a specific domain, such as amazon.com, amazon.ca, amazon.mx, walmart.com, ebay.com, etc.

Optional Parameters:

  • search_sequence: list of strings. Provide the sequence of searches you would like to run, with each item specifying the search depth. Defaults to ['standard', 'standard']. While there is currently only one search depth option, 'standard', you have the option to control how many of searches to run. To use one search, use ['standard']. However, we strongly recommend 2 standard searches for a good outcome, i.e., ['standard', 'standard']. Each search in the sequence is a separate charge.

Request

See playground for code in other formats.

import requests
response = requests.post(
    "https://api.theproductllm.com/search-products",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "product": {
            "title":"This is a product title", 
            "description": "this is a product description" #optional
        }
        "site": "amazon.com",
        "search_sequence":["standard","standard"]
    }
)
print(response.json())

Response:

{
    "candidates": [
        "product":{
            "title":"This is a trimmed search result...",
            "description":"This is a search result snippet description"}
        "link":"https://site.com/123",
        "search_rank":1,
        "listing_id":"123",
        "is_candidate":"yes",
    ],
    "cost": 0.001
}

Tier 1 Costs and Limits

The following costs are for our highest volume service provider customers.

Search
Tier 1 Cost
Tier 1 Rate Limit

Standard

$0.0005 / search

30 queries per second

Standard x2

$0.001 / search

30 queries per second

Contact us to increase your rate limit.

Tier 2 Costs and Limits

The following costs are for low-to-medium-high volume customers.

Rate Limit: 5 searches per second.

Search
Tier 2 Cost
Tier 2 Rate Limit

Standard

$0.00075 / search

1 query per second

Standard x2

$0.0015 / search

1 query per second

🔎
here
guidelines for input data