Skip to main content
We automatically search, analyze, and synthesize information into a detailed report.
Endpoint
POST /search/v1/research
import Casedev from 'casedev';

const client = new Casedev({ apiKey: 'sk_case_YOUR_API_KEY' });

// Start research
const research = await client.search.v1.research({
  instructions: 'Research HIPAA enforcement actions in 2024, focusing on healthcare data breaches and penalties.',
  model: 'pro'
});

console.log(research.researchId);  // Poll this for results
Response
{
  "researchId": "res_abc123xyz",
  "status": "processing",
  "model": "pro"
}

Get results

// Poll for results
let result = await client.search.v1.retrieveResearch(researchId);

while (result.status !== 'completed') {
  await new Promise(r => setTimeout(r, 5000));
  result = await client.search.v1.retrieveResearch(researchId);
}

console.log(result.report);  // Full research report in Markdown
console.log(result.sources); // Sources used
Response
{
  "researchId": "res_abc123xyz",
  "status": "completed",
  "report": "## HIPAA Enforcement in 2024\n\n### Overview\nThe Office for Civil Rights (OCR) has significantly increased enforcement...\n\n### Key Findings\n1. **Increased Penalties**: Average penalties rose 45%...\n\n### Notable Cases\n- **Healthcare Provider X**: $2.3M penalty for...",
  "sources": [
    {
      "url": "https://hhs.gov/hipaa/enforcement-2024",
      "title": "OCR Enforcement Actions 2024"
    }
  ],
  "metadata": {
    "searchesPerformed": 12,
    "sourcesAnalyzed": 47,
    "processingTimeMs": 45000
  }
}

Parameters

ParameterTypeDefaultDescription
instructionsstringRequiredResearch question/instructions
modelstringnormalResearch depth (see below)
outputSchemaobjectJSON schema for structured output

Research models

ModelDepthSpeedUse case
fastBasic~30 secQuick fact-checking
normalGood~2 minStandard research
proBest~5 minComplex legal research

Examples

TypeScript
const research = await client.search.v1.research({
  instructions: 'Research recent developments in non-compete agreement enforceability across US states, focusing on 2024 legislation and court decisions.',
  model: 'pro'
});

Due diligence

TypeScript
const research = await client.search.v1.research({
  instructions: 'Research Acme Corporation litigation history over the past 5 years, including settlements, verdicts, and ongoing cases.',
  model: 'pro'
});

Structured output

TypeScript
const research = await client.search.v1.research({
  instructions: 'Research the top 5 law firms specializing in patent litigation',
  model: 'normal',
  outputSchema: {
    type: 'object',
    properties: {
      firms: {
        type: 'array',
        items: {
          type: 'object',
          properties: {
            name: { type: 'string' },
            headquarters: { type: 'string' },
            notableCases: { type: 'array', items: { type: 'string' } }
          }
        }
      }
    }
  }
});
Tip: Be specific in your instructions. “Research HIPAA enforcement in 2024” produces better results than “Tell me about HIPAA.”
Web data only. For comprehensive legal research, use Lexis, Westlaw, or OpenLaws.