fix(search): drop Enterprise fields from the text search field mask (closes #18) #27

Merged
csaeum merged 1 commit from fix/text-search-field-mask into main 2026-11-19 15:32:31 +00:00
Owner

Decision

TEXT_SEARCH_FIELD_MASK no longer requests places.rating and places.userRatingCount.

  • Google's current Text Search (New) and data-fields pages list both fields under the Enterprise SKU; id, displayName, formattedAddress and businessStatus are Pro. The highest-priced requested field decides the SKU of the whole request, so the text search now bills as Pro (5,000 free calls per month instead of 1,000).
  • Nothing is lost: the values were only a fallback in lead_from_place(), the rating is always taken from Place Details (DETAILS_FIELD_MASK keeps rating/userRatingCount). The duplicate filter and the CLOSED_PERMANENTLY filter only need businessStatus and id, which stay.
  • Not yet confirmed in the Cloud Console: the billing report has no SKU data yet (costs appear after hours, and free usage shows no cost lines). To check later: Billing > Reports > group by SKU.

Test (demo site)

Run LSR-2026-00006 (Polsterei, Augsburg, limit 5): 5 leads created, 1 skipped, 7 requests (1 text search + 6 details). All 5 leads have custom_google_rating, the origin note still shows rating and review count.

🤖 Generated with Claude Code

## Decision `TEXT_SEARCH_FIELD_MASK` no longer requests `places.rating` and `places.userRatingCount`. - Google's current Text Search (New) and data-fields pages list both fields under the Enterprise SKU; `id`, `displayName`, `formattedAddress` and `businessStatus` are Pro. The highest-priced requested field decides the SKU of the whole request, so the text search now bills as Pro (5,000 free calls per month instead of 1,000). - Nothing is lost: the values were only a fallback in `lead_from_place()`, the rating is always taken from Place Details (`DETAILS_FIELD_MASK` keeps `rating`/`userRatingCount`). The duplicate filter and the `CLOSED_PERMANENTLY` filter only need `businessStatus` and `id`, which stay. - Not yet confirmed in the Cloud Console: the billing report has no SKU data yet (costs appear after hours, and free usage shows no cost lines). To check later: Billing > Reports > group by SKU. ## Test (demo site) Run `LSR-2026-00006` (Polsterei, Augsburg, limit 5): 5 leads created, 1 skipped, 7 requests (1 text search + 6 details). All 5 leads have `custom_google_rating`, the origin note still shows rating and review count. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(search): drop Enterprise fields from the text search field mask (closes #18)
All checks were successful
CI / lint (pull_request) Successful in 7s
CI / tests (pull_request) Successful in 7s
CI / abhaengigkeiten (pull_request) Successful in 17s
CI / abhaengigkeiten-ner (pull_request) Successful in 24s
CI / sicherheit (pull_request) Successful in 40s
CI / lint (push) Successful in 7s
CI / tests (push) Successful in 7s
CI / abhaengigkeiten (push) Successful in 23s
CI / abhaengigkeiten-ner (push) Successful in 26s
CI / sicherheit (push) Successful in 40s
60e3d500d8
rating and userRatingCount are Enterprise SKU fields (1,000 free calls per
month); without them the text search bills as Pro (5,000 free per month).
The rating still comes from Place Details.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
csaeum merged commit fe85cdcf50 into main 2026-11-19 15:32:31 +00:00
csaeum deleted branch fix/text-search-field-mask 2026-11-19 15:32:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Frappe-Projekte/LeadScraper-Google!27
No description provided.