How to automatically create href to imdb person knowing only "name" eg "Tom Hanks"

  • 2
  • Question
  • Updated 1 year ago
  • Answered
I am creating movie pages for my web site automatically and would like to add href in the code to imdb actors. I know the actors names but not the nconst in IMDB. So, how do I automatically create href to imdb person knowing only "name" eg "Tom Hanks"

Photo of Norman

Norman

  • 1 Post
  • 0 Reply Likes

Posted 1 year ago

  • 2
Photo of Dan Dassow

Dan Dassow, Champion

  • 14194 Posts
  • 14903 Reply Likes
Hi Norman,

If you plan to use any content from IMDb, you should heed:
Content licensing
IMDb licenses content to a wide selection of businesses including movie studios, cable companies, websites, video retailers, software developers, electronics manufacturers, mobile applications, and more. We offer content licensing packages that are customized to meet your needs based on your specific audience and the data being licensed. IMDb licensing content includes: cast & crew, user ratings, plot summaries, release dates, box office, keywords, filmography credits, awards, biographies, nicknames and more.

To learn more, please contact our Licensing Department for further information.

Please see our Content Subscription Service Terms and Conditions.
IMDb prefers that you link to names in IMDb using name ID:
https://www.imdb.com/name/{Name-ID}/
where {Name-ID} is of the form: nm1234578

For example:
The Name ID for Tom Hanks is nm0000158. The link for Tom Hanks is https://www.imdb.com/name/nm0000158/

Alternately, you can use IMDb's format for Name searches:
https://www.imdb.com/find?ref_=nv_sr_fn&q={Name}#nm
where {Name} is the name of the person with plus signs ("+") for spaces:

For example:
This is the name search for Tom Hanks:
https://www.imdb.com/find?ref_=nv_sr_fn&q=Tom+Hanks#nm

The down side to using IMDb Name searches is that you are not guaranteed a result and may receive multiple results.
Photo of Jeorj Euler

Jeorj Euler

  • 7276 Posts
  • 9498 Reply Likes
Hi, Norman. That is not something that can be easily automated without some risk of false positives. The IMDb Help article "Can I use IMDb data in my software?" should be of interest to you, as far as getting started with the most comprehensive methods of gathering information. The IMDb dataset "name.basics.tsv.gz" includes "Known For" data, which helps disambiguate separate people who have the same name. Unfortunately, in order sort information according to IMDb's proprietary popularity metric, the Advanced Name Search (ANS) would have to be used, and evaluating the actual ranking figures requires an active IMDbPro subscription.
(Edited)

This conversation is no longer open for comments or replies.