Skip to content

Add support for Google Safe Search parameter#187

Open
by22Jy wants to merge 1 commit intobisohns:masterfrom
by22Jy:add-safe-search-parameter
Open

Add support for Google Safe Search parameter#187
by22Jy wants to merge 1 commit intobisohns:masterfrom
by22Jy:add-safe-search-parameter

Conversation

@by22Jy
Copy link

@by22Jy by22Jy commented Feb 17, 2026

Description

This PR adds support for Google's Safe Search feature by including the safe parameter in the extra parameters list.

Fixes #126

Changes Made

  • Added 'safe' to the EXTRA_PARAMS tuple in google.py
  • The parameter is optional and only added to the URL when explicitly provided

Usage

from search_engine_parser.core.engines.google import Search

gsearch = Search()
results = gsearch.search("example query", page=1, safe="active")

Benefits

  • Enables safe search filtering for Google queries
  • Follows the same pattern as existing extra parameters (hl, tbs)
  • No breaking changes - parameter is optional

- Add 'safe' to EXTRA_PARAMS tuple to allow safe search filtering
- Users can now pass safe='active' to enable safe search
- Resolves bisohns#126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Safe Search

1 participant