Documentation

API URL


POST /api/v1/web-search/search (GET single, POST batch)

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
GET https://datpaq.com/api/v1/web-search/search?q=JavaScript&limit=5&api_key=your-api-key

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "query": "JavaScript",
  "abstract": "JavaScript",
  "abstractText": "JavaScript is a high-level, interpreted programming language...",
  "abstractUrl": "https://en.wikipedia.org/wiki/JavaScript",
  "abstractSource": "Wikipedia",
  "relatedTopics": [
    {
      "text": "ECMAScript",
      "url": "https://duckduckgo.com/ECMAScript"
    }
  ],
  "results": [],
  "fromCache": false,
  "provider": "duckduckgo",
  "metadata": {
    "correlationId": "req_abc123",
    "timestamp": "2026-10-14T12:00:00.000Z",
    "processingTime": "42ms",
    "api_token_name": null,
    "rate_limit": {
      "limit": null,
      "remaining": null,
      "reset": null
    }
  },
  "updatedAt": "2026-10-14T12:00:00.000Z"
}

Error Response

Example
Code
HTTP 400 ValidationError: Missing/invalid q queries or limit — Request rejected before upstream call; HTTP 401 AuthenticationError: Gateway authentication failure — Request rejected due to missing or invalid API credentials; HTTP 404 NotFound: Unknown endpoint path — Request path does not map to available web-search routes; HTTP 429 RateLimitError: More than 120 API requests per client in 15 minutes — Request rejected by service rate limiter; HTTP 429 LookupBudgetExceeded: More than 120 upstream lookup units per identity in 15 minutes (one unit per query including cache hits) — Request rejected before upstream lookups; HTTP 502 UpstreamUnavailable: DuckDuckGo API failed or timed out — Search provider unavailable; HTTP 500 InternalError: Unexpected search failure — Search could not complete

Last Updated:  May 4, 2026