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

  • 2
  • Question
  • Updated 2 years 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


  • 1 Post
  • 0 Reply Likes

Posted 2 years ago

  • 2
Photo of Dan Dassow

Dan Dassow, Champion

  • 16270 Posts
  • 18142 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:{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

Alternately, you can use IMDb's format for Name searches:{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:

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

  • 7402 Posts
  • 9811 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.

This conversation is no longer open for comments or replies.