Search API Reference
Query NestDaddy's web index and get clean, structured JSON results — no scraping, no proxies, no Google quotas. BM25 relevance ranking with language and date filtering.
Authentication
Every request must include your API key via the key query parameter or the X-API-Key request header.
# Passing API key as query parameter GET /api/v1/search?key=nd_live_xxxxxxxxxxxxxxxx&q=artificial+intelligence
# Passing API key as request header GET /api/v1/search?q=artificial+intelligence X-API-Key: nd_live_xxxxxxxxxxxxxxxx
Quick Start
Make your first search in under 60 seconds.
curl "https://nestdaddy.com/api/v1/search?key=YOUR_API_KEY&q=python+tutorial&limit=5"
import requests API_KEY = "YOUR_API_KEY" BASE_URL = "https://nestdaddy.com/api/v1/search" response = requests.get(BASE_URL, params={ "key": API_KEY, "q": "python tutorial", "limit": 10, "sort": "relevance", }) data = response.json() for result in data["results"]: print(result["title"], "-", result["url"])
const API_KEY = "YOUR_API_KEY"; const query = "python tutorial"; const url = `https://nestdaddy.com/api/v1/search?key=${API_KEY}&q=${encodeURIComponent(query)}&limit=10`; const res = await fetch(url); const data = await res.json(); data.results.forEach(r => console.log(r.title, r.url));
$apiKey = 'YOUR_API_KEY'; $url = "https://nestdaddy.com/api/v1/search?" . http_build_query([ 'key' => $apiKey, 'q' => 'python tutorial', 'limit' => 10, ]); $data = json_decode(file_get_contents($url), true); foreach ($data['results'] as $r) { echo $r['title'] . " - " . $r['url'] . "\n"; }
Endpoint
All requests use HTTPS GET. Parameters are passed as URL query strings. CORS is enabled — suitable for browser-based applications (though protect your key server-side).
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| key | string | Required | — | Your NestDaddy API key |
| q | string | Required | — | Search query. Minimum 2 characters. |
| limit | integer | Optional | 10 | Number of results to return. Min: 1, Max: 50. |
| sort | string | Optional | relevance | relevance — BM25 score ranking. date — newest first. |
| lang | string | Optional | — | ISO 639-1 language code. E.g. en, ms, zh. Omit for all languages. |
Response
Successful responses return HTTP 200 with a JSON body.
{
"success": true,
"api": "search",
"query": "python tutorial",
"sort_by": "relevance",
"count": 10,
"results": [
{
"title": "Python Tutorial for Beginners",
"url": "https://example.com/python-tutorial",
"snippet": "Learn Python programming from scratch...",
"domain": "example.com",
"language": "en",
"published_date": "2024-08-15",
"score": 18.42
}
],
"quota": {
"used": 1241,
"limit": 30000,
"remaining": 28759
}
}
Result Object Fields
| Field | Type | Description |
|---|---|---|
| title | string | Page title |
| url | string | Full URL of the result page |
| snippet | string | Meta description or extract (max 200 chars) |
| domain | string | Root domain, e.g. example.com |
| language | string | ISO 639-1 detected language |
| published_date | string | Publication date (ISO 8601) if available, else empty string |
| score | float | BM25 relevance score — higher is more relevant |
Quota Object Fields
| Field | Type | Description |
|---|---|---|
| used | integer | Total requests used this billing period |
| limit | integer | null | Monthly quota limit. null = unlimited |
| remaining | integer | null | Requests remaining this period. null = unlimited |
Errors
All errors return a JSON body with error and message fields.
{
"error": "Missing query",
"message": "Query parameter \"q\" is required"
}
| HTTP Status | Error | Cause |
|---|---|---|
| 400 | Missing query | The q parameter is absent or empty |
| 400 | Query too short | Query is less than 2 characters |
| 401 | Invalid API key | The key is missing, wrong, or deactivated |
| 401 | Quota exceeded | Monthly request quota has been reached |
| 401 | Subscription inactive | Your subscription is paused or expired |
| 500 | Internal error | Server-side error — contact [email protected] |
Code Examples
Search with date sort
response = requests.get("https://nestdaddy.com/api/v1/search", params={ "key": API_KEY, "q": "machine learning 2024", "limit": 20, "sort": "date", })
const res = await fetch( `https://nestdaddy.com/api/v1/search?key=${API_KEY}&q=machine+learning+2024&limit=20&sort=date` ); const data = await res.json();
Error handling
response = requests.get(BASE_URL, params={"key": API_KEY, "q": query}) if response.status_code == 200: data = response.json() print(f"Found {data['count']} results") elif response.status_code == 401: print("Auth error:", response.json()["message"]) else: print("Error:", response.status_code)
const res = await fetch(url); const data = await res.json(); if (!res.ok) { console.error("API error", res.status, data.message); return; } console.log(`Found ${data.count} results`);
Pagination
The Search API returns up to 50 results per request. There is no page offset parameter — use sort=date with date-range keywords in your query, or combine multiple targeted queries.
page parameter and up to 100 results per request.Language Filter
Use the lang parameter to restrict results to a specific language.
# English only curl "https://nestdaddy.com/api/v1/search?key=YOUR_KEY&q=technology&lang=en" # Malay only curl "https://nestdaddy.com/api/v1/search?key=YOUR_KEY&q=teknologi&lang=ms"
# Common language codes: en, ms, zh, ar, fr, de, es, ja response = requests.get(BASE_URL, params={ "key": API_KEY, "q": "news", "lang": "en" })
Rate Limits
Rate limits apply per API key per minute. Exceeding the limit returns 429 Too Many Requests.
Monthly Quota
Each plan includes a monthly request quota returned in every API response under the quota object.
| Plan | Monthly Requests | Max per Request | Price |
|---|---|---|---|
| Free Trial | 1,000 | 10 | $0 / 7 days |
| Starter | 30,000 | 50 | $9.99 / mo |
| Growth | 100,000 | 50 | $24.99 / mo |
| Pro | 500,000 | 50 | $79.99 / mo |
Need a custom plan? Contact us for enterprise pricing.