Overview Documentation

Images API Reference

Query NestDaddy's image index and get structured metadata — image URL, dimensions, alt text, source URL, country, and more. Perfect for AI/ML training datasets, visual search apps, and content pipelines.

🖼️
AI Training Ready — Results include dimensions, aspect ratio, alt text, and source metadata. Export in JSONL format for direct use with ML pipelines.
Max Results / Request
100
Per API call
Formats
JSON / JSONL
ML-pipeline ready
Pagination
Yes
page parameter

Authentication

Every request must include your API key via the key query parameter or the X-API-Key header.

🔑
Get your API key from the Dashboard → API Keys tab. Both Search and Images APIs use the same key system.
GET /api/v1/images?key=nd_live_xxxxxxxxxxxxxxxx&q=cats
GET /api/v1/images?q=cats
X-API-Key: nd_live_xxxxxxxxxxxxxxxx

Quick Start

Make your first image search in under 60 seconds.

curl "https://nestdaddy.com/api/v1/images?key=YOUR_API_KEY&q=cats&limit=20"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://nestdaddy.com/api/v1/images"

response = requests.get(BASE_URL, params={
    "key":   API_KEY,
    "q":     "cats",
    "limit": 20,
    "page":  1,
})

data = response.json()
for img in data["results"]:
    print(img["image_url"], img["width"], "x", img["height"])
const res  = await fetch(
  `https://nestdaddy.com/api/v1/images?key=${API_KEY}&q=cats&limit=20`
);
const data = await res.json();

data.results.forEach(img => {
  console.log(img.image_url, `${img.width}x${img.height}`);
});
$url = "https://nestdaddy.com/api/v1/images?" . http_build_query([
    'key'   => 'YOUR_API_KEY',
    'q'     => 'cats',
    'limit' => 20,
]);
$data = json_decode(file_get_contents($url), true);
foreach ($data['results'] as $img) {
    echo $img['image_url'] . "\n";
}

Endpoint

GET https://nestdaddy.com/api/v1/images

All requests use HTTPS GET. Parameters are passed as URL query strings. CORS is enabled for all origins.

Parameters

ParameterTypeRequiredDefaultDescription
keystringRequiredYour NestDaddy API key
qstringRequiredSearch query for image alt text and surrounding page content
limitintegerOptional20Results per page. Min: 1, Max: 100.
pageintegerOptional1Page number for pagination. Min: 1.
min_widthintegerOptionalFilter: minimum image width in pixels.
min_heightintegerOptionalFilter: minimum image height in pixels.
domainstringOptionalFilter by source domain (partial match). E.g. unsplash.com
countrystringOptionalISO 3166-1 country code. E.g. US, MY, SG
formatstringOptionaljsonjson (default) or jsonl (newline-delimited, ideal for ML pipelines).

Response

Successful responses return HTTP 200 with a JSON body.

Response — 200 OK ● 200 OK
{
  "success": true,
  "query":   "cats",
  "page":    1,
  "limit":   20,
  "count":   20,
  "results": [
    {
      "image_url":     "https://example.com/images/cat.jpg",
      "alt_text":      "A fluffy orange tabby cat on a windowsill",
      "title":         "Cute cats gallery",
      "width":         1920,
      "height":        1080,
      "aspect_ratio":  0.56,
      "source_url":    "https://example.com/cats-gallery",
      "source_title":  "Cute Cats Gallery | Example",
      "domain":        "example.com",
      "country":       "US",
      "discovered_at": "2024-07-12T08:30:00Z"
    }
  ],
  "stats": {
    "took_ms":       45,
    "total_indexed": 34567890
  }
}

Result Object Fields

FieldTypeDescription
image_urlstringDirect URL to the image file
alt_textstring | nullHTML alt attribute of the image
titlestring | nullTitle of the source page or image element
widthinteger | nullImage width in pixels (if known)
heightinteger | nullImage height in pixels (if known)
aspect_ratiofloat | nullHeight / width ratio (e.g. 0.56 for 16:9)
source_urlstringURL of the web page where this image was found
source_titlestring | nullTitle of the source web page
domainstringRoot domain of the source page
countrystring | nullISO 3166-1 country code (e.g. US)
discovered_atstring | nullISO 8601 timestamp when NestDaddy indexed this image

Errors

All errors return a JSON body with success: false and an error message.

Error Response ● 4xx / 5xx
{
  "success": false,
  "error":   "Query parameter \"q\" is required"
}
HTTP StatusCause
400The q parameter is absent or empty
401Invalid, missing, or deactivated API key
401Monthly request quota exceeded
401Subscription is paused or expired
500Server-side error — contact [email protected]

Code Examples

Filter by minimum resolution (HD images)

# HD images only (1280x720 minimum)
response = requests.get(BASE_URL, params={
    "key":        API_KEY,
    "q":          "nature landscapes",
    "limit":      50,
    "min_width":  1280,
    "min_height": 720,
})
curl "https://nestdaddy.com/api/v1/images?key=YOUR_KEY&q=nature+landscapes&min_width=1280&min_height=720&limit=50"

Filter by country

response = requests.get(BASE_URL, params={
    "key":     API_KEY,
    "q":       "kuala lumpur",
    "country": "MY",
    "limit":   30,
})
const params = new URLSearchParams({
  key: API_KEY, q: "kuala lumpur",
  country: "MY", limit: "30"
});
const data = await (await fetch(`https://nestdaddy.com/api/v1/images?${params}`)).json();

Pagination

Use the page parameter together with limit to walk through result sets.

# Collect 500 images across 5 pages
all_images = []

for page in range(1, 6):
    data = requests.get(BASE_URL, params={
        "key": API_KEY, "q": "food photography",
        "limit": 100, "page": page,
    }).json()
    if not data.get("results"):
        break
    all_images.extend(data["results"])

print(f"{len(all_images)} images collected")
async function collectImages(query, pages = 5) {
  const all = [];
  for (let p = 1; p <= pages; p++) {
    const data = await (await fetch(
      `https://nestdaddy.com/api/v1/images?key=${API_KEY}&q=${encodeURIComponent(query)}&limit=100&page=${p}`
    )).json();
    if (!data.results?.length) break;
    all.push(...data.results);
  }
  return all;
}

Filtering

Combine multiple filter parameters to narrow your results. All filters are applied server-side before pagination.

Use CaseParameters
HD images only (≥1280×720)min_width=1280&min_height=720
Square images (for thumbnails)Filter client-side on aspect_ratio between 0.9–1.1
From specific source sitedomain=flickr.com
From specific countrycountry=US

JSONL Format

Request format=jsonl for newline-delimited JSON — one image object per line. Loads directly into pandas, HuggingFace datasets, or any JSONL reader.

curl "https://nestdaddy.com/api/v1/images?key=YOUR_KEY&q=cats&limit=100&format=jsonl" \
  -o cats.jsonl
import pandas as pd, requests, io

response = requests.get(BASE_URL, params={
    "key": API_KEY, "q": "cats",
    "limit": 100, "format": "jsonl",
})

df = pd.read_json(io.StringIO(response.text), lines=True)
print(df[["image_url", "width", "height", "alt_text"]].head())
from datasets import load_dataset
import requests, tempfile, os

resp = requests.get(BASE_URL, params={
    "key": API_KEY, "q": "cats",
    "limit": 100, "format": "jsonl"
})
with tempfile.NamedTemporaryFile(mode="w", suffix=".jsonl", delete=False) as f:
    f.write(resp.text); tmp = f.name

ds = load_dataset("json", data_files=tmp, split="train")
os.unlink(tmp)
print(ds)

Rate Limits

Rate limits apply per API key per minute. Exceeding the limit returns 429 Too Many Requests.

Starter Plan
30 / min
Requests per minute
Growth Plan
60 / min
Requests per minute
Pro Plan
120 / min
Requests per minute
⏱️
Use large limit values — request limit=100 with pagination rather than many small requests to stay within rate limits efficiently.

Monthly Quota

Each plan includes a monthly request quota. Image API and Search API share the same quota pool.

PlanMonthly RequestsMax / RequestPrice
Free Trial50020$0 / 7 days
Starter10,000100$14.99 / mo
Growth50,000100$39.99 / mo
Pro200,000100$99.99 / mo

Need a custom plan for large-scale training data? Contact us for enterprise pricing.