Skip to main content

How do the ispublic, isfriend and isfamily flags work in the Flickr API?

When you look up a photo in the Flickr API, you get a visibility object with three booleans. For example, this is from a flickr.photos.getInfo response:

<visibility ispublic="1" isfriend="0" isfamily="0"/>

You get similar attributes in the APIs that return a collection of photos. For example, this is from a flickr.people.getPhotos response:

<photo id="52559406969" ispublic="1" isfriend="0" isfamily="0" […]/>

I wanted to understand when and how these flags are set, so I ran an experiment with different configurations.

Methodology

I used two photos in the Flickr Foundation account:

Then I looked up these photos in the API with seven configurations:

For the “other Flickr member”, I used my personal account.

Conclusions

Results

In case they’re helpful, here’s my complete list of results for all combinations of privacy setting and viewer.

Results
looking up as photo owner
  private:
    {'id': 'private', 'ispublic': '0', 'isfriend': '0', 'isfamily': '0'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '0'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '0', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

looking up as public:
  private:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

looking up as other member (not contact):
  private:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

looking up as other member (friend only):
  private:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '0'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

looking up as other member (friend and family):
  private:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '0'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '0', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

looking up as other member (family only):
  private:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '0', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'private', 'ispublic': '0', 'isfriend': '1', 'isfamily': '1'}
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

looking up as other member (blocked):
  private:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}

  friends and family:
    {'id': 'public',  'ispublic': '1', 'isfriend': '0', 'isfamily': '0'}