# Loki HTTP API

**Canonical:** https://apis.io/apis/grafana-loki/loki-http-api/  
**Provider:** Grafana Loki — https://apis.io/providers/grafana-loki/  
**Base URL:** http://{loki-host}:3100  
**Documentation:** https://grafana.com/docs/loki/latest/reference/loki-http-api/

Loki HTTP API is one of 3 APIs that [Grafana Loki](https://apis.io/providers/grafana-loki/) publishes on the [APIs.io](https://apis.io/) network. Tagged areas include Logs, Logging, Observability, LogQL, and OpenTelemetry. The published artifact set on APIs.io includes API documentation, an API reference, and a getting-started guide.

The Grafana Loki HTTP API — 40 documented endpoints for pushing logs (native and OTLP), querying with LogQL over instants and ranges, discovering labels, series, patterns and detected fields, streaming a live tail over WebSocket, managing Prometheus-shaped alerting and recording rule groups, submitting and cancelling log deletion requests, and reading component status and ring state. Loki is self-hosted software, so the base host is whichever address the operator binds; the documented default port is 3100 and TLS is terminated by the operator or a fronting proxy. Authorization is explicitly not part of this API.

## Machine-readable artifacts (7)

- **Documentation** — https://grafana.com/docs/loki/latest/
- **APIReference** — https://grafana.com/docs/loki/latest/reference/loki-http-api/
- **GettingStarted** — https://grafana.com/docs/loki/latest/get-started/
- **Protobuf** — https://raw.githubusercontent.com/api-evangelist/grafana-loki/refs/heads/main/grpc/grafana-loki-push.proto
- **Protobuf** — https://raw.githubusercontent.com/api-evangelist/grafana-loki/refs/heads/main/grpc/grafana-loki-logproto.proto
- **Protobuf** — https://raw.githubusercontent.com/api-evangelist/grafana-loki/refs/heads/main/grpc/grafana-loki-rules.proto
- **APIsJSON** — https://raw.githubusercontent.com/api-evangelist/grafana-loki/refs/heads/main/apis.yml

## Other Grafana Loki APIs (2)

- [Grafana Cloud Logs API](https://apis.io/apis/grafana-loki/grafana-cloud-logs-api/)
- [Grafana MCP Server — Loki tools](https://apis.io/apis/grafana-loki/grafana-mcp-loki-tools/)

## Tags

Logs, Logging, Observability, LogQL, OpenTelemetry

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/grafana-loki/loki-http-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/grafana-loki/.
