> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nimbleway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Best Practices

The `search_depth` parameter controls the tradeoff between latency, cost, and content richness. Pick the right depth for each query instead of over-fetching.

## When to use each search depth

### Lite — short snippets for simple questions

Use `lite` when a one-sentence snippet answers the question on its own, or you need to scan many results without reading full pages.

**Good for:**

* Quick factual questions ("when was X founded", "what's the latest release of Y")
* High-volume monitoring where you only need to detect new mentions
* Scanning and filtering before deciding what's worth going deeper on

```json theme={"system"}
{
  "query": "competitor product launches 2026",
  "search_depth": "lite",
  "max_results": 20
}
```

### Standard — rich content for AI agents

Use `standard` when you need enough content to answer questions or feed an LLM, without the latency of scraping every page in real time. Returns rich content optimized for AI consumption. It's the default depth when a request omits `search_depth`.

**Good for:**

* RAG pipelines and chatbot grounding
* Real-time agent workflows where latency matters
* Q\&A systems that need context beyond snippets
* Any AI application that needs content, not just links

```json theme={"system"}
{
  "query": "python async best practices",
  "search_depth": "standard",
  "max_results": 5
}
```

## Full page content

Add `full_content: true` when you need complete source material from every result, on top of either depth. Each page is scraped in real time and its full content returned alongside the usual title, URL, and description.

**Good for:**

* Research and due diligence requiring complete source text
* Building comprehensive knowledge bases
* Content analysis where snippets are insufficient
* Legal or compliance workflows needing full page archives

```json theme={"system"}
{
  "query": "GDPR compliance requirements for SaaS",
  "search_depth": "standard",
  "full_content": true,
  "max_results": 5,
  "output_format": "markdown"
}
```

## Cost optimization

### Start lite, go deeper when needed

The most cost-effective pattern: search with `lite` first, then use [Extract](/nimble-sdk/web-tools/extract/quickstart) on the specific URLs that matter.

<CodeGroup>
  ```python Python theme={"system"}
  from nimble_python import Nimble

  nimble = Nimble(api_key="YOUR-API-KEY")

  # Step 1: Lite search to find relevant URLs
  results = nimble.search(
      query="AI agent frameworks comparison",
      search_depth="lite",
      max_results=20
  )

  # Step 2: Extract full content from the top results only
  for item in results.results[:3]:
      page = nimble.extract.run(
          url=item.url,
          formats=["markdown"]
      )
      print(page.data.markdown)
  ```

  ```typescript TypeScript theme={"system"}
  import Nimble from '@nimble-way/nimble-js';

  const nimble = new Nimble({ apiKey: "YOUR-API-KEY" });

  // Step 1: Lite search to find relevant URLs
  const results = await nimble.search({
    query: "AI agent frameworks comparison",
    search_depth: "lite",
    max_results: 20
  });

  // Step 2: Extract full content from the top results only
  for (const item of results.results.slice(0, 3)) {
    const page = await nimble.extract.run({
      url: item.url,
      formats: ["markdown"]
    });
    console.log(page.data?.markdown);
  }
  ```

  ```bash cURL theme={"system"}
  # Step 1: Lite search
  curl -X POST 'https://sdk.nimbleway.com/v2/search' \
  --header 'Authorization: Bearer <YOUR-API-KEY>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "query": "AI agent frameworks comparison",
      "search_depth": "lite",
      "max_results": 20
  }'

  # Step 2: Extract specific URLs from the results
  curl -X POST 'https://sdk.nimbleway.com/v2/extract' \
  --header 'Authorization: Bearer <YOUR-API-KEY>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "url": "https://example.com/ai-frameworks",
      "formats": ["markdown"]
  }'
  ```
</CodeGroup>

### Choose depth by query type

Not every query needs the same depth. Match depth to intent:

| Query intent | Recommended depth | Why |
| - | - | - |
| "Find URLs about X" | `lite` | Only need links, not content |
| "What is X?" | `standard` | Rich content is enough for a summary |
| "Summarize everything about X" | `standard` + `full_content` | Need full page text for comprehensive analysis |
| "Monitor mentions of X" | `lite` | High-volume, only need detection |
| "Research X for a report" | `standard` + `full_content` | Need complete source material |

## Combining depth with other features

### Depth + domain filtering

Narrow your search to trusted sources before extracting content:

```json theme={"system"}
{
  "query": "kubernetes best practices",
  "search_depth": "standard",
  "full_content": true,
  "max_results": 5,
  "include_domains": ["kubernetes.io", "cloud.google.com", "docs.aws.amazon.com"]
}
```

### Depth + time filtering

Combine depth with recency filters for targeted research:

```json theme={"system"}
{
  "query": "AI regulation updates",
  "search_depth": "lite",
  "max_results": 20,
  "time_range": "week"
}
```

## Next steps

<CardGroup cols={2}>
  <Card icon="magnifying-glass" href="/nimble-sdk/web-tools/search" title="Quickstart">
    Full Search documentation with all features and focus modes
  </Card>

  <Card icon="code" href="/api-reference/search/search" title="API Reference">
    Complete parameter documentation and response schemas
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.