API - Check if Web Crawler is Running

Web Crawler
Web Crawler API

Check if Web Crawler is Running

Check whether the web crawler processes are currently active for a given index. Returns the current running state of the crawler.

Endpoint

GET https://opensolr.com/solr_manager/api/crawler_active

Parameters

ParameterStatusDescription
emailRequiredYour Opensolr registration email address
api_keyRequiredYour Opensolr API key
core_nameRequiredThe name of the index to check the crawler status for

Response

The response message contains CRAWLER IS READY when the crawler is not running (idle/paused), or a different status message when crawler processes are actively running.

Code Examples

cURL

curl -s "https://opensolr.com/solr_manager/api/crawler_active?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_solr_core"

PHP

$params = http_build_query([
    'email'     => 'YOUR_EMAIL',
    'api_key'   => 'YOUR_API_KEY',
    'core_name' => 'my_solr_core',
]);
$response = file_get_contents("https://opensolr.com/solr_manager/api/crawler_active?{$params}");
$result = json_decode($response, true);
if (strpos($result['msg'], 'CRAWLER IS READY') !== false) {
    echo "Crawler is idle/paused\n";
} else {
    echo "Crawler is running\n";
}

Python

import requests

response = requests.get("https://opensolr.com/solr_manager/api/crawler_active", params={
    "email": "YOUR_EMAIL",
    "api_key": "YOUR_API_KEY",
    "core_name": "my_solr_core",
})
data = response.json()
if "CRAWLER IS READY" in data.get("msg", ""):
    print("Crawler is idle/paused")
else:
    print("Crawler is running")

Related Documentation

Need help with the Opensolr Web Crawler? We are here to help.

Contact Support