Search API documentation.

Everything you need to add instant search to your app or AI agent. Pick your integration path below.

MCP Server for AI Agents

Connect Claude, Cursor, Windsurf, or any MCP client to Sprigr in one config block. Your agent gets 16 tools for search, storage, and index management.

Install

npx -y @sprigr/mcp-server

Configuration

Add to your MCP client config (Claude Desktop, Cursor, etc.):

claude_desktop_config.json
{
  "mcpServers": {
    "sprigr": {
      "command": "npx",
      "args": ["-y", "@sprigr/mcp-server"],
      "env": {
        "SPRIGR_API_KEY": "your-api-key"
      }
    }
  }
}

Environment variables

SPRIGR_API_KEY  - Required. Your API key from signup.
SPRIGR_API_BASE - Optional. Defaults to https://search.sprigr.com

Available tools (16)

signuplist_indexescreate_indexupdate_settingsimport_objectssearchmulti_searchget_objectexport_objectsget_statsdelete_objectsdelete_indexclear_indexset_aliasdelete_aliaslist_aliases

How it works

The MCP server runs locally on your machine via npx. Searches execute locally in the browser (~5ms) against a binary index that auto-downloads from the server. Writes go to the cloud API and the local index refreshes automatically on the next search. No server to host, no ports to open.

REST API

Use the REST API directly from any language. Algolia-compatible endpoints for indexing, search, and management.

Base URL

https://search.sprigr.com

Authentication

Include your API key in the request header:

X-Sprigr-API-Key: your-api-key

API keys support three permission levels (admin, write, search) and optional index-level ACLs. Restrict a key to specific indexes by setting allowed_indexes when creating the key via the admin panel.

Create an index

PUT /1/indexes/products/settings
Content-Type: application/json

{
  "searchable_attributes": ["title", "description"],
  "attributes_for_faceting": ["category", "brand"]
}

Import objects

POST /1/indexes/products/batch
Content-Type: application/json

{
  "products": [
    {
      "objectID": "prod-1",
      "title": "Ergonomic Keyboard",
      "description": "Split mechanical keyboard",
      "category": "Tech",
      "price": 149.99
    }
  ]
}

Search

POST /1/indexes/products/query
Content-Type: application/json

{
  "query": "keyboard",
  "filters": "category:Tech",
  "hits_per_page": 10,
  "page": 0
}

All endpoints

  • GET/1/indexesList indexes
  • PUT/1/indexes/{index}/settingsCreate/update settings
  • GET/1/indexes/{index}/settingsGet settings
  • POST/1/indexes/{index}/batchImport objects
  • POST/1/indexes/{index}/querySearch
  • POST/1/indexes/*/queriesMulti-index search
  • GET/1/indexes/{index}/objects/{id}Get object
  • GET/1/indexes/{index}/objectsExport all objects
  • POST/1/indexes/{index}/deleteObjectsDelete objects
  • POST/1/indexes/{index}/clearClear index
  • DEL/1/indexes/{index}Delete index
  • PUT/1/aliases/{alias}Set alias
  • DEL/1/aliases/{alias}Delete alias
  • GET/1/aliasesList aliases
  • GET/1/statsAccount stats
  • POST/1/embedGenerate embedding

Data modeling tips

Searchable types

Strings, arrays of strings, numbers, and booleans are all indexed for full-text search. Nested objects are not. If you store {"tags": ["red", "blue"]}, searching for "red" will match.

Multi-value facets

Arrays work as multi-value facets. If tags is a faceting attribute and an object has "tags": ["red", "large"], filtering by tags:red or tags:large will both match.

Semantic search with _keywords

Include a _keywords string field with comma-separated tags, synonyms, and related concepts. This makes objects findable by meaning, not just exact text. AI agents should generate these automatically at import time.

{
  "objectID": "prod-1",
  "title": "Ergonomic Laptop Stand",
  "description": "Adjustable aluminum stand",
  "_keywords": "desk accessory, workstation, posture,
               home office, monitor riser, portable"
}

Always include _keywords in your searchable_attributes:

"searchable_attributes": ["title", "description", "_keywords"]

Ready to get started?

Free for up to 1,000 objects. No credit card required.