Skip to main content

Build Documentation Search Into Your Applications

Your team needs documentation search in places ULPI doesn’t reach:
  • Internal documentation portals
  • Slack bots for instant doc lookups
  • IDE extensions
  • CLI tools
  • Admin dashboards
  • Custom AI agents
The ULPI REST API lets you integrate semantic documentation search anywhere. This guide shows you:
  • 🔌 How to authenticate and make your first API call (2 minutes)
  • 💡 Real-world integration examples (Slack bots, portals, CLI tools)
  • 🛠️ Production-ready code in JavaScript, Python, PHP, Go
  • ⚡ Best practices for caching, rate limits, and error handling
  • 📊 Performance optimization strategies
Just want to use ULPI with Claude/Cursor? See Getting Started for MCP setup instead.Building something custom? This guide is for you.

Why Use the API?

The MCP server is great for AI assistants, but the API unlocks custom integrations:

Custom Search UIs

Build internal documentation portals:
  • Company-branded search interface
  • Advanced filtering and faceting
  • Usage analytics and tracking
  • Integration with SSO/auth
Example: Acme Corp’s internal dev portal with ULPI search

Slack/Discord Bots

Instant doc lookups in chat:
  • /docs deploy to production → Get deployment guide
  • No context switching
  • Share results with team
  • Track common questions
Example: Engineering Slack bot with 500+ daily searches

CLI Tools

Terminal-based documentation search:
  • docs auth → Find auth docs
  • Integrate with shell scripts
  • CI/CD pipeline helpers
  • Developer productivity boost
Example: company-docs CLI tool for all repos

Custom AI Agents

Build specialized AI assistants:
  • Customer support chatbots
  • Onboarding assistants
  • Technical troubleshooting bots
  • Integration with your AI stack
Example: Support bot that searches internal docs first
Plus: Dashboards, IDE plugins, mobile apps, workflow automation, and more.

Quick Start: Your First API Call

Get up and running in 2 minutes:
1

Get Your API Key

Generate an API key:
  1. Go to app.ulpi.io/api-keys
  2. Click Create API Key
  3. Name: “API Integration Test”
  4. Environment: live (production)
  5. Copy the key (starts with ulpi_live_sk_...)
Save your API key immediately! It’s only shown once.Store in password manager or environment variable.
2

Make Your First Request

Test with cURL:
Replace ulpi_live_YOUR_KEY_HERE with your actual API key.
3

View Results

You’ll get JSON response:
Success! You just searched your documentation via API.
4

Integrate Into Your App

Choose your language:Or: Use the REST API directly
Total time: 2 minutes from API key to first results

Real-World Integration Examples

See how teams use the ULPI API:
Use case: Engineers ask /docs <question> in Slack, bot returns relevant docsBenefits:
  • No context switching (stay in Slack)
  • Share results with team instantly
  • Track most-asked questions
  • Reduce Slack interruptions (“Where’s the deploy doc?”)
Implementation:
Usage in Slack:
Deployment:
  • Deploy to Heroku, AWS Lambda, or any Node/Python host
  • Set environment variables: SLACK_BOT_TOKEN, ULPI_API_KEY
  • Invite bot to Slack channels
Result: Instant documentation lookup without leaving Slack
Use case: Company-branded docs website with ULPI searchBenefits:
  • Centralized documentation access
  • Advanced search with filters
  • Usage analytics (what’s searched most)
  • SSO integration
Implementation (Next.js):
Features to add:
  • Repository filter dropdown
  • Branch selector
  • Search history
  • Bookmarks
  • Analytics dashboard
Example: docs.acmecorp.com - internal portal with 1,000+ daily searches
Use case: Search docs from terminal without opening browserBenefits:
  • Stay in terminal workflow
  • Script-friendly (use in automation)
  • Fast lookups during coding
  • Pipe output to other commands
Implementation (Python Click):
Installation:
Usage:
Result: Documentation lookup without leaving terminal
Use case: Quick doc access in admin dashboardBenefits:
  • Context-aware quick links
  • Common runbooks one click away
  • New hire onboarding helper
  • Embedded in existing tools
Implementation (React):
Use in dashboard:
  • Employee onboarding page
  • Developer tools section
  • Help/support sidebar
  • Context-sensitive (show relevant docs per page)
Use case: Customer support chatbot that searches internal docsBenefits:
  • Accurate answers from YOUR documentation
  • Reduces support ticket volume
  • 24/7 availability
  • Cites sources (links to docs)
Implementation (LangChain + OpenAI):
Deploy as:
  • Slack bot
  • Website chat widget
  • Support ticket assistant
  • Email autoresponder

API Reference

Complete API endpoint documentation:

Authentication

All requests require API key in Authorization header:
API key formats:
  • ulpi_live_sk_... - Production environment
  • ulpi_test_sk_... - Testing environment
Generate keys: app.ulpi.io/api-keys

POST /api/v1/documentation/search

Search across indexed documentation Base URL: https://api.ulpi.io/api/v1/documentation/search Request Body:
Parameters: Query Guidelines:
  • Max length: 500 characters
  • Natural language: “How do I…” works better than keywords
  • Be specific: “deploy to AWS production” better than “deploy”
Response:
Response Fields:

Code Examples by Language

Node.js implementation:

Rate Limits & Quotas

API limits by plan: Rate limit headers (included in every response):
429 Too Many Requests response:
Best practices:
  • Implement exponential backoff
  • Cache results (5-15 minutes)
  • Monitor X-RateLimit-Remaining
  • Use batch queries when possible

Error Handling

HTTP status codes:
Cause: Invalid request parameters
Common issues:
  • Missing query parameter
  • limit out of range (1-20)
  • query too long (>500 chars)
Fix: Validate parameters before sending
Robust error handling:

Best Practices

Cache search results to reduce API calls:
Recommended TTL:
  • User searches: 5-15 minutes
  • Programmatic queries: 1-5 minutes
  • Static content: 1 hour
Cache invalidation:
  • After repository webhook (if you process webhooks)
  • Manual refresh button
  • Time-based expiry
NEVER expose API keys in client-side code:
Storage best practices:
  • Environment variables (.env file, gitignored)
  • Secret managers (AWS Secrets Manager, HashiCorp Vault)
  • Never commit to version control
  • Rotate keys quarterly
Retry failed requests with increasing delays:
When to retry:
  • ✅ 500-level errors (server issues)
  • ✅ Network errors (timeouts, connection refused)
  • ✅ 429 (but respect retry_after header)
  • ❌ 400-level errors (client mistakes - fix your code)
Track API usage to avoid rate limits:
What to monitor:
  • Request volume per hour
  • Error rate and types
  • Latency percentiles (p50, p95, p99)
  • Cache hit rate
  • Remaining rate limit quota
Write better queries for better results:
Query best practices:
  • Be specific, not generic
  • Use question format
  • Include technology names
  • Specify environment/context
  • Use repository filter when known

Webhooks (Optional)

Get notified when documentation updates:
Coming soon: Webhook support for documentation changes.Subscribe to:
  • documentation.indexed - Repository finished indexing
  • documentation.updated - Documentation file changed
  • documentation.deleted - Documentation file removed
Request early access →

Next Steps

Generate API Keys

Create production API keys for your integrationStart building today

Search Features

Learn about query syntax and advanced filtersOptimize your queries

How It Works

Understand semantic search architecture and performanceDeep dive into technology

Repository Management

Connect repositories to make them searchable via APIExpand your search scope

Need help with API integration?Average response time: Under 2 hours during business hoursLooking for client libraries? We have official SDKs for JavaScript, Python, PHP, and Go.Want to contribute? We accept community SDKs for other languages!