Skip to content

Gain & Gap and Query Pack

Gain & Gap shows what your text adds beyond the pages a reader already sees for a search phrase, what it misses and where other pages say something different. Ani compares your page or text with the search results as a whole: the top organic pages, the AI Overview and the pages it cites. The result is a fix plan, not just a number.

Query Pack is Search Intent (Search intent) and Gain & Gap for the same phrase at one price. The search results and the top pages are fetched once for both parts. No page yet? Order a Query Pack with the phrase only: instead of comparing your text, Ani prepares a brief for a new page.

Both are available in the panel (Query analysis in the sidebar, products Gain & Gap and Query Pack) and through the API.

Endpoints

Method and path What it does Scope
POST /v1/infogain Gain & Gap report for one phrase and your page or text, 202 judge
GET /v1/infogain/{id} Status and report; ?format=md = instructions for an AI agent reports:read
POST /v1/query-pack Query Pack: Search Intent and Gain & Gap for one phrase, 202 judge
GET /v1/query-pack/{id} Status of both parts and both reports; ?format=md = one set of instructions for an AI agent reports:read

Base URL: https://api.askaniela.com, key in Authorization: Bearer <key> (Authentication). Field details and examples: API reference.

Input

curl "https://api.askaniela.com/v1/infogain?wait=30" \
  -H "Authorization: Bearer $ANIELA_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: running-shoes-guide-v1" \
  -d '{"query": "how to choose running shoes", "market": "en-US", "url": "https://example.com/running-shoes"}'
Field Notes
query The search phrase your text should answer, up to 200 characters
market language-COUNTRY, default en-US
device desktop (default) or mobile
url or text Your page (we fetch it and cut menus, footers and consent windows) or your text (Markdown or plain). One of them is required. With both, the text is analysed and the URL is only context
render_js auto (default), on or off: JavaScript rendering of your page, url only
max_age_days Reuse search results up to N days old, 0-7, default 3; 0 = always new results
report_lang en or pl; default from Accept-Language
webhook_url We POST infogain.finished when the report is ready or failed
project_id Project to bill and store the report in
top_pages How many top results we fetch and read, 3 to 10. Default: every organic result the search returned (up to 10). Pages cited by the AI Overview come on top (up to 12); in a Query Pack both parts read the same pages
include_domains, exclude_domains Read only pages from these domains, or skip pages from them (subdomains included; up to 20 and 50). Also applies to sources cited by AI Overview. The AI Overview text stays

POST /v1/query-pack takes the same fields. With url the Search Intent part compares your page with the top results; with text only it reads the top results without your page, and the pack costs less. With neither url nor text (phrase only) the pack is a brief for a new page: mode is brief and the price is the lowest of the three. POST /v1/infogain still needs url or text.

A report usually takes several minutes. ?wait=N keeps the request open up to 60 s; otherwise poll the GET route and follow Retry-After. When a report is settled, organization webhooks subscribed to infogain.finished get an event (Developer panel).

Result

  • Gain (0-100): how much useful information in your text is not in the search results and is not contradicted there.
  • Coverage (0-100): how much of the common useful information from the search results your text already has.
  • Claims from your text with their state: new, common, disputed, or the top pages disagree among themselves.
  • Check list: places where other pages say something different, with a quote checked in their text.
  • Gaps: common information from the search results that your text misses, with examples.
  • Fix plan: grouped actions, each with the number of pages that support it.
  • Top pages with page type, publisher and topic categories (IAB, Google), and the AI Overview: what it already says, what contradicts your text and whether your domain is cited.

Brief for a new page (Query Pack, phrase only). The Gain & Gap part has mode brief and report.brief instead of Gain, Coverage, claims and the fix plan:

  • covered: general information the top pages give, each with the page and a quote checked in its text;
  • missing: questions a searcher may have that the top pages do not answer. Ani proposes them and then checks each one against the top pages and the AI Overview; a question the top pages do answer is dropped;
  • sections: a plan for the new page in reading order, with a heading, what the section should explain, the information and questions it covers, the number of top pages behind it and whether it is on several top pages, on one, or not in the top results at all.

The Search Intent part reads the top results without your page. The instructions for an AI agent describe writing the new page from scratch: information from the top pages in the agent's own words with the source page named, facts about your business only from you, and unanswered questions marked [TO FILL IN] until you confirm the answer.

The Search Intent part of a Query Pack. When most top results have no text to read (for example videos), the Intent part is based on the search results only, says which results it could not read and that we do not analyse video content, and costs like Intent Basic (What we do not read). The Gain & Gap part does not give up either: results without text are compared by the title and description shown in the search results (and the AI Overview, if shown). report.top_basis says what is in the top results (for example "Videos: 7 of 10 top results") and what the analysis is based on, each such page has basis: snippet, and each such result is charged at a lower rate than a page with text ($0.0011 pay as you go instead of $0.0075), because Ani reads far less. The same applies to a Gain & Gap report ordered on its own. When the Intent part fails, intent_failure says why: few_readable_pages (with readable_pages, top_pages, needed_pages), page_unreadable (your page could not be read), temporary (order again in a few minutes) or failed, with a one-sentence message. A failed part is not charged. When your page cannot be read (the Intent warning compare_page_unreadable), the Intent part has nothing to compare and costs like Intent Premium.

When your page cannot be read. If you order Gain & Gap or a Query Pack with url and we cannot read that page (for example HTTP 404, a redirect to another site, a login page or a page without main text), you do not get a failed report: Ani prepares a brief for a new page from the same top results, as in a phrase-only Query Pack. The search results and page fetches are not bought again. fallback is document_unreadable, report.mode is brief and report.doc_unreadable gives the reason (reason, for example not_found, and http_status, for example 404); message, the panel and the instructions for an AI agent say it in one sentence. The charge is the brief price for the pages read (for 10 pages $0.0705 pay as you go instead of $0.1820 for a comparison), plus the search results and page fetches we paid for, at our provider's cost plus 30% (including the attempt to fetch your page), never more than the reservation. If the top results give nothing to build a brief from, only those costs are charged. If the brief cannot be prepared because of a problem on our side (or we fetched your page but could not process it), the report fails and nothing is charged. In a Query Pack the Gain & Gap part is the brief and the pack costs like a phrase-only pack (plus the Compare difference when the Intent part did compare your page). Reports ordered under the earlier rules still fail with document_fetch_failed: the analysis is not charged, the search results and page fetches are.

Instructions for an AI agent. GET /v1/infogain/{id}?format=md and GET /v1/query-pack/{id}?format=md return a ready Markdown file for an AI agent that edits your page, in the report language (in the panel: "Instructions for an AI agent (.md)" and "Copy for an AI agent"). Gain & Gap: context, rules for safe work (backups, a draft instead of the live page, no publishing without a person's approval, before/after, gaps written in the agent's own words with the source page named, no copying of other pages, differences left for a person to decide, strengths of your text kept), then numbered steps: differences to decide, gaps grouped by the fix plan, verification with a new report and a report template for a person. Query Pack gives one file with part A (Search Intent: form and scope of the page) and part B (Gain & Gap), with the shared sections once. Built from the saved report, with no extra charge.

Price

Report Price (Just Ask)
Gain & Gap $0.20
Query Pack, with your page URL $0.27
Query Pack, text only $0.26
Query Pack, phrase only (brief for a new page) $0.15

One price per report, whatever the length of your text. The search results, the fetch of the top pages and your page are included. JavaScript rendering of your page is added only when it was used. A report without any comparison or a failed report costs nothing. In a Query Pack you pay only for the parts that returned a result. Prices on other plans: Pricing.

The price is the analysis plus what we pay providers for this report. The analysis follows the number of pages read (top results and pages cited by the AI Overview): the Gain & Gap analysis is priced for 10 pages, each page more or fewer adds or takes $0.0075; in a Query Pack the Search Intent part is priced for 8 pages and adds or takes $0.0068 per page, never below the cost floor. The search results, page fetches and JavaScript rendering are charged at our provider's cost plus 30% and only when we pay for them: results and pages reused from our cache and anything paid with your own key (BYOK) cost nothing, a fresh fetch you ask for is charged. We hold the price for the top results (top_pages or 10) plus 12 AI Overview sources at the highest fetch rate and charge for what was done. When the domain filter leaves fewer pages than you asked for, we analyse those (also 1 or 2) and you pay for the pages taken. When it leaves none, no analysis is made: the report fails with failure: pages_filtered_out and you pay only for the search results bought for it ($0.0016; nothing when they were reused), in a Query Pack for both parts. report.page_scope says what the analysis covered (requested, analyzed, results, filtered); without these fields it is not there.

What the result is not

  • Gain and Coverage are our measure of novelty and coverage against the pages that were checked on that day. They are not a Google score and not a ranking forecast.
  • "Disputed" does not decide who is right. It shows where to check your facts.
  • A high Gain is possible when the top pages are weak. The report shows how reliable the top results are and how many pages with real content were compared.
  • Signal strength is shown as 0-100, never as a percentage or a probability.