REST API Reference

Complete reference for all API endpoints

Your Application </> HTTPS Encrypted Request Opensolr API HMAC Authenticated Response JSON { } 200 OK
Detailed API Documentation

This page is a quick reference for all Opensolr API endpoints. For in-depth documentation with request/response examples, error handling, and best practices, visit the Opensolr FAQ & Knowledge Base which contains dedicated articles for every endpoint.

Authentication

Every API request must be authenticated to prove that it comes from you, not an impersonator. Opensolr uses HMAC-signed requests — a standard, secure method where each request includes a cryptographic signature calculated from your API key.

Required Parameters

Every API call needs these two values, which you can find in your Opensolr dashboard under Account Settings:

ParameterDescriptionExample
emailYour Opensolr account email addressyou@example.com
api_keyYour secret API key (never share this publicly)63dd168fa950...

Example: Basic Authenticated Request

# Send a POST request with your credentials curl -X POST https://opensolr.com/api/get_index_list \ -d "email=you@example.com" \ -d "api_key=YOUR_API_KEY"
Keep your API key secret!

Your API key is like a password. Never put it in client-side JavaScript, public repositories, or anywhere visible to end users. Use environment variables or a secure secrets manager on your server.

API Endpoint Categories

The Opensolr API is organized into logical categories. Click any category below to jump to its detailed endpoint list.

Index Management

Create, delete, reset, reload, and replicate your Opensolr Indexes.

Document Operations

Commit changes, optimize, and delete documents from your index.

Web Crawler

Start, stop, and manage web crawls. Add or remove URLs from the crawl queue.

Data Ingestion

Upload and process documents (PDF, Word, HTML, etc.) into your index.

Vector / AI

Generate embeddings, perform vector searches, and get AI-powered summaries.

Backup & Restore

Create backups, restore from backups, and list available backup files.

Security

Manage HTTP authentication and IP whitelisting for your indexes.

Configuration

Upload, delete, and list configuration files for your Opensolr Indexes.

Index Management

These endpoints let you create, delete, reset, reload, replicate, and inspect your Opensolr Indexes programmatically.

MethodEndpointDescriptionKey Parameters
POST/api/create_indexCreate a new Opensolr Index with the specified name and configuration. Docsindex_name, plan
DELETE/api/delete_indexPermanently delete an Opensolr Index and all its data. Docsindex_name
POST/api/reset_indexWipe all documents from an index while keeping its configuration intact.index_name
POST/api/reload_coreReload an index to pick up configuration changes without downtime. Docsindex_name
POST/api/replicate_indexCreate a replica of an index on another server for high availability.index_name, target_server
GET/api/get_core_statusGet the current status of a specific index (document count, size, uptime).index_name
GET/api/get_index_listList all Opensolr Indexes in your account.
GET/api/get_envGet the server environment details for your index (hostname, version).index_name

Document Operations

Use these endpoints to commit pending changes, optimize index performance, and delete documents that match a query.

MethodEndpointDescriptionKey Parameters
POST/api/commitCommit all pending document additions/updates so they become searchable. Docsindex_name
POST/api/optimizeOptimize the index for faster search performance (merges segments). Docsindex_name
GET/api/optimize_statusCheck whether an optimization is currently running or completed.index_name
POST/api/delete_by_queryDelete all documents matching a Solr query (e.g. category:old).index_name, query

Web Crawler

The web crawler automatically visits your website, extracts content, and indexes it. These endpoints let you control crawl operations and manage the URL queue.

MethodEndpointDescriptionKey Parameters
POST/api/start_crawlStart a new crawl session for your website. Docsindex_name, seed_url
POST/api/stop_crawlStop a running crawl immediately. Docsindex_name
POST/api/pause_crawlPause a running crawl (can be resumed later).index_name
GET/api/crawler_activeCheck if a crawl is currently running for the given index.index_name
GET/api/crawl_schedule_statusGet the current crawl schedule configuration.index_name
GET/api/get_crawl_statsGet crawl statistics: pages crawled, errors, queue size.index_name
POST/api/add_crawl_url_signedAdd a URL to the crawl queue with HMAC signature verification.index_name, url, signature
DELETE/api/delete_crawler_urlRemove a specific URL from both the crawled and queued tables.index_name, url
POST/api/flush_crawl_bufferFlush the crawler's staging buffer, pushing all pending pages to the index.index_name

Data Ingestion

Data ingestion lets you upload files (PDF, Word, Excel, HTML, and more) which Opensolr automatically extracts text from and indexes. The ingestion queue processes files in the background.

MethodEndpointDescriptionKey Parameters
POST/api/ingestUpload a file for text extraction and indexing. Docsindex_name, file (multipart)
GET/api/ingest_statusCheck the status of a specific ingestion job.index_name, job_id
GET/api/ingest_queueList all items currently in the ingestion queue.index_name
POST/api/ingest_queue_actionPerform an action on a queued item (retry, cancel, prioritize).index_name, job_id, action
POST/api/ingest_run_nowImmediately process the next item in the ingestion queue.index_name

Vector / AI

These endpoints power Opensolr's AI capabilities. Generate vector embeddings from text, perform semantic (meaning-based) searches, and get AI-generated summaries of search results.

Your Text "best coffee shops" Vector Embedding [0.23, -0.81, 0.45, 0.12, -0.33, ...] 384 dimensions Semantic Results 1. Top Cafes in NYC 2. Espresso Guide 3. Latte Art Tips Ranked by meaning, not just keywords
MethodEndpointDescriptionKey Parameters
POST/api/embedGenerate a vector embedding from a single text string. Docstext, model (optional)
POST/api/batch_embedGenerate vector embeddings for multiple texts in one request.texts[], model (optional)
POST/api/embed_and_searchEmbed your query text and immediately search for similar documents.index_name, text, rows
POST/api/ai_summaryGet an AI-generated summary of search results for a query. Docsindex_name, query

Backup & Restore

Protect your data by creating backups that you can restore at any time. Backups capture the entire state of your index — documents, configuration, everything.

MethodEndpointDescriptionKey Parameters
POST/api/create_backupCreate a full backup of the specified index. Docsindex_name
POST/api/restore_backupRestore an index from a previously created backup file.index_name, backup_file
GET/api/get_backup_files_listList all available backup files for the specified index.index_name

Security

Protect your Opensolr Indexes with HTTP Basic Authentication (username/password) and IP address whitelisting. Only authorized users or servers can access your data.

MethodEndpointDescriptionKey Parameters
POST/api/update_http_authSet or update HTTP Basic Auth credentials for an index. Docsindex_name, username, password
POST/api/remove_http_authRemove HTTP Basic Auth from an index (makes it publicly accessible).index_name
POST/api/add_ipAdd an IP address to the whitelist for an index.index_name, ip
DELETE/api/delete_ipRemove an IP address from the whitelist.index_name, ip
GET/api/get_ip_listList all whitelisted IP addresses for the specified index.index_name

Configuration

Manage the Solr configuration files for your indexes. Upload custom schema files, synonyms, stopwords, and other config files.

MethodEndpointDescriptionKey Parameters
POST/api/upload_config_fileUpload a configuration file (e.g. synonyms.txt, schema.xml). Docsindex_name, file (multipart), filename
DELETE/api/delete_config_fileDelete a configuration file from your index.index_name, filename
GET/api/get_all_config_filesList all configuration files currently in your index.index_name

Rate Limits

To ensure fair usage and protect the platform for everyone, API requests are rate-limited. Limits are applied at three levels:

Per Minute Short burst protection Prevents runaway loops Per Hour Sustained traffic cap Smooths out load spikes Per Month Total usage budget Resets at billing cycle Exact limits depend on your plan — higher plans get higher limits
What happens when you hit a limit?

The API returns a 429 Too Many Requests response. Your application should wait and retry. The response includes a Retry-After header telling you exactly how many seconds to wait before trying again.

If you need higher limits for your use case, contact support@opensolr.com — custom rate limits are available for Enterprise plans and on a case-by-case basis. You can also monitor your current usage programmatically via the Traffic Monitoring API.

Error Responses

When something goes wrong, the API returns a standard HTTP status code along with a JSON body explaining the error. Here are the most common ones:

HTTP CodeMeaningWhat to Do
200Success — your request was processed correctly.Parse the JSON response body for your data.
400Bad Request — your request is missing required parameters or has invalid values.Check the error message in the response. Fix your request parameters.
401Unauthorized — your email or API key is incorrect.Double-check your credentials. Make sure they match what is in your dashboard.
403Forbidden — you do not have permission for this action (e.g., wrong index owner).Verify you are using the correct account and that you own the index.
404Not Found — the endpoint or resource does not exist.Check the endpoint URL for typos. Verify the index name exists.
429Too Many Requests — you have exceeded your rate limit.Wait the number of seconds indicated in the Retry-After header, then retry.
500Internal Server Error — something went wrong on our side.Retry after a few seconds. If it persists, contact support@opensolr.com.

Error Response Format

{ "status": "error", "code": 400, "message": "Missing required parameter: index_name" }

</> Code Examples

Here are complete, copy-paste-ready examples for the most common API operations.

1. List All Your Indexes

# List all indexes in your account curl -X POST https://opensolr.com/api/get_index_list \ -d "email=you@example.com" \ -d "api_key=YOUR_API_KEY"

2. Create a New Index

# Create a new index named "products" curl -X POST https://opensolr.com/api/create_index \ -d "email=you@example.com" \ -d "api_key=YOUR_API_KEY" \ -d "index_name=products" \ -d "plan=small"

3. Ingest a Document

# Upload a PDF for text extraction and indexing curl -X POST https://opensolr.com/api/ingest \ -F "email=you@example.com" \ -F "api_key=YOUR_API_KEY" \ -F "index_name=products" \ -F "file=@/path/to/document.pdf"

4. Perform a Vector Search

# Search by meaning, not just keywords curl -X POST https://opensolr.com/api/embed_and_search \ -d "email=you@example.com" \ -d "api_key=YOUR_API_KEY" \ -d "index_name=products" \ -d "text=best wireless headphones for running" \ -d "rows=10"

5. Delete Documents by Query

# Delete all documents where category is "archived" curl -X POST https://opensolr.com/api/delete_by_query \ -d "email=you@example.com" \ -d "api_key=YOUR_API_KEY" \ -d "index_name=products" \ -d "query=category:archived" # Don't forget to commit after deleting! curl -X POST https://opensolr.com/api/commit \ -d "email=you@example.com" \ -d "api_key=YOUR_API_KEY" \ -d "index_name=products"
Need help with the API?

If you run into any issues or need guidance integrating the Opensolr API into your application, reach out to support@opensolr.com. We are happy to help with code reviews, architecture advice, and debugging.