The Movie Database Support

Hi, First I would like to thank you for always having a prompt response.

Anyway, Im pulling an api call every time they type a new letter, but i only get to 4 letters before it blows up.

I guess my Question is, each time it pulls an api call is it only once? or is it dependent on how much info im pulling from it?

Reason I ask is Because I grab, poster, title, year and overview no problem, but when I add in my snippet to scrape the ID as well, It tends to Blow up.

Apologies if this question wasn't to clear, Thanks.

1 reply (on page 1 of 1)

Jump to last post

Hi @Deekan142

First I would like to thank you for always having a prompt response

You're welcome 😉

I guess my Question is, each time it pulls an api call is it only once? or is it dependent on how much info im pulling from it?

A request is a request, there's no more to it than that. It's only a single call. If you make extra calls to other methods than those are extra calls.

I'm inclined to say you're running into our rate limiting. If you did a search and then try to load the details from the ID method for all 20 items, that means each search is 1+20, so 21 calls. A second letter would be 42 calls. And now you're probably tripping the rate limits.

Instead of blindly calling the id method for each item, it would be better to lazy load them based on what's showing in view. The other thing to keep an eye on is how often you're sending the keystroke to search. Most autocomplete type plugins have an option for how often they send the query back to the server and you could play with that to be more in the 500ms-1000ms range.

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

ყველგან

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

მედიის გვერდზე

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

ტელევიზიის სეზონების გვერდზე

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

ტელევიზიის ეპიზოდების გვერდზე

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

გამოსახულებების გვერდზე

a open add image window

რედაქტირების ყველა გვერდზე

t open translation selector
ctrl+ s submit form

დისკუსიების გვერდზე

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

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

ავტორიზაცია