# Changelog of Bing Search Scraper (`searchapi/bing-search-scraper`) Actor

- **URL**: https://apify.com/searchapi/bing-search-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/searchapi/bing-search-scraper.md

## Changelog

### Unreleased

#### Fixed

- `apify run --purge` now falls back to the checked-in sample input when local storage contains an empty input object.
- Consolidated duplicate dataset-view definitions into the standalone, CLI-validated JSON Schema file.
- Added required common output fields and restored the full-details dataset view.
- Corrected the README from 72 claimed fields to the 54 source-backed fields implemented by the Actor.
- Pinned patched transitive releases for `brace-expansion`, `ip-address`, and `nanoid`.
- Restored the `latest` build tag so default cloud calls use the newly validated release.

#### Verified

- A fresh 50-record local run completed in 38.7 seconds with no failed requests.
- Minimal, invalid, URL-mode, filtered two-page, `maxItems`, duplicate, URL, and empty-field behavior were exercised locally.

### \[2.0.1] - 2026-06-13

#### Verified

- End-to-end local run with `query="artificial intelligence"`, `maxItems=50` produced **50/50 unique records** in ~5s with zero failed requests.
- 100% fill rate on: `title`, `link`, `url`, `displayUrl`, `domain`, `snippet`, `searchQuery`, `searchUrl`, `hostPageUrl`, `hostPageDomain`, `position`, `resultType`.
- 60% (30/50) on `publishedAt` — only results with visible date strings (e.g. "2 days ago") get ISO dates; the remaining records lack a date in the SERP.
- `rating`, `ratingCount`, `price` are sparse by design — Bing only surfaces these for product/local-result cards.
- No code changes required for the \[2.0.0] release; selectors and extraction logic are already current with the Bing web SERP DOM.

### \[2.0.0] - 2026-06-12

#### Added

- **Expanded field coverage**: 12 → 35+ fields per record, capturing the full Bing SERP surface
- New universal fields: `titleHtml`, `snippetHtml`, `emphasis` (bolded words), `breadcrumbs`, `publishedAt` (ISO 8601), `publishedAtRaw`, `relativeTime`, `thumbnail`, `additionalInfo`, `searchUrl`, `searchMetadata` (engine/market/country/language/page), `scrapedAt`
- New optional fields: `rating`, `ratingCount`, `price`, `priceNumeric`, `currency`
- **PAA (People Also Ask)** extractor with `questions[]` array
- **Total result count** extracted from `.b_paginate` and included in `searchMetadata.totalResults`
- **Featured snippet HTML** preserved alongside text
- **Site name** surfaced from `.tptt` element (e.g. "microsoft.com")
- **Short-form relative date parsing** ("3d ago", "2h ago")
- **Shared canonical normalizer** at `_canonical/normalize.js` for field harmonization

#### Changed

- `query` → `searchQuery` (renamed for consistency across actors)
- `displayUrl` → `displayUrl` (kept; type now string)
- `domain` now derived from `link` in normalizer
- Records now include `type` / `resultType` discriminator (`organic`, `featuredSnippet`, `paa`, `relatedSearch`)
- Pagination correctly resets `position` counter per page using `first=N` URL param

#### Fixed

- Duplicate `mode` key in `src/schema/input.js` (was causing silent input corruption)
- Hard-coded `totalPushed` / `globalPosition` closure state — now uses `state` object

### \[1.0.0] - 2025-07-01

#### Added

- Initial release of the actor
- Full README documentation with usage examples and field descriptions
- Input schema with validation for all parameters
- Dataset output schema defining all output fields
- Structured source layout: `src/main.js`, `src/routes/handlers.js`, `src/routes.js`, `src/errors/`

#### Changed

- Dockerfile updated: all `COPY` commands use `--chown=myuser` to prevent EACCES build errors
- Removed `postinstall: npx crawlee install-playwright-browsers` (browsers pre-installed in base image)
- `playwright` kept in `dependencies` (not devDependencies) for correct runtime import resolution

#### Fixed

- Build reliability: resolved `EACCES: permission denied, open '/home/myuser/package-lock.json'` on Apify Cloud (exit code 243)
