RESTful API for managing bookmarks, sessions, and browsing history. Built for developers who want to integrate HyprLnk with their tools and workflows.
The HyprLnk API is available at http://localhost:4381/api
when running locally. All endpoints return JSON and follow REST conventions.
Currently, HyprLnk API doesn't require authentication when running locally. For production deployments, consider using a reverse proxy with authentication.
When exposing the API publicly, always use HTTPS and consider implementing API keys or OAuth for security.
The API currently doesn't implement rate limiting, but it's recommended for production deployments.
The API uses conventional HTTP response codes to indicate success or failure.
Code | Meaning |
---|---|
200 | OK - Request successful |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request parameters |
404 | Not Found - Resource doesn't exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
/bookmarks
Retrieve all bookmarks with optional filtering and pagination.
limit
- Number of results (default: 50, max: 100)offset
- Pagination offset (default: 0)tag
- Filter by tagsearch
- Search in title, description, and URLsort
- Sort by: created_desc, created_asc, title_asc, title_desccurl -X GET "http://localhost:4381/api/bookmarks?limit=10&tag=development"
/bookmarks
Create a new bookmark.
/bookmarks/search
Search bookmarks with query parameters.
q
- Search query stringlimit
- Number of results (default: 50)curl -X GET "http://localhost:4381/api/bookmarks/search?q=javascript&limit=10"
/bookmarks/:id
Update an existing bookmark.
/bookmarks/:id
Delete a bookmark.
curl -X DELETE "http://localhost:4381/api/bookmarks/123"
/sessions
Retrieve all browser sessions.
/sessions
Create a new browser session.
/history
Retrieve browsing history.
limit
- Number of results (default: 50)date
- Filter by date (YYYY-MM-DD)search
- Search in title and URL/history/today
Retrieve today's browsing history.
/history/week
Retrieve this week's browsing history.
/history/month
Retrieve this month's browsing history.
/history/count
Get count of history entries.
/history/sync
Sync browsing history data.
/link-clicks
Retrieve all link click tracking data.
/link-clicks/sync
Sync link click data from browser extension.
/import/browser
Import bookmarks and data from browser export files.
/segment
Bulk segment and categorize bookmarks using AI.
/health
Health check endpoint for monitoring.
/ping
Ping endpoint with timestamp for connectivity testing.
// Create a bookmark const response = await fetch('/api/bookmarks', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://example.com', title: 'Example Site', tags: ['web', 'example'] }) }); const bookmark = await response.json();
import requests # Create a bookmark response = requests.post( 'http://localhost:4381/api/bookmarks', json={ 'url': 'https://example.com', 'title': 'Example Site', 'tags': ['web', 'example'] } ) bookmark = response.json()