Endpoints
/api/v1/homeGet trending, featured, movies, and TV shows for homepage. Include x-api-key header.
/api/v1/info/:type/:slugGet detailed info for a movie or TV show. Returns title, poster, backdrop, trailer, cast, genres, related content.
/api/v1/search/:querySearch for movies and TV shows by title or keyword. Returns matching results.
/api/v1/home/list/:typePaginated movie or TV list. Query: ?page=1. Type: movie or tv.
/api/v1/home/genre/:genreIdFilter content by genre. IDs: action, comedy, drama, romance, thriller, sci-fi, horror, animation, documentary, crime, fantasy.
Code Examples
Get Homepage Content
Fetch trending movies, TV shows, and featured content
1constBASE="https://api.scenespotter.app/";2constAPI_KEY="ss_your_api_key_here";3constheaders={"x-api-key":API_KEY};45constresponse=awaitfetch(`${BASE}/api/v1/home`,{headers});6constdata=awaitresponse.json();78console.log(data.featured);// Featured movie/show9console.log(data.trending);// Array of trending items10console.log(data.movies);// Popular movies11console.log(data.tvShows);// Popular TV showsSearch Movies
Search for movies and TV shows by keyword
1constquery="inception";2constresults=awaitfetch(3`${BASE}/api/v1/search/${encodeURIComponent(query)}`,4{headers:{"x-api-key":API_KEY}}5).then(r=>r.json());67results.forEach(item=>{8console.log(`${item.title} (${item.year}) — ${item.type}`);9});Get Movie Details
Fetch full details including trailer, cast, and related content
1constslug="inception-27205";// title-id format2constmovie=awaitfetch(3`${BASE}/api/v1/info/movie/${slug}`,4{headers:{"x-api-key":API_KEY}}5).then(r=>r.json());67console.log(movie.title);// "Inception"8console.log(movie.trailer);// YouTube video ID9console.log(movie.cast);// ["Leonardo DiCaprio", ...]10console.log(movie.genres);// ["Action", "Sci-Fi", ...]11console.log(movie.related);// Similar moviesStream a Movie (Authenticated)
Start a stream session and poll for progress (requires Basic plan or higher)
1constAPI_KEY="ss_your_api_key_here";2constheaders={3"Content-Type":"application/json",4"x-api-key":API_KEY5};67// 1. Start the stream8conststream=awaitfetch(`${BASE}/api/v1/stream/start`,{9method:"POST",10headers,11body:JSON.stringify({12title:"Inception",13year:"2010",14type:"movie"15})16}).then(r=>r.json());1718if(stream.status==="cached"){19// Ready immediately — stream from CDN20constvideoUrl=`${BASE}/api/v1/stream?title=Inception&year=2010`;21console.log("Stream ready:",videoUrl);22}else{23// Poll for progress24constpoll=setInterval(async()=>{25constprogress=awaitfetch(26`${BASE}/api/v1/stream/progress/${stream.streamId}`,27{headers}28).then(r=>r.json());2930console.log(`Progress: ${Math.round(progress.progress * 100)}%`);31console.log(`Speed: ${(progress.downloadSpeed / 1024 / 1024).toFixed(1)} MB/s`);3233if(progress.ready){34clearInterval(poll);35console.log("Stream is ready to play!");36}37},1500);38}Browse by Genre
Filter movies by genre category
1// Available genres: action, comedy, drama, romance,2// thriller, sci-fi, horror, animation, documentary,3// crime, fantasy45constgenre="sci-fi";6constmovies=awaitfetch(7`${BASE}/api/v1/home/genre/${genre}`,8{headers:{"x-api-key":API_KEY}}9).then(r=>r.json());1011movies.forEach(m=>{12console.log(`${m.title} — ${m.rating}/10`);13});Paginated Movie List
Fetch movies page by page
1// Get page 2 of popular movies2constpage=2;3constmovies=awaitfetch(4`${BASE}/api/v1/home/list/movie?page=${page}`,5{headers:{"x-api-key":API_KEY}}6).then(r=>r.json());78console.log(`Got ${movies.length} movies on page ${page}`);Authentication
Include your Firebase ID token in the Authorization: Bearer <token> header for authenticated requests (streaming, payments).