SuperAPI AI Directory

lastsearch

LastSearch is research infrastructure for AI agents, providing real-time web search and evidence verification with citations, confidence scoring, and anti-hallucination mechanisms (Clarity). Through a multi-step verification process, it checks each claim in an answer against the text of the source pages, flags unsupported claims, and returns structured citations, contradiction detection, and source health status. The product offers an MCP server, REST API, and Python SDK, supports LangChain integration, and can be used to build AI research agents that require traceable evidence. The project is a free non-commercial project for independent developers, with a free quota of 100 advanced queries per day (deep queries count as 3x, about 33 per day), after which it falls back to keyword verification.

Open website

About this tool

LastSearch is research infrastructure for AI agents, with the core goal of providing AI agents with real-time web search, evidence extraction, source verification, and structured citation capabilities. Every answer goes through a multi-step verification process that checks each claim against the actual text of the cited source pages; unsupported claims are flagged rather than presented as facts.

Main capabilities include:

  • Verification and confidence scoring: confidence is based on evidence rather than LLM self-assessment. The system breaks compound claims into atomic facts and combines keyword and semantic hybrid retrieval, semantic evidence reranking (using a verification model trained on 1.4M+ claim-evidence pairs), multi-provider parallel search, domain authority scoring (10,000+ domains in 5 tiers), source quotation verification, cross-source consensus (3+ independent domains supporting a claim counts as "strong consensus"), contradiction detection, multi-round consistency checks, automatic confidence calibration, per-claim evidence retrieval, counter-query verification, iterative confidence-gated retrieval, and more.
  • Citation health checks: in thorough and deep modes, each cited URL is probed server-side and marked as live, stale, dead, or unchecked, helping agents identify potentially fabricated citations.
  • Content integrity: before text extraction, the raw DOM is scanned to strip hidden/non-rendered content (HTML comments, display:none, off-screen, zero font size, hidden/aria-hidden, instruction-like meta/alt text, zero-width characters, etc.), and instruction-like text is counted; each source has an integrity risk level, results have a contentRisk summary; strict: true can be passed to exclude high-risk sources.
  • Signed evidence records: every stored result has a replayable evidence record, retrievable via GET /browse/evidence/{shareId}, containing a typed record of retrieval→verification→decision, binding each claim to its source and each source to the SHA-256 contentHash of the page text used for its verification, with an Ed25519 signature (public key at GET /browse/evidence/public-key; the SDK provides client.get_evidence(id) and LastSearch.verify_evidence(bundle, pem)).
  • Three depth levels: fast, thorough, deep. deep mode runs iterative "think-"Search-Extract-Evaluate" loop, performing gap analysis, generating follow-up queries, merging claims and sources, and finally re-verifying, with a target confidence threshold of 0.85, up to 3 follow-up steps (4 rounds total including the initial one), using semantic reranking, multi-provider search, and multi-round consistency; each deep query consumes 3x quota (100 deep queries per day). When quota is exhausted, deep falls back to thorough; when there is no LastSearch key, deep also falls back to thorough. Deep responses include reasoningSteps showing the multi-step research process.
  • Streaming output: events are sent via SSE by pipeline step (trace, sources, token, result, done), and deep mode groups them by research round.
  • Automatic retry: external API calls (search providers, LLM, page fetching) automatically retry transient failures (429, 5xx) with exponential backoff; authentication errors (401/403) fail immediately.
  • Research memory (sessions): persistent research sessions accumulate knowledge across multiple queries, and subsequent queries automatically recall previously verified claims. Sessions require a LastSearch API key (ls_xxx) for identity and ownership. Each session response includes recalledClaims and newClaimsStored; sessions can be shared publicly and forked by other agents, supporting collaborative multi-agent research workflows.
  • Query decomposition: complex queries are automatically decomposed into sub-queries with intent labels (definition, evidence, comparison, counterargument, technical, historical), while simple factual queries skip planning.
  • Self-tuning scoring: domain authority, verification thresholds, consensus thresholds, confidence weights, page counts, etc. adjust automatically with use; users can give good/bad/wrong feedback on results to accelerate learning.

Usage:

  • Get a free API key: lastsearch.ai/dashboard.
  • MCP server: supports Claude Desktop, Cursor, Windsurf; add manually to the MCP configuration; MCP sets the LASTSEARCH_API_KEY environment variable.
  • Python SDK: PyPI package name lastsearch, pass api_key="ls_xxx"; supports asynchronous AsyncLastSearch.
  • REST API: use Authorization: Bearer ls_xxx.
  • LangChain integration: PyPI package langchain-lastsearch, providing 5 tools: LastSearchSearchTool, LastSearchAnswerTool (verified), LastSearchExtractTool, LastSearchCompareTool, LastSearchClarityTool (designed to reduce hallucinations).
  • CLI verification tool: verify — determines whether a claim is true; each claim outputs ✓ verified / ✗ refuted / ? unverified, with confidence, sources, reasons, and the exact evidence snippet judged; the exit code is 1 if any item is refuted. Source code at LastSearch-HQ/verify.
  • Enterprise search providers: you can use your own data sources (Elasticsearch, Confluence, custom endpoints) instead of or in combination with public web search; with data_retention="none" (dataRetention: "none" in REST), results are not saved to history, answer caches, or training data, but search provider responses may still be cached for up to 10 minutes, and the hosting provider retains standard request logs.

Response structure: each answer includes confidence (0-1 evidence score), shareId, effectiveDepth (actual depth, which may differ from the request due to fallback), claims[].verified, claims[].consensusLevel (strong/moderate/weak), contradictions, reasoningSteps (deep only), trace, quota (LastSearch key users only: used, limit, premiumActive). Claims include verified, verificationScore, consensusCount, consensusLevel; sources include verified, authority, urlHealth, integrity; the top level returns contradictions, a citationHealth summary, and a contentRisk summary.

Free quota: the free tier allows 100 premium queries per day (deep counts as 3x, about 33 requests/day), with the quota resetting every 24 hours; once the quota is reached, it falls back to keyword verification (deep falls back to thorough), which is still usable but only performs basic matching.

Limitations and notes: LastSearch is an independently developed, free, non-commercial project that searches the public internet and weighs the content it finds; sources may be wrong, outdated, or biased, and the returned content is not guaranteed to be true or complete. Confidence is an automated estimate rather than a certainty, and final judgment rests with the user and the agent. It does not constitute legal, medical, financial, or other professional advice. Content integrity detection uses deterministic rules with no guard model and produced 0 high-risk false positives on an open evaluation set (36 benign pages), but this is a small-sample count rather than a guarantee (at n=36 the 95% upper bound is about 8%); it is a signal for the agent's policy layer, not a guarantee, and adaptive attacks can bypass any content filter. The verification engine is a hosted service located in the private repository lastsearch-hq/lastsearch-engine, and all API requests are handled by LastSearch cloud infrastructure; the MCP server and frontend are open source and can be run locally. Tech stack: the API uses Node.js, TypeScript, Fastify, and Zod; parsing uses @mozilla/readability + linkedom; AI calls LLMs via OpenRouter; caching uses Redis or in-memory with smart TTL; the frontend uses React, Tailwind CSS, shadcn/ui, and Framer Motion; MCP uses @modelcontextprotocol/sdk; the Python SDK uses httpx and Pydantic; the database is Supabase (PostgreSQL).