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
- π 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
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
CLI Tools
Terminal-based documentation search:
docs authβ Find auth docs- Integrate with shell scripts
- CI/CD pipeline helpers
- Developer productivity boost
company-docs CLI tool for all reposCustom AI Agents
Build specialized AI assistants:
- Customer support chatbots
- Onboarding assistants
- Technical troubleshooting bots
- Integration with your AI stack
Quick Start: Your First API Call
Get up and running in 2 minutes:1
Get Your API Key
Generate an API key:
- Go to app.ulpi.io/api-keys
- Click Create API Key
- Name: βAPI Integration Testβ
- Environment:
live(production) - Copy the key (starts with
ulpi_live_sk_...)
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
Real-World Integration Examples
See how teams use the ULPI API:π€ Slack Bot for Documentation Lookup
π€ Slack Bot for Documentation Lookup
Use case: Engineers ask Usage in Slack:Deployment:
/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?β)
- Bolt.js (JavaScript)
- Python (slack_sdk)
- Deploy to Heroku, AWS Lambda, or any Node/Python host
- Set environment variables:
SLACK_BOT_TOKEN,ULPI_API_KEY - Invite bot to Slack channels
π Internal Documentation Portal
π Internal Documentation Portal
Use case: Company-branded docs website with ULPI searchBenefits:Features to add:
- Centralized documentation access
- Advanced search with filters
- Usage analytics (whatβs searched most)
- SSO integration
- API Route
- Search Component
- Result Display
- Repository filter dropdown
- Branch selector
- Search history
- Bookmarks
- Analytics dashboard
docs.acmecorp.com - internal portal with 1,000+ daily searchesπ₯οΈ CLI Tool for Terminal Search
π₯οΈ CLI Tool for Terminal Search
Use case: Search docs from terminal without opening browserBenefits:Installation:Usage:Result: Documentation lookup without leaving terminal
- Stay in terminal workflow
- Script-friendly (use in automation)
- Fast lookups during coding
- Pipe output to other commands
π Dashboard Widget
π Dashboard Widget
Use case: Quick doc access in admin dashboardBenefits:Use in dashboard:
- Context-aware quick links
- Common runbooks one click away
- New hire onboarding helper
- Embedded in existing tools
- Employee onboarding page
- Developer tools section
- Help/support sidebar
- Context-sensitive (show relevant docs per page)
π€ Custom AI Assistant
π€ Custom AI Assistant
Use case: Customer support chatbot that searches internal docsBenefits:Deploy as:
- Accurate answers from YOUR documentation
- Reduces support ticket volume
- 24/7 availability
- Cites sources (links to docs)
- 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:ulpi_live_sk_...- Production environmentulpi_test_sk_...- Testing environment
POST /api/v1/documentation/search
Search across indexed documentation Base URL:https://api.ulpi.io/api/v1/documentation/search
Request Body:
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | β Yes | Natural language search query | - |
repository | string | β No | Filter to specific repository | All repos |
branch | string | β No | Search specific branch | Default branch |
limit | integer | β No | Max results (1-20) | 10 |
- Max length: 500 characters
- Natural language: βHow do Iβ¦β works better than keywords
- Be specific: βdeploy to AWS productionβ better than βdeployβ
| Field | Type | Description |
|---|---|---|
results[] | array | Array of search results (sorted by relevance) |
results[].content | string | Documentation excerpt (most relevant section) |
results[].file | string | File path relative to repository root |
results[].repository | string | Repository name |
results[].branch | string | Git branch |
results[].url | string | Direct link to file on GitHub/GitLab |
results[].score | float | Relevance score (0.0-1.0, higher = better match) |
results[].last_updated | string | ISO 8601 timestamp of last file update |
meta.total | integer | Total results found (may be more than returned) |
meta.query_time_ms | integer | Query execution time in milliseconds |
meta.cached | boolean | Whether results were served from cache |
Code Examples by Language
- JavaScript / TypeScript
- Python
- PHP
- Go
Node.js implementation:
Rate Limits & Quotas
API limits by plan:| Plan | Requests/Min | Requests/Hour | Requests/Day | Burst |
|---|---|---|---|---|
| Starter | 60 | 1,000 | 10,000 | 100 |
| Professional | 120 | 5,000 | 50,000 | 200 |
| Enterprise | 300 | 15,000 | Unlimited | 500 |
- Implement exponential backoff
- Cache results (5-15 minutes)
- Monitor
X-RateLimit-Remaining - Use batch queries when possible
Error Handling
HTTP status codes:- 400 Bad Request
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
- 500 Internal Server Error
Cause: Invalid request parametersCommon issues:
- Missing
queryparameter limitout of range (1-20)querytoo long (>500 chars)
Best Practices
ποΈ Cache Results Aggressively
ποΈ Cache Results Aggressively
Cache search results to reduce API calls:Recommended TTL:
- User searches: 5-15 minutes
- Programmatic queries: 1-5 minutes
- Static content: 1 hour
- After repository webhook (if you process webhooks)
- Manual refresh button
- Time-based expiry
π Secure API Keys
π Secure API Keys
NEVER expose API keys in client-side code:Storage best practices:
- Environment variables (
.envfile, gitignored) - Secret managers (AWS Secrets Manager, HashiCorp Vault)
- Never commit to version control
- Rotate keys quarterly
β‘ Implement Exponential Backoff
β‘ Implement Exponential Backoff
Retry failed requests with increasing delays:When to retry:
- β 500-level errors (server issues)
- β Network errors (timeouts, connection refused)
- β
429 (but respect
retry_afterheader) - β 400-level errors (client mistakes - fix your code)
π Monitor Usage & Performance
π Monitor Usage & Performance
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
π Optimize Search Queries
π Optimize Search Queries
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 indexingdocumentation.updated- Documentation file changeddocumentation.deleted- Documentation file removed
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?
- π§ Email: support@ulpi.io
- π Docs: docs.ulpi.io
- π¬ Slack: ulpi.io/slack
- π Issues: github.com/ulpi-io/api-clients