Search API
Web, news, image, video, and music search
The Search API lets you search the web, news, images, videos, and music programmatically.
Free Tier
Every user gets 100 free searches per month. Additional searches cost $0.005 per request.
How It Works
- Choose search type — Web, news, images, videos, or music
- Send query — POST your search query
- Get results — Receive structured search results
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/search | Perform a search |
Search (POST)
POST https://axerity.com/api/v1/searchRequest Body
Prop
Type
Search Types
| Type | Description | Returns |
|---|---|---|
general | Web search results | Title, URL, snippet |
news | News articles | Title, URL, source, date |
image | Image search | URL, thumbnail, dimensions |
videos | Video search | Title, URL, thumbnail |
music | Music search | Title, artist, album, URL |
Examples
Web Search
curl -X POST https://axerity.com/api/v1/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"query": "best programming languages 2025",
"type": "general",
"limit": 5
}'Response
{
"results": [
{
"title": "Top Programming Languages in 2025",
"url": "https://example.com/programming-languages",
"snippet": "Python, TypeScript, and Rust continue to dominate..."
},
{
"title": "Best Languages to Learn This Year",
"url": "https://example.com/learn-coding",
"snippet": "If you're starting your coding journey..."
}
],
"total": 2,
"query": "best programming languages 2025"
}News Search
curl -X POST https://axerity.com/api/v1/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"query": "AI announcements",
"type": "news",
"limit": 3
}'Response
{
"results": [
{
"title": "New AI Model Released",
"url": "https://news.example.com/ai-release",
"source": "Tech News",
"published_at": "2025-01-15T10:30:00Z",
"snippet": "A groundbreaking new AI model was announced today..."
}
],
"total": 1,
"query": "AI announcements"
}Image Search
curl -X POST https://axerity.com/api/v1/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"query": "mountain landscape",
"type": "image",
"limit": 5
}'Response
{
"results": [
{
"url": "https://images.example.com/mountain.jpg",
"thumbnail": "https://images.example.com/mountain-thumb.jpg",
"width": 1920,
"height": 1080,
"source": "example.com"
}
],
"total": 1,
"query": "mountain landscape"
}Video Search
curl -X POST https://axerity.com/api/v1/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"query": "javascript tutorial",
"type": "videos",
"limit": 3
}'Response
{
"results": [
{
"title": "JavaScript Crash Course for Beginners",
"url": "https://video.example.com/js-crash-course",
"thumbnail": "https://video.example.com/thumb/js-course.jpg",
"duration": "1:30:45",
"source": "Video Platform"
}
],
"total": 1,
"query": "javascript tutorial"
}Music Search
curl -X POST https://axerity.com/api/v1/search \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"query": "ambient focus music",
"type": "music",
"limit": 5
}'Response
{
"results": [
{
"title": "Deep Focus",
"artist": "Ambient Collective",
"album": "Concentration",
"url": "https://music.example.com/deep-focus",
"duration": "3:45"
}
],
"total": 1,
"query": "ambient focus music"
}Best Practices
Use Specific Queries
More specific queries return better results:
// Less specific
const results = await search({ query: "news", type: "general" });
// More specific
const results = await search({
query: "tech industry news January 2025",
type: "news",
});Choose the Right Search Type
| Use Case | Search Type |
|---|---|
| Research and information | general |
| Current events | news |
| Visual content | image |
| Tutorials and guides | videos |
| Audio content | music |
Implement Pagination
For large result sets, use offset and limit:
async function getAllResults(query, type, maxResults = 50) {
const results = [];
let offset = 0;
const limit = 10;
while (results.length < maxResults) {
const response = await search({ query, type, limit, offset });
results.push(...response.results);
if (response.results.length < limit) break;
offset += limit;
}
return results.slice(0, maxResults);
}Cache Frequent Searches
Combine with Cache API to reduce costs:
async function cachedSearch(query, type) {
const cacheKey = `search-${type}-${query.toLowerCase().replace(/\s+/g, "-")}`;
// Check cache first
const cached = await getCache(cacheKey);
if (cached) return cached;
// Perform search
const results = await search({ query, type });
// Cache for 1 hour
await setCache(cacheKey, results, 3600);
return results;
}Pricing
| Tier | Searches | Cost |
|---|---|---|
| Free | 100/month | $0 |
| Additional | Per request | $0.005 |
All Search Types
All search types (general, news, image, videos, music) cost the same per request.