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
.
Parameter | Type | Description |
---|---|---|
exclude_domains | string[] | List of domains to exclude when performing web searches. Supports wildcards (e.g., "*.com") |
include_domains | string[] | Restrict web searches to only search within these specified domains. Supports wildcards (e.g., "*.edu") |
country | string | Boost search results from a specific country. This will prioritize content from the selected country in the search results. |
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
Both include_domains
and exclude_domains
support wildcard patterns using the *
character. This allows for flexible domain filtering:
*.com
to include/exclude all .com domains*.edu
to include/exclude all educational institutionsexample.com
to include/exclude exact matchesYou can combine both parameters to create precise search scopes. For example:
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"]
}
}'