POST
/
api
/
v1
/
web_search
Web Search API
curl --request POST \
  --url https://api.llmlayer.dev/api/v1/web_search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "search_type": "general",
  "location": "us",
  "recency": "hour",
  "domain_filter": [
    "<string>"
  ]
}'
{
"results": [
{}
],
"cost": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Format: Bearer YOUR_LLMLAYER_API_KEY

Body

application/json
query
string
required

The search query

search_type
enum<string>
default:general

Type of search to perform

Available options:
general,
news,
shopping,
videos,
images,
scholar
location
string
default:us

Country code for localized results

recency
enum<string> | null

Filter by time period

Available options:
hour,
day,
week,
month,
year
domain_filter
string[] | null

Include/exclude domains (prefix with '-' to exclude)

Response

Search results

results
object[]

Search results (structure varies by search_type)

cost
number

Cost in USD ($0.001 for most, $0.002 for shopping)