Loading Light/Dark Toggle
Back to Blog

Bing AI Mode Scraper API: Capture Answers and Citations

Alex Johnson
Alex Johnson

Senior Web Scraping Engineer

20-Nov-2026

TL;DR:

  • Get the recommendation and its sources in one result. Our monitor query returned the models Bing suggested, three cited pages and the number of times Bing cited each page.
  • The monitor answer cited three pages. One was an Amazon search page. Its presence in the source list illustrates why a retailer link alone is insufficient evidence of an ad.
  • Keep the source URL alongside the display name. The sample labeled one publisher “Mercury PC.” Its actual host was mercury-pc.com.
  • Use the CSV for analysis and the JSON for inspection. The CSV below contains a row for each source. The original JSON also preserves the answer, citation counts and requested HTML.

Which USB-C monitor would Bing recommend to a buyer with $400, and where would it send them to read more? We put that question to our Bing AI Mode Scraper. Bing named the Dell S2725QC and the LG 27UP850K‑W. Our API returned the answer alongside three cited pages, with a URL and citation count for each. Below, you’ll turn those pages into a CSV your content team can use.

Our Bing scraper completes 99.9% of requests, so you can run a recurring list of buyer questions and compare the answers over time. Its 100% citation appearance rate makes it especially useful for finding the publishers behind a recommendation.

What the Bing AI Mode Scraper Returns

Copilot Search in Bing gives readers a generated answer with links to its sources. For a buying question, that leaves a useful trail. Which models appeared in the answer? Which review sites did Bing cite? Did Bing show a merchant offer alongside its editorial sources?

Use the scraper.bingaimode actor for this Bing search experience. The Bing AI Mode field reference describes the parts of the result you can keep.

Field in task_result How to use it
content_md Display the answer with its headings, lists and Markdown links.
content_raw Search the answer text for brand or model names.
sources Keep each cited page’s URL, domain, title and reported citation count.
ads When present, inspect merchant offers separately. Fields can include seller, price, promotion and destination URL.
html Set should_fetch_html to true when you want a copy of the rendered result for review.

Choose What to Save Before You Make the Request

The smallest useful record depends on the question you expect to answer later. For a brand check, keep the raw answer and search for the model name. For an editorial review, keep the Markdown too. In the monitor answer, headings group recommendations by product and references appear beside individual statements. Flattening that answer into a single line makes it harder for an editor to see which product a price or feature belongs to.

Keep the full URL for a source audit. In our capture, the Amazon link led to a search results page. Credit Amazon for appearing. To check a monitor specification, open the cited review and find the passage that discusses that model.

When the HTML is worth keeping

Request HTML when a reviewer also needs to inspect the captured markup alongside the parsed fields. The monitor example requests it so the original result can be revisited after the CSV has been shared. For a regular source inventory, the URL, title and answer context are usually enough. Keep large HTML values in the capture file rather than copying them into spreadsheet cells.

Prerequisites and Files

Use a directory dedicated to this example. The submission creates bing-task.json, the retrieval script writes bing-result.json, and the export creates bing-citations.csv. If you compare multiple questions, give each capture its own directory or filenames. Otherwise a later task can replace the receipt before the earlier answer has been retrieved.

Step 1 — Submit the Monitor Question With cURL

You need a Scrapeless API key, cURL and Python 3. Set SCRAPELESS_API_KEY in your shell environment. Run the commands in one directory so the Python examples can read the files cURL creates.

The request fixes the market with country and the buying criteria with prompt. A budget, screen size and connection type give you concrete claims to look for in the answer.

bash Copy
curl --silent --show-error --fail --max-time 60 \
  'https://api.scrapeless.com/api/v2/scraper/request' \
  -H "x-api-token: $SCRAPELESS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "actor": "scraper.bingaimode",
    "input": {
      "prompt": "Which 27-inch USB-C monitors under $400 are worth considering for a home office in the US?",
      "country": "US",
      "should_fetch_html": true
    }
  }' -o bing-task.json
python3 -m json.tool bing-task.json

Retrieve the Answer Associated With the Receipt

The creation receipt identifies the task. The completed response contains the actor data under task_result. Checking the top-level status first keeps an unfinished task out of the citation export. If an exported file unexpectedly contains only its header, inspect the saved response before interpreting it as a source-free answer.

A successful submission returns HTTP 201 and a task_id in bing-task.json. The answer arrives when that task finishes. Save the following as fetch_result.py and run python3 fetch_result.py. It reads the existing task ID and writes the completed response to bing-result.json. The service retains completed results for four minutes, so start this step as soon as you submit the question. AI Scraper task lifecycle

python Copy
import json
import os
import time
from pathlib import Path
from urllib.request import Request, urlopen

name = "bing"
task_id = json.loads(Path(f"{name}-task.json").read_text())["task_id"]
url = f"https://api.scrapeless.com/api/v2/scraper/result/{task_id}"
request = Request(url, headers={"x-api-token": os.environ["SCRAPELESS_API_KEY"]})

for _ in range(60):
    with urlopen(request, timeout=30) as response:
        result = json.load(response)
    if result.get("status") == "success":
        Path(f"{name}-result.json").write_text(json.dumps(result), encoding="utf-8")
        print(f"Saved {name}-result.json with {len(result['task_result'])} result fields")
        break
    if result.get("status") not in {"pending", "running"}:
        raise RuntimeError(result.get("message") or result.get("status"))
    time.sleep(2)
else:
    raise TimeoutError(f"Task still in progress: {task_id}")

Start Scraping with Scrapeless

Power up your web scraping and automation workflow with Scrapeless!
Sign up today and get $5 in free credit — no credit card required.

Claim your free credit now in the Scrapeless Dashboard.

Step 2 — Inspect the Answer and Its Citations

The sample answer opened by naming the Dell S2725QC and LG 27UP850K‑W. To check what supported those recommendations, inspect the three entries in sources. Here is the first entry exactly as returned.

json Copy
{
  "cited_count": 7,
  "domain": "officegadgetslab.com",
  "favicon_id": "",
  "index": 1,
  "snippet": "",
  "title": "Best 27-Inch 4K USB-C Monitors Under $400 - officegadgetslab.com",
  "url": "https://officegadgetslab.com/best-27-inch-4k-usb-c-monitors-under-400/"
}

Bing reported seven citations for that one URL. Count it once when reporting how many distinct pages appeared, and keep cited_count when reporting how often Bing cited the page inside the answer. The empty snippet is worth preserving. In this sample, the title and URL identify the source even though Bing supplied no excerpt.

If you track paid placements, read the ads field. Ads appear in at least 50% of Bing AI Mode results with our scraper. When Bing shows an offer, you can inspect details such as its seller, price and destination. In our monitor result, Amazon appeared in sources and Bing returned no ad record. The CSV therefore credits Amazon as a cited page.

Step 3 — Export the Cited Pages to CSV

Run this code in the directory containing bing-result.json. It writes one row per source with a URL, repeats the prompt on each row and preserves the citation count. If the source list is empty, the file still has a header.

python Copy
import csv
import json
from pathlib import Path

result = json.loads(Path("bing-result.json").read_text(encoding="utf-8"))
answer = result["task_result"]
with open("bing-citations.csv", "w", newline="", encoding="utf-8") as file:
    writer = csv.DictWriter(file, fieldnames=["prompt", "domain", "title", "url", "cited_count"])
    writer.writeheader()
    for source in answer.get("sources") or []:
        if source.get("url"):
            writer.writerow({
                "prompt": answer["prompt"],
                "domain": source.get("domain", ""),
                "title": source.get("title", ""),
                "url": source["url"],
                "cited_count": source.get("cited_count"),
            })
print("Saved bing-citations.csv")

The export uses Python’s dictionary-based CSV writer. To group the exported links yourself, extract the hostname with the URL component parser.

The sample produced three data rows. For a weekly report, retain the original JSON as well as the CSV. A completed answer with no cited pages still belongs in your answer count even though it contributes zero citation rows.

What the Three CSV Rows Tell an Editor

Source label returned URL host Reported citations in this answer What to inspect
officegadgetslab.com officegadgetslab.com 7 Which monitor claims point back to the same buying guide?
Mercury PC mercury-pc.com 1 Does the cited review discuss the model named in the surrounding paragraph?
Amazon amazon.com 4 Is the destination a specific listing or a search for a product category?

The counts above sum to twelve. The answer still had three source records. If you are measuring how often a publisher appears across buyer questions, give each host a single appearance in this answer. If you are reviewing which source the answer drew on repeatedly, preserve the individual counts. A single spreadsheet column named “citations” makes those two calculations easy to confuse.

Keep the original display labels when handing the export to an editor. For grouping, derive the host from the URL and store it in a separate column. Lowercasing “Mercury PC” produces a lowercase label with a space. It will never join to a report keyed by the publisher's hostname.

Check the result before sharing it

Before sharing the CSV, pick one URL and find it in the saved JSON. Read the answer that goes with it. Matching on the question and URL catches accidental joins between different captures and shows the editor why the page merits a look.

From One Answer to an Editorial Review

Pick a question your buyers actually ask, keep the market fixed and examine the first cited URL alongside the sentence it supports. You can use that pair in a content review long before you have enough samples for a trend.

For an editorial team that also follows Google, apply the Google AI Mode walkthrough to a matching question. Compare the resulting source fields before combining the exports. If a price in the answer needs checking, collect retail listings separately with the Web Scraping API.


Collect Your First Bing Answer

Open the Scrapeless Dashboard and submit a monitor question from your own catalog. Export the cited URLs and give your editor the page Bing referenced most often. Check AI Scraper pricing when setting the size of a recurring collection. Discuss implementation with the community on Discord or Telegram.

FAQ

Q: Can I fetch citations without downloading HTML? Yes. Omit should_fetch_html when you only need the answer and its structured fields.

Q: How should I store missing ad data? Record whether ads was present and how many ad records you received. The monitor example had an absent field. Keeping field presence lets you distinguish that case from an explicitly empty array.

Q: Can my application receive the answer by webhook? Yes. Add a top-level webhook object with the HTTPS url of your receiver when submitting the task. On delivery, check status and associate the result with its task_id. AI Scraper task lifecycle

Q: Do the examples require an AI agent, a proxy or browser selectors? The examples use cURL and Python to call a managed actor. The request specifies the market with country. You can run the workflow from a terminal without configuring a browser session.

Q: Can a retail URL appear in the citations even when no ads were returned? Yes. The captured Amazon URL appeared in the source list, and the response omitted the ads field. Use the field containing a link to classify the observation.

Q: What should a dashboard show for a completed answer with no source URLs? Keep an answer row with its status and question. Show zero usable citation URLs and let the source export contain zero data rows. This keeps the dashboard's answer count consistent with the task history.

At Scrapeless, we only access publicly available data while strictly complying with applicable laws, regulations, and website privacy policies. The content in this blog is for demonstration purposes only and does not involve any illegal or infringing activities. We make no guarantees and disclaim all liability for the use of information from this blog or third-party links. Before engaging in any scraping activities, consult your legal advisor and review the target website's terms of service or obtain the necessary permissions.

Most Popular Articles

Catalogue