- discover-products (this endpoint) - Extract products from content
generate-product-prompts- Generate visibility prompts for productsgenerate-product-llms-txt- Generate llms files for products
How It Works
Architecture
For large websites, content is processed efficiently:- Chunking - Content split into 15K char chunks
- Parallel extraction - All chunks processed simultaneously
- Simple prompts - Gemini only extracts name + description (fast)
- Deduplication - Final Gemini pass merges similar products
- URL mapping - Python string matching finds which pages mention each product
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
business_id | string | Yes | Clerk org ID |
pages | array | Yes | Pages with {url, markdown} |
business_info | object | Yes | Business entity info |
business_info Object
| Field | Type | Description |
|---|---|---|
entity_id | string | Business entity UUID |
url | string | Business website URL |
name | string | Business name |
clerk_org_id | string | Clerk org ID |
Response
What This Endpoint Does NOT Do
- β Generate prompts (use
generate-product-prompts) - β Generate llms files (use
generate-product-llms-txt) - β Deploy to Vercel
- Better debugging - Run each step independently
- Easier retries - If prompts fail, donβt re-discover products
- Parallel execution - Run prompts and llms generation in parallel
Database Updates
| Table | Action |
|---|---|
entities | Insert new products with type: "product" and product_source_urls |