InfoSpace Team · InfoSpace
Introduction
InfoSpace provides powerful integration options for developers who want to incorporate curated search into their applications. Whether you're building a documentation site, internal tool, or public resource hub, our API and embed features make it easy.
This guide covers everything you need to know to get started.
Embed Widget
The simplest way to add InfoSpace search to your site is through our embed widget.
Basic Embed
Add a search interface to any webpage with a single iframe:
<iframe
src="https://infospace.io/embed/your-search-engine-slug"
width="100%"
height="600"
frameborder="0"
style="border-radius: 8px;"
></iframe>Customization Options
Customize the embed appearance with URL parameters:
| Parameter | Description | Example |
|---|---|---|
theme | Light or dark mode | theme=dark |
bg | Background color (hex without #) | bg=1a1a2e |
text | Text color | text=ffffff |
accent | Accent/primary color | accent=6366f1 |
cardBg | Card background color | cardBg=2a2a4e |
radius | Border radius (sm, md, lg, none) | radius=lg |
font | Font family | font=inter |
Example with Customization
<iframe
src="https://infospace.io/embed/my-engine?theme=dark&accent=22c55e&radius=lg"
width="100%"
height="600"
frameborder="0"
></iframe>REST API
For more control, use our REST API to query search engines programmatically.
Authentication
Public endpoints don't require authentication. For private search engines and write operations, include your API key:
Authorization: Bearer your_api_key_herePublic Endpoints
#### List Public Search Engines
GET /api/search-enginesResponse:
{
"searchEngines": [
{
"id": "uuid",
"name": "My Search Engine",
"slug": "my-search-engine",
"description": "A curated collection of resources",
"icon": "🔍",
"is_public": true,
"created_at": "2025-01-01T00:00:00Z"
}
]
}#### Get Search Engine by Slug
GET /api/search-engines/:slug#### Get Links in Search Engine
GET /api/search-engines/:slug/links#### Search Within Engine
GET /api/search-engines/:slug/search?q=your+queryResponse:
{
"searchEngine": { "id": "...", "name": "..." },
"query": "your query",
"results": [
{
"id": "uuid",
"url": "https://example.com",
"title": "Example Resource",
"description": "A great resource",
"favicon": "https://example.com/favicon.ico",
"category": "Documentation",
"tags": ["tutorial", "beginner"]
}
],
"count": 1
}Private API Endpoints
Access your private search engines and manage links:
#### List Your Search Engines
GET /api/me/search-engines
Authorization: Bearer your_api_key#### Create Link
POST /api/links
Authorization: Bearer your_api_key
Content-Type: application/json
{
"url": "https://example.com",
"title": "Example",
"description": "Optional description",
"category": "Resources",
"tags": ["tag1", "tag2"]
}Rate Limits
Error Handling
All errors return consistent JSON:
{
"error": "Error message here"
}Common status codes:
400 - Bad request (missing parameters)401 - Unauthorized (invalid/missing API key)404 - Resource not found429 - Rate limit exceeded500 - Server errorUse Cases
Documentation Sites
Embed a curated documentation search alongside your docs:
// React example
function DocSearch() {
return (
<iframe
src="https://infospace.io/embed/my-docs"
className="w-full h-96 rounded-lg"
/>
);
}Internal Tools
Build custom search interfaces using the API:
async function search(query) {
const response = await fetch(
`https://infospace.io/api/search-engines/internal-resources/search?q=${query}`,
{
headers: {
'Authorization': `Bearer ${API_KEY}`
}
}
);
return response.json();
}Browser Extensions
Create browser extensions that search your curated collections:
chrome.omnibox.onInputEntered.addListener(async (text) => {
const results = await searchInfoSpace(text);
// Handle results...
});Slack/Discord Bots
Build bots that search your knowledge base:
bot.on('message', async (msg) => {
if (msg.content.startsWith('!search')) {
const query = msg.content.slice(8);
const results = await searchInfoSpace(query);
msg.reply(formatResults(results));
}
});Best Practices
Getting API Keys
Support
Need help with your integration?
We're excited to see what you build with InfoSpace!
