indexgap bing

command

Bing Webmaster API: export queries, pages and crawl errors; submit URLs.

pull downloads, for the site in --site or indexgap.json, the query statistics (GetQueryStats), the page statistics (GetPageStats) and the crawl issues (GetCrawlIssues) into bing-queries.csv, bing-pages.csv and bing-crawl-issues.csv in --out-dir. The site is first matched against the account's sites (GetUserSites), so an unverified or missing site is named instead of failing later. Dates in the WCF form /Date(ms)/ become YYYY-MM-DD; the numbers are written as the API returns them. Crawl issues are written with whatever columns the API sends, because their field names could not be confirmed in Microsoft's documentation. submit is the fallback to IndexNow: the URL Submission API (SubmitUrlBatch, batches of 500) within the daily quota read from GetUrlSubmissionQuota on every --send; URLs over the quota are reported and left to IndexNow. Without --send it only prints what would go. The key is BING_WEBMASTER_API_KEY, from the environment only, sent as the apikey parameter the API requires and masked in every message; indexgap integrations --send checks it for free with GetUserSites. Endpoints, fields and sources are in indexgap/data/bing.json. The Copilot / AI Performance report has no API method and no export sample yet, so it is not supported.

Usage

usage: indexgap bing [-h] [--config CONFIG] [--site SITE] [--out-dir OUT_DIR]
                     [--urls urls.txt] [--changed] [--source {sitemap,git}]
                     [--sitemap SITEMAP] [--since SINCE] [--fetch] [--online]
                     [--send]
                     {pull,submit}

positional arguments:
  {pull,submit}         pull — export the console's data; submit — send URLs

options:
  -h, --help            show this help message and exit
  --config CONFIG       path to indexgap.json; by default looked up in the
                        current directory and above
  --site SITE           the site address as registered in Bing Webmaster
                        Tools; by default from indexgap.json
  --out-dir OUT_DIR     pull: where to put bing-queries.csv, bing-pages.csv
                        and bing-crawl-issues.csv
  --urls urls.txt       submit: a list of URLs, one per line
  --changed             submit: changed URLs, as in indexnow push --changed
  --source {sitemap,git}
                        submit --changed: where changes come from; sitemap by
                        default
  --sitemap SITEMAP     submit --changed: the build's sitemap.xml
  --since SINCE         submit --changed: a date YYYY-MM-DD or a git revision
  --fetch               allow downloading the sitemap from a URL
  --online              turn on every network read of this command: --fetch.
                        Writes nothing to outside services — only --send does
                        that
  --send                submit: really send; without it — a dry run

The rest of the pipeline

← indexnow · skills →