Skip to main content
POST
/
public
/
enrich
POST Enrich
curl --request POST \
  --url https://api.example.com/public/enrich
Enrich items with web research. Rastro scrapes the web, extracts data, and tracks sources for each field.
curl -X POST "https://catalogapi.rastro.ai/api/public/enrich" \
  -H "Authorization: Bearer rastro_pk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Find product specifications",
    "items": [{"name": "iPhone 15 Pro"}],
    "output_schema": [
      {"name": "price", "type": "string", "description": "Current retail price"},
      {"name": "weight", "type": "string", "description": "Product weight with units"}
    ]
  }'
Response:
{
  "results": [
    {
      "original_data": {"name": "iPhone 15 Pro"},
      "enriched_fields": {
        "price": {
          "value": "$999",
          "sources": ["https://apple.com/shop/buy-iphone/iphone-15-pro"]
        },
        "weight": {
          "value": "187 grams",
          "sources": ["https://apple.com/iphone-15-pro/specs"]
        }
      },
      "all_sources": ["https://apple.com/..."],
      "error": null
    }
  ],
  "total_items": 1,
  "successful": 1
}

Parameters

ParameterRequiredDefaultDescription
promptYes-Search prompt for web enrichment
itemsYes-List of JSON objects to enrich
output_schemaYes-List of field definitions: [{name, type, description}, ...]
allowed_domainsNoanyRestrict web sources to these domains only
speedNo"medium""fast", "medium", or "slow"

Output Schema

Define the fields you want to extract:
{
  "output_schema": [
    {"name": "price", "type": "string", "description": "Current retail price"},
    {"name": "in_stock", "type": "boolean", "description": "Whether item is available"},
    {"name": "features", "type": "array", "description": "List of key features"}
  ]
}
Field types: string, number, integer, boolean, array
Need more control? Use Flows to build reusable pipelines with transformations, filters, and multi-step enrichment.