Zum Inhalt springen
DeutschlandGPT

Search the web

Runs a live web search and returns ranked results (title, URL, snippet).

Billed at a flat rate per request regardless of how many results are returned. See Models & pricing.

POSThttps://api.deutschlandgpt.de/v2/search

Example request

curl https://api.deutschlandgpt.de/v2/search \
  -X POST \
  -H "Authorization: Bearer $DGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "latest EU AI regulation",
  "count": 10,
  "country": "DE",
  "search_lang": "de",
  "model": "web-search"
}'

Request body

querystringrequired

The search query.

countintegeroptional

Maximum number of results to return (1–20). Does not affect billing.

countrystringoptional

Two-letter country code to localize results.

search_langstringoptional

Language code for the results.

modelstringoptional

Web-search model ID.

Response

200application/json
{
  "object": "web_search",
  "model": "string",
  "query": "string",
  "data": [
    {
      "title": "string",
      "url": "string",
      "description": "string",
      "age": "string"
    }
  ],
  "usage": {
    "queries": 0
  }
}

Web search results

objectstring
modelstring
querystring
dataobject[]
titlestring
urlstring
descriptionstring
agestring
usageobject
queriesinteger

Response codes

200

Web search results

object
400

Invalid request

401

Unauthorized

402

Insufficient credits

404

Model not found

502

Web search failed

Was this page helpful?