Bulk

Bulk search can be used when requesting a bigger volume of events and avoid paging.

Bulk is available for pro users only. See our various plans to get access.
nameplacementcomment
api-keyheaderYour API key
qurl parameterMust be an url encoded search query
1#!/usr/bin/env bash
 2API_KEY="YOUR_API_KEY"
 3QUERY='+plugin:"ElasticSearchOpenPlugin"'
 4
 5curl -G \
 6  -H "api-key: ${API_KEY}" \
 7  --data-urlencode "q=${QUERY}" \
 8  -o results.json \
 9  "https://leakix.net/bulk/search"
 
 1from leakix import Client
  2from leakix.query import RawQuery
  3
  4client = Client(api_key="YOUR_API_KEY")
  5
  6query = RawQuery('+plugin:"ElasticSearchOpenPlugin"')
  7
  8# Stream results (memory efficient)
  9for aggregation in client.bulk_export_stream([query]):
 10    for event in aggregation.events:
 11        print(event.ip, event.host)
 

Receiving 200 means the request was successful and a JSONL file containing l9events is returned.

All requests to LeakIX.net's API are limited at ~1 request per second.

If the limit is reached, the API will return a 429 http status code and a x-limited-for header.

The client MUST wait for the duration of x-limited-for before the next request.

1HTTP/1.1 429 Rate-limited
2Date: Mon, 27 Jul 2009 12:28:53 GMT
3x-limited-for: 344.24ms