Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8955741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:37:13+00:00 2026-06-15T14:37:13+00:00

First post here, so I hope this is enough detail. I started using freebase-python

  • 0

First post here, so I hope this is enough detail.

I started using freebase-python today to get film information for a program that I’m working on. One thing that I need to grab is a list of actors that starred in a film. I’ve followed some tutorials and guides on the way to do this, and can get a list of films for a director or the director of a film, but when I try to do the same with an actor or a film’s cast, I get ‘null’ results.

I have the same problem in both Python and the Freebase MQL Query Editor, and you can see what I’ve tried below. Links to all of the examples below written in the editor can be found here, as Stack Overflow wouldn’t let me post links underneath each example on my first post!

Working director query in Python:

import freebase
fb = freebase.mqlread
q = {'type':'/film/film', 'name':'Inception', 'directed_by':[]}
fb(q)

Working director’s filmography query in Python:

import freebase
fb = freebase.mqlread
q = {'type':'/film/director', 'name': 'Christopher Nolan', 'film':[]}
fb(q)

Based on these tests, I tried to do the same with actors, but with odd results:

Not working cast list query in Python:

import freebase
fb = freebase.mqlread
q = {'type':'/film/film', 'name':'Inception', 'starring':[]}
fb(q)

Not working actor’s filmography query in Python:

import freebase
fb = freebase.mqlread
q = {'type':'/film/actor', 'name':'Leonardo DiCaprio', 'film':[]}
fb(q)

Strangely, I get an accurate number of actors/films back, but no names. Does anyone have any idea what the problem might be? Thanks a lot, I’d appreciate any advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:37:15+00:00Added an answer on June 15, 2026 at 2:37 pm

    That’s because films and actors are not connected directly, but instead through a “mediator” node with no name. This is because there are three things to be connected at once: 1) the film, 2) the actor, and 3) the role/character.

    Before writing any MQL, you need to review the schema of the domain/types that you want to work with to see how the information is stored.

    Note also that if you just match on names, your going to get duplicates for remakes, etc. You should keep track of IDs to disambiguate everything. Here’s modified query:

    [{
      "type": "/film/film",
      "name": "Inception",
      "mid":  null,
      "starring": [{
        "actor": null,
        "mid":   null
      }]
    }]​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My first post here, so i hope this is the right area. I am
This is my first time here so I hope I post this question at
First post here, so I hope it is detailed enough. While developing an Iphone
This is my first post here so I hope you could help me with
this is my first post here on stackoverflow, so I hope I'm doing this
First post on here, so I hope I'm clear enough. I have a table
I am new to Python, and this is my first post in here, so
this is my first post here so I hope I provide all the right
This is my first post here and I really hope, that someone could help
Hi this is my first post here hope you all are well. So Im

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.