Follow these focused steps to obtain an API key, make your first request, and parse movie recommendations using Screenpick.
Visit the RapidAPI listing and subscribe to the Free plan. Copy the provided API key.
X-RapidAPI-KeySCREENPICK_API_KEY env var)Ping the health endpoint – you should receive a simple JSON confirming availability.
curl -s https://screenpick.fun/api/pingUse natural language in the q parameter – the AI interprets intent (genre, mood, era, style).
curl -s -H "Authorization: Bearer YOUR_API_KEY"
"https://screenpick.fun/api/search?q=classic+space+adventure"Example partial response:
{
"success": true,
"query": "classic space adventure",
"movies": [
{
"id": 11,
"title": "Star Wars: A New Hope",
"release_date": "1977-05-25",
"overview": "Luke Skywalker joins forces...",
"genre_ids": [12, 28, 878],
"vote_average": 8.2,
"vote_count": 18000,
"popularity": 120.5,
"poster_path": "/abc123.jpg",
"backdrop_path": "/def456.jpg",
"adult": false,
"original_language": "en",
"original_title": "Star Wars"
},
{ "id": 1893, "title": "Star Wars: Attack of the Clones", ... }
],
"total": 10,
"requestId": "a2f3b0d2-...",
"timestamp": "2025-09-17T12:34:56.789Z",
"authMethod": "jwt",
"userPlan": "basic"
}const res = await fetch('https://screenpick.fun/api/search?q=thrilling+heist', {
headers: {
Authorization: 'Bearer YOUR_API_KEY' // optional; higher limits when provided
}
});
const data = await res.json();
console.log(data.movies[0]);Check HTTP status codes. On 429 back off & retry after the Retry-After header.
async function api(path, params) {
const url = new URL('https://screenpick.fun/api' + path);
Object.entries(params || {}).forEach(([k,v]) => url.searchParams.set(k, String(v)));
const res = await fetch(url, { headers: { Authorization: 'Bearer ' + process.env.NEXT_PUBLIC_SCREENPICK_KEY } });
if (!res.ok) {
let msg = res.status + ' error';
try {
const err = await res.json();
msg = err.error?.message || msg;
} catch {}
if (res.status === 429) {
const retry = res.headers.get('Retry-After') || '60';
throw new Error('Rate limited. Retry after ' + retry + 's');
}
throw new Error(msg);
}
return res.json();
}