8
6 Comments

Store API data

I am using an API the tmdb api for movies to be specific. I wish to store the api data in to a database so I have to make less api queries, however I am not sure if there is legal restrictions and yes this is for a commercial app.
If I can't store the data in the database would that mean i would have to curate all the movie information my self then store in a database?

on August 30, 2020
  1. 2

    What is the difference between a commercial API and a developer API?
    A commercial API is for commercial projects and a developer API is for developers. Your project is considered commercial if the primary purpose is to create revenue for the benefit of the owner.
    https://www.themoviedb.org/faq/api

    I have a feeling you should be paying, it's their terms, IDK... not reading everything and not a legal consult...
    There isn't a generic how API should be used you should see the specific terms they claim..

    Generally for storing the data, you either reconstruct the data module (might just find full DB offers) or cache the call results with something like Redis which is simple
    If key existent, return key if not do call and store key

  2. 1

    It is surely tough to build a advanced shopify clone from scratch. In my opinion you ought to focus on a gap marketplace or sell a Bape clothing to shopify like volkan said.

  3. 1

    How can we use the API data for single page? I want to test it for the ecommerce store, you can see here https://malekgreenhouse.ir/

  4. 1

    Wouldn't a simple expiring cache do the trick? They don't rate limit https://developers.themoviedb.org/3/getting-started/request-rate-limiting so the only reason to try to have the data yourself is if you are doing complex queries of some sort across movies.

    1. 1

      I do plan only allowing users to favourite movies and also the Web app will be able to recommend movies to users. So i think storing in a dB might be best. What do you think?

      1. 1

        Depends - are the recommendations only based on user's favourites? If so you will of course already have favourite data in your database. Then this just becomes a performance problem and the cache would solve that. Otherwise some aspect of the data you are using might change over time and you don't want to be maintaining tmdb yourself.

        I'm afraid without knowing what you are doing I can't really advise more. To complicate things even more even if you need a cache you don't necessarily need a centralized one. Uclusion caches all user data in IndexedDB.

Trending on Indie Hackers
I built a text-to-video AI in 30 days. User Avatar 70 comments What 300 Builders Taught Us at BTS About the Future of App Building User Avatar 52 comments From a personal problem to a $1K MRR SaaS tool User Avatar 47 comments This Week in AI: The Gap Is Getting Clearer User Avatar 38 comments How An Accident Turned Into A Product We’re Launching Today User Avatar 29 comments 🚀 From Frustration to Foundation: The Indie Hacker Story Behind Building aDirectory User Avatar 22 comments