Skip to content

KeywordSearch

duck7000 edited this page Nov 15, 2024 · 2 revisions

Description of the working

You can use this class to search specifically on keywords at imdb GraphQL API
Results will be just like imdb is doing on their keyword search page:
https://www.imdb.com/find/?s=kw&q=nihilism

Calling the class

$imdb = new \Imdb\KeywordSearch();
$results = $imdb->searchKeyword("nihilism");

Config Option:

  • $keywordSearchAmount: 30 (this limits the search results, default: 30)
  • Range: 1-9999

Search parameters

  • $keywords: input keywords string including double quotes e.g ("nihilism" or "sex drugs")
  • use specific keywords, words like sex or drugs will not be very useful, as those are to common

Results

Results array indexes can be used as keyword input in TitleSearchAdvanced class to get all titles with that specific keyword

@return
Array

  • [nihilism]
    
  •     [keywordId] => 0022341 (without kw)
    
  •     [totalTitles] => 517
    
  • [reference to nihilism]
    
  •     [keywordId] => 0467796
    
  •     [totalTitles] => 1
    
Clone this wiki locally