Skip to main content
Protecting your users from explicit content is a first-class concern for any search application, especially those that serve children, students, or workplace audiences. The Custom Search JSON API provides a safe parameter that maps directly to Google’s SafeSearch technology — the same system that powers Safe Search in Google Search. This guide explains the two available values, their default behavior, when to use each, and what compliance considerations apply when your application is accessible to minors.

The safe parameter

Add safe to any Custom Search API request to control how Google’s SafeSearch filter is applied to results.
The default behavior when safe is omitted is equivalent to safe=off — no filtering is applied. Always set safe=active explicitly if your application serves audiences that should not see adult content.

When to use safe=active

Use safe=active whenever any of the following conditions apply:
  • Your application is accessible to minors. Schools, children’s content platforms, and family-oriented services must filter explicit content to comply with laws such as COPPA (US), GDPR-K (EU), and KOSA (US).
  • Your application is used in a workplace or institutional context. Many organizations have acceptable-use policies that prohibit explicit content on corporate networks and devices.
  • Your application is a general-purpose search tool with a public, unverified audience. When you cannot confirm users are adults, defaulting to active is the safer choice.
  • You are embedding search into an app store listing or marketplace that prohibits adult content in user-accessible features.

When to use safe=off

Use safe=off only when you have verified that your application:
  • Serves an adult audience that has actively opted in to or acknowledged the possibility of explicit content.
  • Is an age-verified platform with appropriate legal safeguards (e.g., 18+ verification, content warnings, and terms of service that address adult content).
  • Requires unfiltered results for legitimate research, journalism, or academic purposes where excluding explicit content would compromise result accuracy.
Leaving safe unset (which defaults to off) in an application accessible to children may violate applicable laws and your platform’s terms of service. Be explicit — set safe=active as the default in any application where user age is unknown or unverified.

Adding safe to your requests

Applying Safe Search to image searches

Safe Search is especially important for image results, where explicit content is more immediately visible. Set both searchType=image and safe=active together:
Even with safe=active, you should implement client-side image loading safeguards — such as lazy loading with explicit dimensions and a placeholder — to prevent layout shifts and inadvertent rendering of images that slip past any filter.

Compliance considerations for apps serving minors

If your application is directed at children under 13 (US) or under 16 (EU), or if it is a general-purpose tool that children can access, be aware of the following:
COPPA applies to websites and online services directed at children under 13 that collect personal information. While COPPA primarily governs data collection, the FTC expects operators to take reasonable steps to provide a safe environment. Enabling safe=active is a baseline measure consistent with this expectation. Consult legal counsel for full COPPA compliance requirements.
The EU GDPR and the UK’s Children’s Code (Age Appropriate Design Code) require online services likely to be accessed by children to apply a “best interests of the child” standard by default. This includes protecting children from harmful content. Setting safe=active by default is consistent with this standard.
Both Apple and Google require that apps rated for general audiences or children include appropriate content filtering. If your app is rated 4+ (Apple) or Everyone (Google Play), you must prevent access to adult content. Enabling safe=active is a necessary (but not sufficient) step — also review your app’s content rating and parental controls documentation.
The Children’s Internet Protection Act (CIPA) requires US schools and libraries that receive E-rate funding to implement internet filtering. If you are deploying a search tool in a school context, safe=active should be mandatory and ideally non-overridable by students. Consider removing any UI controls that would let users toggle Safe Search off.

Locking Safe Search in your UI

If your application serves an audience where safe search must always be on, don’t expose a toggle. Set safe=active server-side and omit any front-end controls that would allow users to change the setting:
Even if a user modifies their browser request to omit the safe parameter or set it to off, your backend proxy layer should always re-apply safe=active before forwarding the request to the Google API. Never pass through user-controlled values for the safe parameter in child-safe applications.

Summary

Next steps

Build a Search App

See Safe Search wired into a complete end-to-end search application.

Localization

Combine Safe Search with language and region settings for a fully controlled experience.