SearchJet API Documentation
The SearchJet API gives your site or application hosted full-text search. It can also do semantic search and generate AI answers on top of the content you index. It's a plain REST API that accepts and returns JSON. This page explains how to integrate, how authentication works, and what each group of endpoints does. Every endpoint is listed in the API Endpoints Reference, and the REST API Reference covers every field.
Choose how to integrate
- WordPress or WooCommerce. Install the SearchJet Instant Search plugin and paste your API key into its settings, and your content is indexed automatically. To change what gets indexed, use the plugin's
searchjet_index_documentfilter. - Any other stack. Call the REST API directly with your language's HTTP client:
fetchin JavaScript, Laravel'sHttpclient, httpx in Python, or curl.
SearchJet doesn't publish npm, Composer or pip packages, and there's no CDN-hosted widget. Any snippet that tells you to install one is out of date.
Base URL and headers
https://app.searchjetengine.com/api/v1
Send Accept: application/json on every request. Requests with a body also need Content-Type: application/json.
Authentication
Send a key in the Authorization header. Keys in the URL aren't accepted.
Authorization: Bearer YOUR_PUBLIC_KEY # search
Authorization: Bearer YOUR_PRIVATE_KEY # indexing, analytics, AI
| Key | Purpose | Where it can be used |
|---|---|---|
| Public search key | Search and MCP | Browsers and servers |
| Private key (32 characters, shown once) | Indexing, deleting, analytics, click tracking, AI generation | Server-side only |
API Key Setup explains where to find each key and how to rotate it.
Search
GET /search with the public key. CORS is enabled, so browsers can call it directly.
const params = new URLSearchParams({ q: 'react tutorial', limit: '10' });
const res = await fetch(`https://app.searchjetengine.com/api/v1/search?${params}`, {
headers: { Authorization: 'Bearer YOUR_PUBLIC_KEY', Accept: 'application/json' },
});
const data = await res.json();
console.log(data.results); // array of hits
use Illuminate\Support\Facades\Http;
$hits = Http::withToken(config('services.searchjet.public_key'))
->acceptJson()
->get('https://app.searchjetengine.com/api/v1/search', ['q' => 'react tutorial', 'limit' => 10])
->json('results');
The response contains results (the hits), total, limit, offset, page, processing_time_ms, semantic_search_used, facet_distribution, facet_stats and remaining_quota. It also includes answer, semantic_ratio or meta when they apply. Which fields each hit contains depends on your plan: Free hits have id, title, url, type, thumbnail, price, currency and sku, but no excerpt or content.
The main options:
- Filters and sorting.
filterstakes a Meilisearch expression andsorttakesattr:ascorattr:desc. Free can filter onid,title,type,price,currencyandsku. Paid plans can use any attribute set as filterable or sortable in Index Settings – General Attributes. - Semantic search.
semantic=true(Pro and above). - AI answers.
ai_answer=true(all plans, within your monthly AI-answer quota). - Highlighting, cropping and facets. Pro and above.
For more, see Basic Usage and the Search API Deep Dive.
Indexing
Use the private key, from server-side code only.
POST /index/bulkadds or replaces documents, up to 1,000 per request on Free or 5,000 on paid plans.PATCH /index/bulkmerges fields into existing documents.DELETE /index/deleteremoves documents byid, or byids(up to 500).POST /index/delete-batchremoves documents byidsor byfilter.
curl -X POST "https://app.searchjetengine.com/api/v1/index/bulk" \
-H "Authorization: Bearer $SEARCHJET_PRIVATE_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"documents": [
{
"id": "doc-001",
"title": "Getting Started",
"content": "Learn the basics...",
"url": "https://example.com/getting-started",
"type": "page"
}
]
}'
Each document needs an id plus at least one other non-empty field, and can be at most 1 MB. Indexing is asynchronous. The response is a queued task (taskUid, status: "enqueued"), and you check its progress with GET /index/tasks/{taskUid}. The Index Management API has the details. For Laravel, Step-by-Step Installation & Configuration shows an observer that keeps the index in sync.
Analytics, AI and account info
All of these use the private key, from your server only:
GET /search-analytics?days=30returns top queries, zero-result queries, total searches and daily volume.POST /search-analyticsrecords search logs, andPOST /analytics/clickrecords clicks on results. To track clicks from a browser, send them to your own backend and forward them from there.POST /ai/generatequeues a text generation from a prompt. PollGET /ai/status/{id}untilstatusiscompleteorfailed.GET /client-inforeturns your plan, your public key and your usage limits.
On Pro and above, POST /mcp/{publicKey} exposes search as an MCP server for AI assistants.
Errors and limits
| Response | Meaning |
|---|---|
401 |
Missing or invalid key, or the wrong key type |
400 INVALID_FILTER / INVALID_SORT |
The filter or sort isn't allowed |
429 |
Rate limit (30 requests/min per IP, plus per-key plan limits), or a quota used up (QUOTA_EXCEEDED) |
500 MEILISEARCH_ERROR |
Engine error |
See Error Handling and Rate Limits & Quotas.