Skip to content

Title class

duck7000 edited this page Feb 11, 2025 · 89 revisions

List of all methods, with descriptions and what data they return

movietype()

  • This method gets movietype as displayed on title page. If not present Movie is returned so this is allways set.
  • Possible return values: TV Series, Movie, TV Episode, TV Special, TV Movie, TV Mini Series, Video Game, TV Short, Video

title()

  • This method gets title as displayed on title page.
  • Returns string main_title

originalTitle()

  • This method gets original title as displayed on title page.
  • Returns string main_original_title

year()

  • This method gets release year as displayed on title page.
  • Returns int year or empty string

endyear()

  • This method gets release end year as displayed on title page. Usually this is only the case for tv series.
  • Returns int | null

runtime()

  • This method gets all runtimes as displayed on title/technical page.
  • Returns array of array (time: int, country: string|null, annotations: array())

rating()

  • This method gets imdb rating as displayed on title page
  • Returns int/float or 0

votes()

  • This method gets imdb rating votes as displayed on title page
  • Returns int

metacritic()

  • This method gets metacritic rank as displayed on title page
  • Returns int

rank()

  • This method gets the current popularity rank, change direction and difference with the previous rank of a title.
  • Returns: array(currentRank: int, changeDirection: string, difference: int)

faq()

  • This method gets all frequently asked questions of a title. It includes questions without a answer
  • @param $spoiler boolean include spoilers or not, isSpoiler indicates if the question is spoiler or not.
  • Returns: array of array(question: string, answer: string, isSpoiler: boolean)

recommendation()

  • This method gets 12 recommended titles related to the current title.
  • Image thumbnail is cropped from center, 140x207 pixels
  • @note thumbnail width and height are in config, keep ratio in mind when changing!
  • Returns: array of array(title: string, imdbid: string, rating: int, img: string, year: int)

language()

  • This method gets all languages spoken in this title
  • Returns array (array[0..n] of strings) for each language

genre()

  • This method gets all main and sub genres this title is registered for
  • Returns array genres (array[0..n] of mainGenre| string, subGenre| array())

plotoutline()

  • This method gets the main Plot outline for this movie as displayed on top of title page.
  • Returns string

photo()

  • This method gets the main photo image url for thumbnail or full size
  • thumbnail is cropped from center, 190x281 pixels, full is max 1000 pixels
  • @note thumbnail width and height are in config, keep ratio in mind when changing!
  • Returns string url or false

country()

  • This method gets all countries from this title
  • Returns array[0..n] of strings for each country

alsoknow()

  • This method gets title alternative names based on different countries as shown on release info page. First item in output array will be original title
  • @return array<array{title: string, country: string|Unknown, countryId: string, language: string, languageId: string, comment: array()}>
  • Ordered Ascending by Country

releaseDate()

  • This method gets all release dates of this title
  • Returns array of array(country: string , day: int , month: int, year: int, attributes: array())

mpaa()

  • This method Gets the MPAA rating / Parental Guidance / Age rating for this title by country
  • Returns array of array(country: string , rating: string ,comment: array())

parentsGuide()

  • This method Gets Info for parents like Violence, Drugs. Alcohol etc
  • @param $spoil boolean true: spoilers included, false: spoilers not included
  • Returns array() categorized array of array()
  • [nudity] => Array
  •  [severity] =>           (string) None (like mild,severe,none etc)
    
  •  [severityVotedFor] =>   (int) 34 (how many people voted for this severity)
    
  •  [totalSeverityVotes] => (int) 64 (total amount of voters)
    
  •  [guideItems] => Array()
    
  •      [0] => Array()
    
  •          [isSpoiler] => (boolean) (indicates if entry is a spoiler or not)
    
  •          [guideText] => (string) A couple in swimwear are seen lying in a sexualised pose together.
    

top250()

  • This method gets the position of a movie or tv show in the top 250 ranked movies or tv shows
  • Returns int or 0

plot()

  • This method gets all title plots without Synopsis
  • Returns array of array(plot: string , author: string)

tagline()

  • This method gets all taglines from this title
  • Returns array[0..n] of strings for each tagline

principalCredits()

  • This method gets prinicipal credits as displayed on top title page. It can contain director, writer, creator and stars. Not all categories are always available
  • Limited to 3 items for each category
  • Returns array[category] of array(name: string , imdbid: string)

cast()

  • This method gets all cast members, their played characters, Image url and comments
  • thumbnail is cropped from center, 32x44 pixels
  • Returns array cast (array[0..n] of array(
  • imdb: string
  • name: string
  • alias: string
  • credited: true|false (true if credited, false if stated uncredited)
  • array character (all characters this person plays in this title)
  • array comments (all comments like archive or voice)
  • thumb: string url

director()

  • This method gets all directors of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

cinematographer()

  • This method gets all cinematographers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

writer()

  • This method gets all writers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • Note: episode info IS accurate for each writer, however it is in total, not per separate job.
  • thumbnail size 140x207 fixed

producer()

  • This method gets all producers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

composer()

  • This method gets all composers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

stunts()

  • This method gets all stunts credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

thanks()

  • This method gets all thanks credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

visualEffects()

  • This method gets all Visual Effects credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

specialEffects()

  • This method gets all Special Effects credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • thumbnail size 140x207 fixed

crazyCredit()

  • This method gets all crazy credits of this title
  • Returns array() with each index a crazy credit

episode()

  • This method gets all seasons/years and all episodes of this title. The outer array index reflects the real season or year! Episodes can start at 0 (pilot episode) Season/year can be -1 (unknown)
  • @param $thumb boolean true: thumbnail is cropped from center, 224x126 pixels, false: full is max width 1000 pixels
  • @note thumbnail width and height are in config, keep ratio in mind when changing!
  • @param $yearbased int This gives user control if returned episodes are year based (1)or season based (0), default: 0 (season based)
  • Returns array episodes (array[0..n] of array(
  • imdb: string
  • title: string
  • airdate: string
  • airdateParts: array(day|int, month|int, year|int)
  • plot: string
  • season: int can be seasonnumber, year or -1 (unknown)
  • episode: int can be episodenumber can be 0( pilot episode) or -1 (unknown)
  • imgUrl: string image url))

isOngoing()

  • This method returns whether a tv series is ended or still running.
  • @return boolean true: still running, false: ended or NULL (not a tv series)

goof()

  • This method gets all goofs from goofs page of this title
  • @param $spoil false: exclude spoilers, true: include spoilers
  • @return array goofs (array[categoryId] of array[content, isSpoiler]

quote()

  • This method gets all quotes from quotes page of this title.
  • Returns array , every index is a quote.

trivia()

  • This method gets all trivia from trivia page of this title. Default spoilers are excluded.
  • @param $spoil false: exclude spoilers, true: include spoilers
  • @return array (array[categoryId] of array[content, names: array(name, id), trademark, isSpoiler]

soundtrack()

  • This method gets all soundtracks listed at the soundtrack page of this title.
  • Returns array of array(soundtrack: string|Unknown , credits: array of strings, creditSplit array(creditType: string, name: string, id: string, attribute: string) array comments())
  • result array looks like this
  • Array()
  •  [0] => Array()
    
  •      [soundtrack] => (string) Dangerous
    
  •      [credits] => Array()
    
  •          [0] => (string) Performed by The Doobie Brothers
    
  •          [1] => (string) Written by Patrick Simmons (as Pat Simmons)
    
  •          [2] => (string) Published by Soquel Songs and ASCAP
    
  •          [3] => (string) Courtesy of Capitol Records
    
  •      [creditSplit] => Array()
    
  •          [creditors] => Array()
    
  •              [0] => Array()
    
  •                  [creditType] => (string) Written by
    
  •                  [name] =>       (string) Patrick Simmons
    
  •                  [nameId] =>     (string) 2003944
    
  •                  [attribute] =>  (string) as Pat Simmons
    
  •          [comment] => Array()
    
  •              [0] => (string) Courtesy of Capitol Records 
    

location()

  • This method gets all filming locations listed at the locations page of this title.
  • Returns array of array(real: string , movie: array of strings)
  • real: the actual real location.
  • movie: the scene in the movie

prodcompany()

  • This method gets all production companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

distcompany()

  • This method gets all distribution companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

specialcompany()

  • This method gets all special effects companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

othercompany()

  • This method gets all miscellaneous companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

connection()

  • This method gets all connections from this title related to other titles.
  • Returns: array of array(titleId: string, titleName: string, titleType: string, year: int, endYear: int, seriesName: string, description: string)

extSites()

  • This method gets external websites with info of this title, excluding external reviews.
  • Returns: array of array('label': string, 'url': string, 'language': array[]))

budget()

  • This method gets production budget
  • Returns array(amount: int, currency: string)

gross()

  • This method gets Info about Grosses, ranked by amount
  • Returns array (areatype: string, amount: int, currency: string)
  • area type: part of the world for this gross (world wide, domestic etc)

keyword()

  • This method gets all keywords listed at keywords page of this title
  • Returns array keywords

alternateversion()

  • This method gets all alternative versions of this title
  • Returns array strings

mainphoto()

  • This method gets (default 6) photo’s from photo page of this title
  • @note thumbnail height is set in config (default: 100px)
  • @parameter $amount controls how many photos are returned (max 9999)
  • @param $thumb boolean
  •  true: height is always the same (set in config), width is variable!
    
  •  false: untouched max width 1000 pixels
    
  • Returns array of strings image urls

trailer()

  • ATTENTION: this is a special method, it only returns trailer urls that can/may be used embedded like in a iframe tag. It will continue to loop all trailers to find that specific trailer and only stops when $amount is reached, so when there are a large amount of trailers available this will take a long time!
  • This method gets trailer urls and image urls from trailer page of this title
  • @param $amount (int) controls how many tested trailers are returned, default: 1
  • @param $customThumb boolean, default: true
  •  true: old style imdb custom thumb (incl runtime, title etc) (fixed 200x150)
    

390898577-67e6a6c3-0547-4079-91f4-bf8ccaa746a2

  •  false: new style (fixed 500x281)
    

large

  • videoUrl: url is on the fly tested to work in iframe (won’t work in html5 video tag) This testing will continue until $amount is reached, so with a large amount of urls this can take a long time!
  • imageUrl: image for this videoUrl including all text in the image like trailer, provider, length, title and play button fused in the image.
  • Returns array of array
  •  [0] array()
    
  •      [id] =>             (string) (without vi) 4030506521
    
  •      [name] =>           (string) (name of trailer) e.g. A Clockwork Orange
    
  •      [runtime] =>        (int)    (in seconds!) 130 
    
  •      [description] =>    (string) (description text of this trailer)
    
  •      [titleName] =>      (string) (name of Title) e.g. A Clockwork Orange
    
  •      [titleYear] =>      (int)    1971
    
  •      [playbackUrl] =>    (string) https://www.imdb.com/video/vi4030506521/
    
  •      [imageUrl] =>       (string) (affected by $customThumb)
    

video()

  • This method gets all videos from videos page of this title
  • Thumbnail is fixed, 500x281 pixels
  • Returns categorized array of videos
  • [Trailer] => Array
    
  •      [0] => Array()
    
  •          [id] =>          (string) (videoId) 4030506521
    
  •          [name] =>        (string) (Name of the video) A Clockwork Orange
    
  •          [runtime] =>     (int) (in seconds!) 130
    
  •          [description] => (string) description text
    
  •          [titleName] =>   (string) (name of the title) A Clockwork Orange
    
  •          [titleYear] =>   (int) 1971
    
  •          [playbackUrl] => (string) https://www.imdb.com/video/vi4030506521/
    
  •          [imageUrl] =>    (string) 
    

mainaward()

  • This method gets prestigious Award Summary. Those are the listed on the title page, it includes only prestigious ones.
  • Returns array ([award]: string , [nomination]: int , [wins]: int)

award()

  • This method gets all awards from a title
  • Sort is fixed by: PRESTIGIOUS, order: DESC (prestigious first, highest first, just like the imdb awards page)
  • This method uses 2 parameters, $winsOnly and $event:
  @parm $winsOnly Default: false Set to true will only get won awards
  @param $event Default: "" with this you can limit the results to specific events like oscar
      Possible values for $event:
      "ev0000003" (Academy Awards USA) (Oscar)
      "ev0000223" (Primetime Emmy Awards) (Emmy Award)
      "ev0000292" (Golden Globes USA) (Golden Globe)
      "ev0000471" (National Society of Film Critics Awards, USA)
      "ev0000004" (Academy of Science Fiction, Fantasy & Horror Films, USA)
      "ev0000123" (BAFTA Awards)
      "ev0000296" (Satellite Awards)
      "ev0000453" (MTV Movie + TV Awards)
      "ev0000511" (Online Film Critics Society Awards)
      "ev0000786" (Empire Awards, UK)
      "ev0001644" (DVD Exclusive Awards)
      "ev0002704" (Online Film & Television Association)
      "ev0002990" (Awards Circuit Community Awards)
      "ev0003023" (Golden Schmoes Awards)
      "ev0000133" (Critics Choice Awards)
      "ev0000403" (London Critics Circle Film Awards)
      "ev0000530" (People's Choice Awards, USA)
      There are even more..
  • Returns array[festivalName][0..n] of of array(
  • awardYear: int (-1 if no data) The year of the event
  • awardWinner: Bool true or false True if won
  • awardCategory: The category from the award like best actor
  • awardName: Name of the award like Oscar
  • awardPerons array:
    • creditId Id of the credited person
    • creditName Name of the credited person
    • creditNote Any comments added
    • nameFullImageUrl (string) max width 1000 pixels
    • nameThumbImageUrl (string) 140x207 pixels fixed
  • awardNotes: Any notes like Based on the novel
  • awardOutcome: Like Nominee or Winner
  • total array
    • win Total wins (int)
    • nom Total Nominated (int)

sound()

  • This method gets all sound formats of this title
  • Returns array of array(type: string, attributes: array())

color()

  • This method gets all color formats of this title
  • Returns array of array(type: string, attributes: array())

aspectRatio()

  • This method gets all aspect ratio formats of this title
  • Returns array of array(type: string, attributes: array())

camera()

  • This method gets all camera types used in this title
  • Returns array of array(type: string, attributes: array())

featuredReview()

  • This method gets 5 featured reviews of a title. (only 5 available)
  • Returns: array of array(authorNickName|string, authorRating|int, summaryText|string, reviewText|string, submissionDate|iso date string)

isAdult()

  • This method gets adult status of this title
  • Returns boolean

watchOption()

  • watch options by category for this title
  • @Note: (DEC 2024) Only Amazon providers are returned, no others!
  • logo thumbnail is PNG, fixed 250x250 pixels
  • @return categorized array()
  • [rent/buy] => Array()
  • [0] => Array
    
  •     [providerId] =>     (string) amzn1.imdb.w2w.provider.prime_video
    
  •     [providerName] =>   (string) Prime Video
    
  •     [logoUrl] =>        (string) (PNG!) https://m.media/*/6e._V1_QL100_UX250_.png
    

productionStatus()

  • This method Get current production status of a title
    e.g. Released, In Development, Pre-Production, Complete, Production etc.
  • Returns string status

news()

  • Get news items about this title, max 100 items!
  • Thumbnail, fixed 500x281 pixels
  • @return array() of array()
  •  [id] =>                 (string)
    
  •  [title] =>              (string) e.g. The best movies on Netflix right now
    
  •  [author] =>             (string) e.g. The A.V. Club
    
  •  [date] =>               (string) e.g. 2024-12-01T02:00:00Z
    
  •  [extUrl] =>             (string) e.g. https://www.avclub.com/1842540580
    
  •  [extHomepageUrl] =>     (string) e.g. http://www.avclub.com/content/home
    
  •  [extHomepageLabel] =>   (string) e.g. avclub.com
    
  •  [textHtml] =>           (string) (including html)
    
  •  [textText] =>           (string)
    
  •  [thumbnailUrl] =>       (string)
    

checkRedirect()

  • This method is a helper that Checks if imdbid is redirected to another id or not.
  • It sometimes happens that imdb redirects an existing id to a new id.
  • If user uses search class this check isn't necessary as the returned results already contain a possible new imdbid
  • @var $this->imdbID The imdbid used to call this class
  • @var $titleImdbId the returned imdbid from Graphql call (in some cases this can be different)
  • @return $titleImdbId (the new redirected imdbId) or false (no redirect)
    Extra info about this:

IMDb data is constantly being updated, both with the addition of new data and enhancement of the quality of existing data. While there is only ever one unique IMDb identifier, there are, on occasion, instances where there might be duplicate entries for the same entity. This could happen, for instance, if multiple users have contributed data for the same entity (e.g. the same person) under different identifiers (e.g. different name ids). In this case IMDb maintains both identifiers in the data set, effectively duplicating the data. This allows you to continue using any matching you have between IMDb identifiers and other identifiers. To identify when this is the case a remappedTo field is included in the bulk data sets and the title.meta.canonicalId and name.meta.canonicalId field is included in the API. From these fields, you get the new preferred identifier for that entity.

The Big Bang Theory pilot episode has multiple Title ID entries referring to the same episode: tt1044014 (the Title ID that has been remapped) and tt0775431 (the preferred Title ID). When you retrieve either the remappedTo value from the Bulk Data or the title.meta.canonicalId for Title ID tt1044014, you will receive the preferred Title ID tt0775431.