POST
/
api
/
v1
/
search
Perform a web search
curl --request POST \
  --url https://api.llmlayer.dev/api/v1/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "model": "<string>",
  "location": "us",
  "system_prompt": "<string>",
  "response_language": "auto",
  "answer_type": "markdown",
  "search_type": "general",
  "json_schema": "<string>",
  "citations": false,
  "return_sources": false,
  "return_images": false,
  "date_filter": "anytime",
  "max_tokens": 1500,
  "temperature": 0.7,
  "domain_filter": [
    "<string>"
  ],
  "max_queries": 1,
  "provider_key": "<string>"
}'
{
  "llm_response": "<string>",
  "sources": [
    {
      "title": "<string>",
      "url": "<string>",
      "snippet": "<string>"
    }
  ],
  "images": [
    {
      "url": "<string>",
      "title": "<string>"
    }
  ],
  "response_time": "<string>",
  "input_tokens": 123,
  "output_tokens": 123,
  "llmlayer_cost": 123,
  "model_cost": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Use format: Bearer llm_xxxxxxxxxxxxx

Body

application/json

Response

200
application/json

Successful response

The response is of type object.