← Mira integration guide

Search the web.
Read the source.

Mira Search queries MIRRO's own index of crawled public sources. Mira Fetch reads a public HTTPS page as Markdown. Both return source URLs and observation dates.

Search

POST https://api.mirroapi.cloud/v1/mira/search
Authorization: Bearer YOUR_MIRA_KEY
Content-Type: application/json

{
  "query": "web accessibility keyboard navigation",
  "limit": 5,
  "domains": ["w3.org"],
  "maxAgeDays": 30
}

The response includes results with titles, excerpts, URLs, crawl dates and content hashes. corpus reports indexed document count and crawl coverage. maxAgeDays filters the age of the crawl, not the publication date. Domains include their subdomains.

Fetch

POST https://api.mirroapi.cloud/v1/mira/fetch
Authorization: Bearer YOUR_MIRA_KEY
Content-Type: application/json

{
  "url": "https://www.w3.org/standards/",
  "query": "web standards accessibility",
  "maxChars": 12000,
  "fresh": true
}

The response provides markdown, numbered lines, fetchedAt, contentHash, links and a truncated flag. HTML, plain text and Markdown are supported. The text reader does not execute website JavaScript, read PDFs, sign in or bypass robots restrictions.

An optional query selects relevant passages from long pages. Line numbers retain their original positions; omitted text is not part of the supplied evidence.

Let Mira research

POST https://api.mirroapi.cloud/v1/mira/chat/completions

{
  "model": "mira",
  "messages": [{"role": "user", "content": "Find primary sources about web accessibility and cite what you read."}],
  "mira": {"web": true}
}

When the service is connected, Mira can call mira_search_web and mira_fetch_web before answering. Chat responses include mira.web_sources, distinguishing indexed excerpts from read pages. These show evidence supplied to the model; they do not certify every generated claim. Set mira.web: false to disable web tools or mira.tools: false to disable all built-in tools. The OpenAI field web_search_options is not supported.

JavaScript client

const hits = await client.searchWeb({ query: 'web accessibility', limit: 5 });
if (hits.results.length) {
  const page = await client.fetchWeb({ url: hits.results[0].url, fresh: true });
  console.log(page.markdown, page.fetchedAt);
}

Available in the JavaScript / TypeScript client 0.7.1. Keep your key on your server. No new indexing operation is exposed to customer keys; customer fetches do not enter the shared search index.

For text research answers, Mira selects source line ranges, copies quotations directly from pages she read, runs an automated support check, and builds citation links from those sources. Plain text research responses report mira.research with the outcome and checked claims. If evidence is insufficient, she says so. This is not independent fact verification.

Limits and errors

Search accepts up to 500 query characters and ten results. Fetch returns up to 30,000 characters. The reader caches eligible pages briefly within the caller's scope; fresh: true bypasses that cache. Dates always describe the original observation.

Each caller scope has web-service allowances of 60 operations/minute, 6,000 searches/day and 200 fetches/day (UTC), with additional global capacity limits. 429 means retry later. 400 explains invalid, blocked or unreadable pages. 503 MIRA_BROWSING_UNAVAILABLE means the web service is disconnected or unavailable. Model calls retain normal Mira credit accounting; page and search requests do not themselves invoke a language model.

Search and fetch provide evidence for answers. Their availability does not establish superiority over another search service or language model.

Full API reference →