Quick Start Guide

This guide provides straightforward usage instructions for the Smart Search project, enabling users to search internal knowledge or other searchable sources.

Welcome to Smart Search! This guide will help you get started with web search in minutes.

📋 PrerequisitesClick to expand setup requirements

Before you begin, make sure you have:

  1. A Smart Search Token — Required for authentication

  2. Service Access — Ensure the Smart Search service is available

🔑 Authentication

Generate a Smart Search Token by following the instructions in 👉 Generate Access Token.

Once obtained, store it securely and include it in the Authorization header of every request:

export SMARTSEARCH_TOKEN="your-access-token"

✅ Service Availability

Verify that Smart Search is running and accessible:

curl -X GET "https://search-api.gdplabs.id/health-check"

Expected response:

{"message":"I'm alive"}

Choose one of the three integration methods below to get started:

📦 Option 1: SDK (Python)

SDK Integration GuideIdeal for Python developers

1. Set Environment Variables:

export SMARTSEARCH_BASE_URL="https://search-api.gdplabs.id"
export SMARTSEARCH_TOKEN="your-access-token"

2. Install the SDK:

git clone https://github.com/GDP-ADMIN/smart-search-sdk.git
cd smart-search-sdk/python/smart-search-sdk
pip install .

3. Perform a Web Search:

import asyncio
import os
from smart_search_sdk.web.client import WebSearchClient
from smart_search_sdk.web.models import GetWebSearchResultsRequest

async def main():
    client = WebSearchClient(base_url=os.getenv("SMARTSEARCH_BASE_URL"))
    await client.authenticate(token=os.getenv("SMARTSEARCH_TOKEN"))
    result = await client.search_web(GetWebSearchResultsRequest(query="gdp labs", size=5))
    print(result)

asyncio.run(main())

More details on Smart Search SDK.


🔌 Option 2: MCP

MCP Integration GuideIdeal for agentic systems and AI assistants

Integrate Smart Search into any MCP-compatible system (Cursor, Windsurf, VS Code, etc.) for agent-based workflows.

Installation

For Cursor:

  1. Open Cursor Settings

  2. Go to Features > MCP Servers

  3. Click + Add new global MCP server

  4. Enter the following configuration:

{
  "mcpServers": {
    "smart_search_mcp": {
      "url": "https://search-api.gdplabs.id/mcp/",
      "headers": {
        "Authorization": "Bearer <SMARTSEARCH_TOKEN>"
      }
    }
  }
}

Replace <SMARTSEARCH_TOKEN> with your Smart Search Token.

For Windsurf:

Add this to your ./.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "smart_search_mcp": {
      "url": "https://search-api.gdplabs.id/mcp/",
      "headers": {
        "Authorization": "Bearer <SMARTSEARCH_TOKEN>"
      }
    }
  }
}

For VS Code:

  1. Open VS Code Settings

  2. Navigate to MCP Servers configuration

  3. Add the Smart Search MCP server with the URL and authorization header

After adding, refresh the MCP server list to see the new tools. The Composer Agent will automatically use Smart Search MCP when appropriate, but you can explicitly request it by describing your web search needs.

Available Tools:

  • get_web_search_results - Perform web searches with snippets, keypoints, or summaries

  • get_web_search_urls - Get a list of relevant URLs

  • get_web_page - Fetch full web page content

  • get_web_page_snippets - Extract snippets from a page

  • get_web_page_keypoints - Generate key insights from a page

See the Smart Search MCP page for full tool documentation.


🌐 Option 3: REST API

REST API Integration GuideIdeal for direct HTTP access and language-agnostic integrations

Call Smart Search directly via HTTP for maximum flexibility:

Sample Response:

This approach is ideal for quick integrations, custom dashboards, or system-to-system connections where you need full control over HTTP requests and responses.


Quick Reference

Integration
Best For

📦 SDK

Python developers who want a high-level interface with built-in error handling and type safety

🔌 MCP

Agentic systems, AI assistants, and MCP-compatible tools that need modular search capabilities

Direct, language-independent access via HTTP with maximum flexibility and control

Last updated