This repository was archived by the owner on Dec 20, 2025. It is now read-only.
google-sr@6.0.0 #101
typicalninja
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This release introduces significant improvements to existing parsers, adds new parsing capabilities, and includes a range of internal and API-level changes that enhance the library's performance and usability.
View the full changelog
Special thanks to our new contributor @tresorama for their valuable contributions to this release!
Breaking changes
Replace Axios with native fetch by @typicalninja (#76)
We've removed the Axios dependency in favor of the native Fetch API. This change reduces bundle size and improves compatibility across environments, including modern runtimes like Deno and Bun.
The
requestConfigoption now uses theRequestOptionsinterface (extendingRequestInit) instead ofAxiosRequestConfig.requestConfig: { - params: { safe: "active" } + queryParams: { safe: "active" } }Rename
CurrencyResulttoUnitConversionResultby @typicalninja (#79)The original
CurrencyResultselector was found to work effectively for all types of conversion queries: currency, distance, weight, temperature, and more, not just currency conversions. This rename better captures its full functionality and provides a more accurate representation of its capabilities.CurrencyResult→UnitConversionResultCurrencyResultNode→UnitConversionResultNodeResultTypes.CurrencyResult→ResultTypes.UnitConversionResultRename
strictSelectortonoPartialResultsby @typicalninja (#80)The
strictSelectoroption has been renamed tonoPartialResultsfor improved clarity and to better describe its functionality. The behavior remains unchanged.Parser and result type API renamed for clarity by @typicalninja (#85)
We've clarified the core API terminology to eliminate confusion and improve developer experience:
ResultSelector→ResultParserresultTypes→parsersThis change better reflects the purpose of each component, improving readability and maintainability.
Improved type safety and parser consistency by @typicalninja (#92)
This release brings essential type improvements across all parsers. Key enhancements include:
noPartialResultsundefined(breaking change if you previously relied on empty string values)OrganicResultNode.descriptionis now optional by @typicalninja (#93)In real-world search results, not all organic entries contain a description. To reflect this, the
OrganicResultNode.descriptionfield is now explicitly optional and may be undefined.Removed
ResultNodeTyperhelper by @typicalninja (#73)The old
ResultNodeTyperutility has been removed to simplify the typing model. You can now define custom result node types with a plain interface. This is primarily an internal change, but if you have custom selectors using this type, you'll need to update them.What's new
Google News parser by @tresorama (#71)
Add support for parsing results from the Google News tab (
tbm=nws).Related Searches parser by @typicalninja (#96)
Adds support for parsing result from the "Related searches" section.
google-sr is now available on jsr.io
You can find it here: https://jsr.io/@typical/google-sr
Improvements
Add thumbnail URL parsing to
NewsResultby @typicalninja (#89)The
NewsResultparser now extracts the thumbnail URL when available.OrganicResult now includes
sourceandisAdproperties by @typicalninja (#90)The
OrganicResultNodenow contains:source: A human-readable domain name for the resultisAd: Boolean to detect whether a result is sponsoredNote: The
isAdproperty implementation is based on reference data obtained through browser testing, as Google did not return sponsored ads during our automated testing withgoogle-sr. If you encounter any issues with ad detection, please create an issue for help.Other small fixes
Fixed
delayoption insearchWithPagesby @typicalninja (#98)The
delayoption insearchWithPagesnow functions correctly, applying the specified delay between paginated requests to prevent rate limiting issues.Early exit optimization when
noPartialResultsistrueby @typicalninja (#83)When
noPartialResultsis enabled, parsers now exit immediately upon encountering unusable or empty data. This optimization prevents unnecessary processing when complete result properties are required.Dependency maintenance
All dependencies and development dependencies have been updated to their latest stable versions.
CJS / ESM Notice
Starting in version 7.x (subject to change), we plan to publish ESM-only releases and remove the CJS build. As a result, you will no longer be able to use
require()to import this package; you must useimportinstead.Check the readme for more information
Questions? Feedback? Open an issue or start a discussion.
View the full changelog • See all commits for this release
Like the project? Star it on GitHub ★
This discussion was created from the release google-sr@6.0.0.
Beta Was this translation helpful? Give feedback.
All reactions