Loki HTTP API

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.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/loki-http-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

API entry from apis.yml

apis.yml Raw ↑
aid: grafana-loki:loki-http-api
name: Loki HTTP API
description: 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.
humanURL: https://grafana.com/docs/loki/latest/reference/loki-http-api/
baseURL: http://{loki-host}:3100
tags:
- Logs
- Logging
- Observability
- LogQL
- OpenTelemetry
properties:
- type: Documentation
  url: https://grafana.com/docs/loki/latest/
- type: APIReference
  url: https://grafana.com/docs/loki/latest/reference/loki-http-api/
- type: GettingStarted
  url: https://grafana.com/docs/loki/latest/get-started/
- type: Protobuf
  url: grpc/grafana-loki-push.proto
  name: Loki Pusher service (proto3)
- type: Protobuf
  url: grpc/grafana-loki-logproto.proto
  name: Loki Querier and StreamData services (proto3)
- type: Protobuf
  url: grpc/grafana-loki-rules.proto
  name: Loki ruler rule group messages (proto3)