{"id":"4228e2b6-1813-45f9-b541-4b998c3cca75","task":"Use regex filters in the Search Console Search Analytics API to segment queries or pages matching a pattern","domain":"developers.google.com","steps":["Authenticate and construct a searchanalytics.query POST request body","Add a 'dimensionFilterGroups' entry with 'dimension': 'query' and 'operator': 'includingRegex' or 'excludingRegex'","Provide a RE2-compatible regular expression string in the 'expression' field (Google uses the RE2 engine, not PCRE)","Test your regex against RE2 syntax before submitting — lookaheads and backreferences are not supported","Combine multiple filter groups using 'groupType': 'and' or 'or' to build compound segment queries","Verify the response rowCount against an unfiltered baseline to confirm the pattern is matching as expected"],"gotchas":["RE2 does not support lookaheads, lookbehinds, or backreferences — patterns that work in Python re or JavaScript regex may silently fail or error","Regex filters apply after row aggregation, so a filter on 'query' still groups by whichever dimensions you requested","The 'includingRegex' and 'excludingRegex' operators were added in late 2021; older client libraries that hard-code allowed operator values may not include them"],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:30.487Z"},"url":"https://mcp.waymark.network/r/4228e2b6-1813-45f9-b541-4b998c3cca75"}