Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Google Search API] Disable AI overview result #2161

Open
hilmanski opened this issue Nov 21, 2024 · 2 comments
Open

[Google Search API] Disable AI overview result #2161

hilmanski opened this issue Nov 21, 2024 · 2 comments
Labels
status: triage Review and triage needed type: feature Something new to build

Comments

@hilmanski
Copy link

hilmanski commented Nov 21, 2024

An enterprise customer asked for an option to disable the AI overview result.

The real issue is with the HTML view since they need to screenshot it for internal records.

Internal links: Front

@hilmanski hilmanski added status: triage Review and triage needed type: feature Something new to build labels Nov 21, 2024
@dsojevic
Copy link

dsojevic commented Nov 21, 2024

@hilmanski, if there are any particular elements that they would like removed from the HTML before taking screenshots, they could do the following:

  1. Load the .xray format (still HTML, but with additional markup) instead of the .html format
    e.g. https://serpapi.com/searches/<search-id>.xray?api_key=<api-key>
    e.g. https://serpapi.com/searches/<token>/<search-id>.xray
  2. Prior to rendering the HTML (or prior to screenshotting if able to action this in browser), use a CSS selector to find the following element: [xray-json-path="ai_overview"]
  3. Delete the element if found
  4. Render + screenshot

This approach can be extended to remove any other blocks that we parse that they may not want in a screenshot.

@hilmanski
Copy link
Author

Thanks, @dsojevic . I'll share this with the customer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage Review and triage needed type: feature Something new to build
Projects
None yet
Development

No branches or pull requests

2 participants