Skip to content

Playbooks

Playbook: analyze with AI

Get structured insights and custom JSON fields from any website — in cURL, TypeScript and Python.

This playbook enriches a company website with AI: summary, features, audience, contacts, plus two custom fields.

The request

Parameter Why
custom_prompt Steer the analysis.
custom_response Add your own fields as { "field": "description" }.
include_contacts=true Extract emails and phone numbers (default).
cache=true Don't re-analyze the same site within the TTL.

The AI Analysis API is available on paid plans.

Code

curl -G "http://localhost:4000/v1/analyze" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "custom_prompt=Analyze this company as a potential B2B customer." \
  --data-urlencode 'custom_response={"business_model":"B2B, B2C or marketplace","pricing_model":"how the product is priced"}' \
  -d cache=true \
  -H "x-api-key: $SNAPLENS_API_KEY"
{
  "success": true,
  "data": {
    "summary": "Example Corp sells workflow automation software to mid-sized finance teams.",
    "valueProposition": "Close the books faster with automated reconciliation.",
    "keyFeatures": ["Bank reconciliation", "Approval workflows", "ERP integrations"],
    "categories": ["Fintech", "SaaS"],
    "useCases": ["Month-end close", "Spend approval"],
    "targetAudience": "CFOs and finance operations teams at mid-sized companies",
    "emails": ["sales@example.com"],
    "phoneNumbers": [],
    "business_model": "B2B",
    "pricing_model": "Per-seat subscription with an enterprise tier"
  }
}

Tips

  • Keep custom field descriptions short and specific; mention allowed values when you want a fixed set.
  • Ask for an output language in custom_prompt (for example "Answer in Spanish").
  • For many URLs, use is_async=true with a webhook or the SDK batch() helper.
  • Treat AI output as an assistant's judgment: validate critical fields before acting on them.