Search Settings

Customize web search behavior by using the search_settings parameter. This parameter allows you to exclude specific domains from search results or restrict searches to only include specific domains. These parameters are supported for both compound-beta and compound-beta-mini.

ParameterTypeDescription
exclude_domainsstring[]List of domains to exclude when performing web searches. Supports wildcards (e.g., "*.com")
include_domainsstring[]Restrict web searches to only search within these specified domains. Supports wildcards (e.g., "*.edu")
countrystringBoost search results from a specific country. This will prioritize content from the selected country in the search results.
Supported Countries

afghanistan, albania, algeria, andorra, angola, argentina, armenia, australia, austria, azerbaijan, bahamas, bahrain, bangladesh, barbados, belarus, belgium, belize, benin, bhutan, bolivia, bosnia and herzegovina, botswana, brazil, brunei, bulgaria, burkina faso, burundi, cambodia, cameroon, canada, cape verde, central african republic, chad, chile, china, colombia, comoros, congo, costa rica, croatia, cuba, cyprus, czech republic, denmark, djibouti, dominican republic, ecuador, egypt, el salvador, equatorial guinea, eritrea, estonia, ethiopia, fiji, finland, france, gabon, gambia, georgia, germany, ghana, greece, guatemala, guinea, haiti, honduras, hungary, iceland, india, indonesia, iran, iraq, ireland, israel, italy, jamaica, japan, jordan, kazakhstan, kenya, kuwait, kyrgyzstan, latvia, lebanon, lesotho, liberia, libya, liechtenstein, lithuania, luxembourg, madagascar, malawi, malaysia, maldives, mali, malta, mauritania, mauritius, mexico, moldova, monaco, mongolia, montenegro, morocco, mozambique, myanmar, namibia, nepal, netherlands, new zealand, nicaragua, niger, nigeria, north korea, north macedonia, norway, oman, pakistan, panama, papua new guinea, paraguay, peru, philippines, poland, portugal, qatar, romania, russia, rwanda, saudi arabia, senegal, serbia, singapore, slovakia, slovenia, somalia, south africa, south korea, south sudan, spain, sri lanka, sudan, sweden, switzerland, syria, taiwan, tajikistan, tanzania, thailand, togo, trinidad and tobago, tunisia, turkey, turkmenistan, uganda, ukraine, united arab emirates, united kingdom, united states, uruguay, uzbekistan, venezuela, vietnam, yemen, zambia, zimbabwe

Domain Filtering with Wildcards

Both include_domains and exclude_domains support wildcard patterns using the * character. This allows for flexible domain filtering:

  • Use *.com to include/exclude all .com domains
  • Use *.edu to include/exclude all educational institutions
  • Use specific domains like example.com to include/exclude exact matches

You can combine both parameters to create precise search scopes. For example:

  • Include only .com domains while excluding specific sites
  • Restrict searches to specific country domains
  • Filter out entire categories of websites

Search Settings Examples

shell
curl "https://api.groq.com/openai/v1/chat/completions" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${GROQ_API_KEY}" \
  -d '{
         "messages": [
           {
             "role": "user",
             "content": "Tell me about the history of Bonsai trees in America"
           }
         ],
         "model": "compound-beta-mini",
         "search_settings": {
           "exclude_domains": ["wikipedia.org"]
         }
       }'

Was this page helpful?