search-logs
Search Datadog logs by query with time range filtering. Filter by service, status, or custom fields, control sort order, and limit results.
Instructions
Search Datadog logs by query with time range filtering
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Datadog log query. Example: service:web-api status:error @http.status_code:[500 TO 599] | |
| from | Yes | Start time (ISO 8601). Example: 2026-02-26T00:00:00Z | |
| to | Yes | End time (ISO 8601). Example: 2026-02-26T23:59:59Z | |
| limit | No | Max results (default 50, max 1000) | |
| sort | No | Sort order: -timestamp (newest first) or timestamp (oldest first) | -timestamp |
| indexes | No | Log indexes to search. Example: ["main"] | |
| extractFields | No | Comma-separated dotted paths to project from response (e.g. 'id,name,owner.name,columns.*.name'). Use `*` as wildcard for arrays/objects. Wrap field names with dots in backticks. Reduces response tokens dramatically on large entities. |