Skip to main content
Setting debug: true in your request adds extra fields to the response that expose what Snipex saw and extracted from each page. Useful for understanding why certain snippets were or weren’t returned.

Extra fields on each result

FieldDescription
search_snippetThe short description originally associated with this result
original_contentThe full page content Snipex extracted and ran through its engine

Extra fields on each snippet

FieldDescription
headFirst few words used to locate the passage in the source
tailLast few words used to anchor the passage end

Example request

{
  "query": "how does photosynthesis work",
  "num_results": 2,
  "debug": true
}

Example response (debug fields highlighted)

{
  "query": "how does photosynthesis work",
  "results": [
    {
      "rank": 1,
      "url": "https://example.com/photosynthesis",
      "title": "Photosynthesis Explained",
      "snippets": [
        {
          "text": "Plants convert sunlight into chemical energy using chlorophyll...",
          "relevance_score": 0.95,
          "head": "Plants convert sunlight",
          "tail": "using chlorophyll"
        }
      ],
      "search_snippet": "Photosynthesis is the process by which...",
      "original_content": "Photosynthesis is a process used by plants and other organisms..."
    }
  ],
  "total_latency_ms": 912
}
original_content can be very large (up to several thousand words per result). Do not use debug: true in production — it’s for development and troubleshooting only.