Prometheus Endpoint Extractor avatar

Prometheus Endpoint Extractor

Pricing

from $0.35 / 1,000 metric series rows

Go to Apify Store
Prometheus Endpoint Extractor

Prometheus Endpoint Extractor

Point at any Prometheus HTTP API v1 server (Prometheus, Thanos, Mimir, VictoriaMetrics, Grafana Agent) and export PromQL query results, range series, label values, scrape targets, rules, metric metadata and build info as clean rows. One actor over every Prometheus-compatible server.

Pricing

from $0.35 / 1,000 metric series rows

Rating

0.0

(0)

Developer

Datamule

Datamule

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Share

Point at any Prometheus HTTP API and export the data as clean, tabular rows. One actor works against every server that speaks the Prometheus HTTP API v1 — Prometheus itself, Thanos, Cortex/Mimir, VictoriaMetrics, Grafana Agent, and any Prometheus-compatible TSDB. Give it a base URL and a mode; get back rows you can pipe into a sheet, a dataset, a webhook, or another tool.

No PromQL client, no Grafana, no per-server scraper. Just the standard API, turned into structured data.

What it does

Nine extraction modes, each turning a Prometheus endpoint into flat rows:

ModeEndpointOne row per…
query (default)/api/v1/queryseries in an instant PromQL result (metric + labels + value + timestamp)
query_range/api/v1/query_rangeseries over a time window, with the full values array
series/api/v1/seriesseries (label set) matching a selector
labels/api/v1/labelslabel name known to the server
label_values/api/v1/label/<name>/valuesvalue of a label (default __name__ = every metric name)
targets/api/v1/targetsscrape target (job, instance, health, last error, last scrape)
rules/api/v1/rulesrecording / alerting rule (group, state, query, health)
metadata/api/v1/metadatametric's metadata (type / unit / help)
buildinfo/api/v1/status/buildinfoserver (version / revision / branch / Go version)

Example input

{
"sources": ["https://demo.promlabs.com"],
"mode": "query",
"query": "up"
}

Run a PromQL expression across several servers at once:

{
"sources": [
"https://demo.promlabs.com",
"https://play.victoriametrics.com/select/0/prometheus"
],
"mode": "query",
"query": "sum by (job) (up)"
}

Enumerate every metric name (capped), sample a range, or list scrape targets:

{ "sources": ["https://demo.promlabs.com"], "mode": "label_values", "labelName": "__name__", "maxRecords": 500 }
{ "sources": ["https://demo.promlabs.com"], "mode": "query_range", "query": "rate(demo_api_request_duration_seconds_count[5m])", "step": "60" }
{ "sources": ["https://demo.promlabs.com"], "mode": "targets" }

Input reference

  • sources (required) — one or more Prometheus base URLs. Give the bare base (https://demo.promlabs.com) and the actor appends the right /api/v1 path per mode, or paste a full /api/v1/query URL. A reverse-proxy sub-path is honored (VictoriaMetrics' https://host/select/0/prometheus).
  • mode — one of the nine modes above (default query).
  • query — the PromQL expression for query / query_range (default up).
  • time — optional evaluation timestamp for query (RFC3339 or unix).
  • start / end / step — the range window for query_range (default: last 5 minutes at a 60s step).
  • match — one or more series selectors for series (required), labels, and label_values (e.g. up, {job="demo"}).
  • labelName — the label to enumerate in label_values (default __name__).
  • maxRecords — a global cap on emitted rows (each row is one event).
  • bearer / extraHeaders — optional auth for a gated server (never logged). extraHeaders also carries things like a Cortex/Mimir X-Scope-OrgID tenant header.

Output

Each row is a flat object with a shared schema across all modes — a _type / _mode tag, the metricName and full labels object where relevant, and the mode-specific columns (value/valueNum/timestamp for samples, targetJob/ targetHealth for targets, ruleName/ruleState for rules, and so on). The original API object is preserved losslessly in _raw. Prometheus sample values are kept as their exact string (value) with a best-effort numeric coercion (valueNum); non-finite tokens like NaN / +Inf stay lossless in value.

Example (query mode):

{
"_type": "sample",
"_mode": "query",
"_resultType": "vector",
"metricName": "up",
"labels": { "__name__": "up", "instance": "demo-service-2:10002", "job": "demo" },
"value": "1",
"valueNum": 1,
"timestamp": "2026-07-08T00:56:53.491Z"
}

Behavior & reliability

  • Multi-source, fault-tolerant. A source that is auth-gated, unreachable, rate-limited, or that doesn't implement the requested endpoint (some servers don't serve /targets) is skipped with a warning; the run continues.
  • Honest failures. An invalid PromQL expression makes the API return its in-band error ({"status":"error",...}); the actor surfaces that as a real failure rather than silently returning nothing. A valid query that matches nothing returns zero rows and a clean exit.

Pricing

Pay-per-event: you're charged per row emitted to the dataset. Point it at a single server or a whole fleet; use maxRecords to cap large enumerations (label_values on __name__, metadata).

Notes

This actor talks to the read side of the Prometheus HTTP API over plain HTTP(S) JSON. It needs network reach to the server you point it at (a public demo, an internal Prometheus behind a token, a hosted Thanos/Mimir/VictoriaMetrics endpoint). It does not require Grafana or any Prometheus client library.