0

I try to get the filmography of a given actor include films, TV series. For example, to get list of films with Zhao Wei I used the query but it can not list TV series.

How can I get TV series too. Or how can I list the cast members of a TV series?

SELECT DISTINCT ?film ?pubDate ?filmLabel WHERE {
   ?film wdt:P31 wd:Q11424 .
   ?film wdt:P577 ?pubDate .
   ?film wdt:P161 wd:Q197471 .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
 } ORDER BY DESC(?pubDate)
LIMIT 50
Kieran Dang
  • 447
  • 2
  • 17
  • 1
    Do you have an example TV series that exists in Wikidata for the given actor? The Wikidata type to query for would be `wd:Q21191270` but for your actor, no results are returned. So I don't know if this data really exists. That's why I'm asking for an example series that you know to be contained in Wikidata. – UninformedUser Dec 03 '17 at 20:15
  • I think it should be because I find Q21191270 usually have no cast member information `{ ?film (p:P31/ps:P31/wdt:P279*) wd:Q11424. } UNION { ?film p:P31/ps:P31/wdt:P279* wd:Q5398426 . } UNION { # Q3464665 TV series season/Q21191270 TV series episode ?film wdt:P361 wd:Q5398426 . }` – Kieran Dang Dec 06 '17 at 04:44

1 Answers1

0

This work for Will Smith: Q40096. It returns movies like "Men in Black", and TV Shows like "Fresh Prince of Bel-Air".

SELECT ?item ?itemLabel
WHERE
{
  ?item wdt:P161 wd:Q40096.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Nick Caruso
  • 477
  • 4
  • 10