Search API
Full-text search across all skills.
Search Skills
GET /api/v1/skills/search
Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| q | string | Search query (required) |
| page | number | Page number (default: 1) |
| limit | number | Items per page (default: 20) |
| category | string | Filter by category |
| platform | string | Filter by platform |
| minStars | number | Minimum star count |
| hasMarketplace | boolean | Has marketplace.json |
Example Request
curl "https://skillsmp.com/api/v1/skills/search?q=react+typescript&category=frontend&minStars=100"
Example Response
{
"data": [
{
"id": "456",
"owner": "community",
"repo": "react-typescript-guide",
"name": "React TypeScript Guide",
"description": "Type-safe React development patterns",
"stars": 890,
"score": 15.7,
"highlights": {
"name": "<mark>React</mark> <mark>TypeScript</mark> Guide",
"description": "Type-safe <mark>React</mark> development patterns"
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
},
"meta": {
"query": "react typescript",
"took": 23
}
}
Search Syntax
Basic Search
react components
Searches all text fields for these terms.
Exact Phrase
"react hooks"
Matches the exact phrase.
Field-Specific
name:react description:hooks
Search specific fields.
Exclusion
react -class
Exclude terms with minus.
Wildcards
react*
Prefix matching.
Search Tips
Effective Queries
Good:
react hooks state management- Specific terms"code review" security- Phrase + termtypescript name:react- Field-specific
Less Effective:
the best react skill- Stop words ignoredr- Too short*- Too broad
Relevance Scoring
Results are ranked by:
- Exact match - Full term matches
- Field weight - Name > Description > Content
- Popularity - Star count boost
- Freshness - Recent updates boost
Autocomplete
GET /api/v1/skills/autocomplete
Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| q | string | Partial query |
| limit | number | Max suggestions (default: 5) |
Example Request
curl "https://skillsmp.com/api/v1/skills/autocomplete?q=rea"
Example Response
{
"data": [
{
"text": "react",
"count": 89
},
{
"text": "react hooks",
"count": 34
},
{
"text": "react typescript",
"count": 28
}
]
}
Error Handling
| Code | Description |
|------|-------------|
| INVALID_QUERY | Query is empty or too short |
| QUERY_TOO_LONG | Query exceeds 200 characters |
| INVALID_SYNTAX | Malformed search syntax |