# Random notes on tmdb
- Current tmdb rate limit is 40 requests for every 10 seconds
- Records (movies, people, etc.) in tmdb can be removed (either by accident or on purpose)
- Possible reasons for removal: record is a duplicate, record violates contributing guidelines
- If there are duplicate records then the earliest one will be kept (though not always https://www.themoviedb.org/talk/5c6afe320e0a2617779a93d3#5c6b3120c3a3684fabe720c5)
- If a movie was removed accidentally, it won't be restored under the same id https://www.themoviedb.org/talk/5bb44d2c0e0a261a17008fc2#5bb507299251415b64002578
- The old id is gone forever and won't be reused
- There is no way to determine new id for a movie if it was replaced by a new record (I assume it can only be handled manually) https://www.themoviedb.org/talk/5b4dca43c3a36823d8049f42 (but this might be solved in future https://trello.com/c/Dgrb7BJQ/125-store-the-original-merged-to-ids-when-a-duplicate-is-deleted)
- Lists of valid ids are published every day (https://developers.themoviedb.org/3/getting-started/daily-file-exports). They can be used for initial db scrapping.
- Then it has to be kept in sync. /movie/latest
endpoint returns the latest movie id. By comparing this id with the latest id in our db, we can get all the newly added movies ids.
- /movie/changes
endpoint gives us all the ids of the movies, that were changed (updated or removed) in the last 24 hours.