Use Case: Research a company using AI with web search capabilities to find specific information.
const website = await ctx.thisRow.get("Website");const companyName = await ctx.thisRow.get("Company Name");if (!website) { return "No website provided";}// Use AI with web search to research the companyconst research = await services.ai.generateText({ prompt: `Research ${companyName} at ${website}Find concrete, verifiable signals about:- Recent news and developments- Funding rounds or financial updates- Technology stack and tools they use- Growth signals (hiring, expansion, etc.)- Pain points or challenges they're facingCite sources for each finding.`, model: "claude-sonnet-4-5-20250929", enableWebSearch: true,});return research.text;
Best Practices:
Be specific about what you’re looking for
Request source citations for verifiability
Use for high-value prospects where deep research is worth the cost
Use Case: Scrape a website and use AI to extract specific information.
const website = await ctx.thisRow.get("Website");if (!website) { return null;}// Scrape the websiteconst scraped = await services.scrape.website({ url: website, params: { limit: 1 }, // Just scrape homepage});// Use AI to analyze the contentconst analysis = await services.ai.generateObject({ prompt: `Analyze this website and determine if it's a medical clinic that provides direct patient care.EXCLUDE: Medical device companies, pharmaceutical companies, medical software companiesINCLUDE: Medical clinics, hospitals, doctor offices, urgent care centersWebsite content:${scraped.markdown}`, schema: z.object({ isClinic: z.boolean(), clinicType: z.string().optional(), reasoning: z.string(), }), model: "gpt-5-mini",});return analysis.object;
Pattern: Scrape first, then analyze with AI for structured extraction.
Use Case: Comprehensive research for high-value prospects.
const companyName = await ctx.thisRow.get("Company Name");const website = await ctx.thisRow.get("Website");// Use the research service for comprehensive analysisconst research = await services.ai.generateResearch({ query: `Comprehensive research on ${companyName} (${website}): - Company overview and history - Recent news and developments - Leadership team and key decision makers - Products and services - Market position and competitors - Technology stack - Growth signals (hiring, funding, expansion) - Potential pain points for sales outreach`,});return research.content;
Use services.scrape.website() to get content, then services.ai.generateObject() to extract structured data. This is more accurate than web search for targeted extraction.
Use Sitemap for Multi-Page Scraping
Use services.scrape.sitemap() to find relevant pages before scraping them. It ranks pages by relevance to your
keywords.
Limit Scraping Depth
Default to limit: 1 for single page scraping. Only increase when you specifically need to follow links.
Combine Multiple Sources
For best results, combine website scraping with web search and LinkedIn data.
Handle Scraping Failures
Always check if scraping succeeded before processing the data.
Use Research Service for Deep Dives
For high-value prospects, use services.ai.generateResearch() for comprehensive intelligence.