Skip to main content
POST
/
v1
/
search
const results = await client.search({
  query: "Sony noise cancelling wireless earbuds",
  max_results: 3,
});

for (const product of results.results) {
  console.log(product.data.name, product.data.price);
  console.log("  Source:", product.source_url);
}
{
  "id": "search_abc123",
  "status": "completed",
  "query": "Sony noise cancelling wireless earbuds",
  "results": [
    {
      "data": {
        "name": "Sony WF-1000XM5",
        "brand": "Sony",
        "price": 249.99,
        "description": "Premium truly wireless noise cancelling earbuds with Dynamic Driver X, LDAC codec support, and up to 24 hours total battery life with charging case.",
        "features": ["active noise cancelling", "LDAC", "Bluetooth 5.3", "IPX4", "multipoint"]
      },
      "source_url": "https://electronics.sony.com/audio/headphones/all-headphones/p/wf1000xm5-s",
      "source_title": "Sony WF-1000XM5 Wireless Noise Cancelling Earbuds",
      "confidence": 0.96
    },
    {
      "data": {
        "name": "Sony WF-1000XM4",
        "brand": "Sony",
        "price": 179.99,
        "description": "Truly wireless earbuds with integrated noise cancelling processor V1, LDAC support, and up to 24 hours total battery life.",
        "features": ["active noise cancelling", "LDAC", "Bluetooth 5.2", "IPX4", "speak-to-chat"]
      },
      "source_url": "https://electronics.sony.com/audio/headphones/truly-wireless-earbuds/p/wf1000m4-Black",
      "source_title": "Sony WF-1000XM4 Noise Cancelling In-Ear Headphones",
      "confidence": 0.93
    },
    {
      "data": {
        "name": "Sony WF-C700N",
        "brand": "Sony",
        "price": 119.99,
        "description": "Noise cancelling truly wireless earbuds with ergonomic design, ambient sound mode, and up to 10 hours battery life.",
        "features": ["noise cancelling", "Bluetooth 5.2", "IPX4", "multipoint", "ambient sound"]
      },
      "source_url": "https://electronics.sony.com/audio/headphones/truly-wireless-earbuds/p/wfc700n-b",
      "source_title": "Sony WF-C700N Noise Canceling Truly Wireless Earbuds",
      "confidence": 0.91
    }
  ],
  "total_results": 3,
  "credits_used": 5
}
Search Lasso’s product database for products matching a natural language query. Lasso finds matching products and structures the results into your schema — returning typed, normalized data with source URLs and confidence scores. No tables or files needed. One call in, structured product data out.

Request body

query
string
required
Natural language search query. Embed any filters directly in the text, e.g. "Sony noise cancelling wireless earbuds".
schema_id
string
Reference an existing schema created via POST /v1/schemas. The endpoint loads the schema’s column definitions. Mutually exclusive with columns.
columns
object[]
Inline column definitions describing the output shape. Mutually exclusive with schema_id. If neither is provided, Lasso uses a default product schema (name, brand, price, description, category, image_url, url, features).
max_results
integer
default:"7"
Maximum number of products to return (1–7).
model
string
default:"auto"
AI model to use for structuring results.
webhook_url
string
If provided, Lasso returns 202 immediately and delivers results via webhook when ready.

Response

id
string
Search job identifier.
status
string
completed for sync, processing for async.
query
string
The original search query.
results
object[]
Array of structured product results.
total_results
integer
Number of products returned.
credits_used
number
Credits consumed (5 per search).
const results = await client.search({
  query: "Sony noise cancelling wireless earbuds",
  max_results: 3,
});

for (const product of results.results) {
  console.log(product.data.name, product.data.price);
  console.log("  Source:", product.source_url);
}
{
  "id": "search_abc123",
  "status": "completed",
  "query": "Sony noise cancelling wireless earbuds",
  "results": [
    {
      "data": {
        "name": "Sony WF-1000XM5",
        "brand": "Sony",
        "price": 249.99,
        "description": "Premium truly wireless noise cancelling earbuds with Dynamic Driver X, LDAC codec support, and up to 24 hours total battery life with charging case.",
        "features": ["active noise cancelling", "LDAC", "Bluetooth 5.3", "IPX4", "multipoint"]
      },
      "source_url": "https://electronics.sony.com/audio/headphones/all-headphones/p/wf1000xm5-s",
      "source_title": "Sony WF-1000XM5 Wireless Noise Cancelling Earbuds",
      "confidence": 0.96
    },
    {
      "data": {
        "name": "Sony WF-1000XM4",
        "brand": "Sony",
        "price": 179.99,
        "description": "Truly wireless earbuds with integrated noise cancelling processor V1, LDAC support, and up to 24 hours total battery life.",
        "features": ["active noise cancelling", "LDAC", "Bluetooth 5.2", "IPX4", "speak-to-chat"]
      },
      "source_url": "https://electronics.sony.com/audio/headphones/truly-wireless-earbuds/p/wf1000m4-Black",
      "source_title": "Sony WF-1000XM4 Noise Cancelling In-Ear Headphones",
      "confidence": 0.93
    },
    {
      "data": {
        "name": "Sony WF-C700N",
        "brand": "Sony",
        "price": 119.99,
        "description": "Noise cancelling truly wireless earbuds with ergonomic design, ambient sound mode, and up to 10 hours battery life.",
        "features": ["noise cancelling", "Bluetooth 5.2", "IPX4", "multipoint", "ambient sound"]
      },
      "source_url": "https://electronics.sony.com/audio/headphones/truly-wireless-earbuds/p/wfc700n-b",
      "source_title": "Sony WF-C700N Noise Canceling Truly Wireless Earbuds",
      "confidence": 0.91
    }
  ],
  "total_results": 3,
  "credits_used": 5
}