The Movie Database Support

Hi Travis,

1) Will this link http://files.tmdb.org/p/exports/movie_ids_04_28_2017.json.gz always give me the most updated version containing the latest added movies?

2) When a new movie is added in the file, is it always added at the end of the file or might it be added anywhere in the file?

Thanks :)

17 replies (on page 1 of 2)

Jump to last post

Next pageLast page

Hi there,

1) Will this link http://files.tmdb.org/p/exports/movie_ids_04_28_2017.json.gz always give me the most updated version containing the latest added movies?

No. You need to query the current days export if you want the most recent export. movie_ids_03_21_2018.json.gz for today, as an example.

2) When a new movie is added in the file, is it always added at the end of the file or might it be added anywhere in the file?

I don't think the ids in the file are contiguous. This is because the file is written asynchronously with multiple workers. Therefore it is possible any one of those workers finishes before another one that is writing ids farther down the ID space.

I am not really concerned with the id order. What I want to know is the position in the file that the movies are added.

So for example if 5 movies are added in today's file, will that be the last 5 lines of the file? Or could they be added at any line in the 300,000+ lines?

If I compare today's file and yesterday's file, will the last 5 lines be the only difference?

So for example if 5 movies are added in today's file, will that be the last 5 lines of the file? Or could they be added at any line in the 300,000+ lines?

I believe they could be anywhere.

Hi again Travis,

I wasn't sure whether to open a new discussion but as my question is similar I thought it was better to reopen this one.

I have stored the movies in my database which I got from the daily export file. Now the next step I want to perform is an 'update' action to update the database with new movies and update any changed data of the existing ones.

1) Is there a way to get the new movies directly, or is the only way by comparing today's daily export file to find the movies that don't exist in yesterday's?

2) Reading through the API docs I think updating the movies already added in my database can be done with GET /movie/changes & GET /movie/{movie_id}/changes, but I wanted to make sure I understood correctly.

  • GET /movie/changes will give me a list of ids that are the ids of the movies that have one or more attributes changed

  • And then using that list, GET /movie/{movie_id}/changes will give me the specific attribute(s) of the movie that changed

Thanks in advance!

Is there a way to get the new movies directly, or is the only way by comparing today's daily export file to find the movies that don't exist in yesterday's?

Diffing the two files is probably the easiest. If it's something you are going to run daily, the other way would be to query the /movie/latest method and compare the value from the day before. The difference in 24 hours won't be too high, and iterating over just those ids would be easy as well.

Reading through the API docs I think updating the movies already added in my database can be done with GET /movie/changes & GET /movie/{movie_id}/changes, but I wanted to make sure I understood correctly.

Yes, that's correct.

Thanks for clarifying.

So reading the docs, I understand that /movie/latest returns only the latest movie. So the result will always be just 1 movie. Am I wrong? Does it return a list of all the movie ids that have been added in the last 24 hours?

Yes it's just a single id. What I was saying is that in a 24 hour period let's say ~170 movies get created. And by checking the latest at the same time every day you can built a simple tool to stay in sync:

  • March 31 - 515323
  • April 1 - 515493
  • April 2 - 515663

You know on April 2 that you only need to start at id 515493 and iterate up to 515663 to get check the newly created items. Iterating over 170 items a night is not very much.

Oh ok yeah that makes sense now thanks!

One more question, how often does the popularity of movies and people get updated?

No problem sunglasses

Popularity is updated every day. For ingesting popularity data, the easiest way would definitely be the ID exports.

Ok thanks :)

  1. Is the popularity linked between the movies? (in order for a movie's popularity to increase, another one's has to decrease?)

  2. If that's the case, doesn't this mean that since popularity gets updated every day, all movies would have their popularity updated and hence all be returned when using movie/changes ?

But clearly this is not the case so I'm missing something...

Is the popularity linked between the movies? (in order for a movie's popularity to increase, another one's has to decrease?)

No. It's an unbounded value that is solely tied to the data we track for popularity. That is detailed here.

If that's the case, doesn't this mean that since popularity gets updated every day, all movies would have their popularity updated and hence all be returned when using movie/changes ?

Changes tracks data changes only. Popularity is not tracked like that. It's just a value that goes up and down.

Ok so the only way to get the updated popularity is to get the value in the daily export? I am concerned because iterating through all the data daily is very difficult!

The current values are also available on the get details method. Those are the two best ways.

Ok thanks for the clarification!

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

გსურთ შეაფასოთ ან დაამატოთ ეს ელემენტი სიაში?

Შესვლა