Guide
Getting started with the Mungfali Image Search API
Sign up, create your first API key, and return image results in under five minutes — with curl, Node.js, or Python.
Mungfali gives you a single REST endpoint for keyword image search: structured JSON, up to 150 results per call, and pricing built for indie developers and growing products. This guide walks you from zero to your first successful search.
What you get
- One GET endpoint — no SDK required
- Up to 150 images per request (no cursor pagination)
- Fields like imageUrl, hostUrl, width, height, FamilyFriendly, and accentColor
- 250 free searches per month on the Free plan
Step 1: Create an account and API key
Register at mungfali.net/signup. After email verification, open Dashboard → API Keys and create a key. Keys use the mgf_live_ prefix — copy the full value once; it is shown only at creation time.
Step 2: Make your first request
Authenticate with the X-API-Key header (or Authorization: Bearer). Replace YOUR_API_KEY with your key:
curl -s "https://mungfali.net/v1/search?q=sunset&count=10" \ -H "X-API-Key: YOUR_API_KEY"
A successful response is JSON with name (your query) and value (an array of image objects). Use value[0].imageUrl for the direct image file URL.
Step 3: Parse the response
const res = await fetch(
'https://mungfali.net/v1/search?q=sunset&count=24',
{ headers: { 'X-API-Key': process.env.MUNGFALI_API_KEY } }
);
const data = await res.json();
data.value.forEach((img) => {
console.log(img.imageUrl, img.width, img.height);
});Important: keep keys on the server
Never embed API keys in browser JavaScript or mobile apps. Proxy search through your backend so keys stay secret and quota stays under your control.
Monitor usage
The dashboard shows monthly quota, per-minute rate limits, and recent requests. Response headers X-Monthly-Quota-Remaining and X-RateLimit-Remaining help you build client-side warnings before you hit 429 errors.
Go deeper
- API Reference — parameters, errors, and plan limits
- Examples — SafeSearch, domain filters, server proxies
- Pricing — upgrade when you outgrow the Free tier