Sticky 

Machine tags

straup PRO 6:11pm, 24 January 2007
[Note : I work here and this message was also sent to the API mailing list]

We are rolling out a new feature called "machine tags" that allows users to be more precise in how they tag, and how they search, their photos.

Many of you may already be familiar with machine tags by another name (triple tags) or because you are already using them, informally, in your code (for example, "geo:long=123.456").

"Machine tags" is the technical term for the extra hamsters we've added to the Flickr servers to formalize how these sorts of tags are treated. I've included a "Ceci n'est pas un FAQ" below with all the details.

For the moment, machine tags are principally an API "thing". The photo pages have been updated to display tags a little differently but otherwise all the magic you can perform with machine tags happens here at the API layer. (This includes the special wildcard syntax for searching photos with machine tags.)

Enjoy!

---

# What are machine tags?

Machine tags are tags that use a special syntax to define extra information
about a tag.

Machine tags have a namespace, a predicate and a value. The namespace defines a class or a facet that a tag belongs to ('geo', 'flickr', etc.) The predicate is name of the property for a namespace ('latitude', 'user', etc.) The value is, well, the value.

Like tags, there are no rules for machine tags beyond the syntax to specify the parts of a machine tag. For example, you could tag a photo with :

* flickr:user=straup

* flora:tree=coniferous

* medium:paint=oil

* geo:quartier="plateau mont royal"

* geo:neighbourhood=geo:quartier

Flickr has already used machine tags, informally, on a couple of occasions :

- When we launched Maps, we provided a way for people who had
"geotagged" their photos to import their location data. This was
done using the "geo:lat=..." and "geo:lon=..." tags.

- When a user tags an event with an upcoming ID (for example :
"upcoming:event=81334") we display a link back to the upcoming.org
site. A similar example is the excellent "Flickr Upcoming Event"
greasemonkey script :

userscripts.org/scripts/show/5464

Dan Catt wrote a very good piece about machine tags - he called them "triple tags" - last year :

geobloggers.com/archives/2006/01/11/advanced-tagging-and-...

Update : Dan's gone and written another excellent piece about all of this stuff now that we've launched machine tags:

geobloggers.com/archives/2007/01/24/offtopic-ish-flickr-r...

---

# What is the spec for machine tags?

Machine tags are divided in to three parts :

1) A "namespace" :

Namespaces MUST begin with any character between a - z; remaining
characters MAY be a - z, 0 - 9 and underbars. Namespaces are
case-insensitive.

2) A "predicate" :

Predicates MUST begin with any character between a - z; remaining
characters MAY be a - z, 0 - 9 and underbars. Namespaces are
case-insensitive.

3) A "value" :

Values MAY contain any characters that a "plain vanilla" tags
use. Values may also contain spaces but, like regular tags, they
need to wrapped in quotes.

Namespace and predicates are separated by a colon : ":"

Predicates and values are separated by an equals symbol : "="

For example :

* flickr:user=straup

* geo:locality="san francisco"

---

# Why can't I use non-ASCII characters for namespaces and predicates ?

Simple steps, first.

---

# Can I define another machine tag as the value of a machine tag?

Sure, but it will not be processed as a machine tag itself.

---

# How do I add machine tags?

By adding tags! No, really.

Machine tags are added *exactly* the same as any other tag whether it is done through the website or the API.

When the Flickr supercomputer processes your tags, we take a moment to check
whether it is a machine tag. If it is we leverage the powerful Do What I Mean engine to, well, do what you mean.

---

# How do I query machine tags?

Via the API!

Specifically, using the "machinetags" parameter in the 'flickr.photos.search' method. Like tags, you can specify multiple machine tags as a comma separated list.

---

# Can I query the various part of a machine tag?

Yes. Aside from passing in a fully formed machine tag, there is a special syntax for searching on specific properties :

* Find photos using the 'dc' namespace :

{"machine_tags" => "dc:"}

* Find photos with a title in the 'dc' namespace :

{"machine_tags" => "dc:title="}

* Find photos titled "mr. camera" in the 'dc' namespace :

{"machine_tags" => "dc:title=\"mr. camera\"}

* Find photos whose value is "mr. camera" :

{"machine_tags" => "*:*=\"mr. camera\""}

* Find photos that have a title, in any namespace :

{"machine_tags" => "*:title="}

* Find photos that have a title, in any namespace, whose value is "mr. camera" :

{"machine_tags" => "*:title=\"mr. camera\""}

* Find photos, in the 'dc' namespace whose value is "mr. camera" :

{"machine_tags" => "dc:*=\"mr. camera\""}

---

# Is there a limit to the number of machine tags I can query?

Yes. The limit depends on the tag mode (ALL or ANY) that you are querying
with. "ALL" (AND) queries are limited to (16) machine tags. "ANY" (OR) queries are limited to (8).

---

# Can I do range queries on machine tags?

No. Not yet, anyway.

It is a hard problem for reasons far too dull to get in to here. It's on the list.

---

# Are machine tag namespaces reserved?

No. Anyone can use a namespace for anything they want.

If you are concerned about colliding namespaces you should consider adding an additional machine tag to define your namespace. For example :

dc:subject=tags
xmlns:dc=http://purl.org/dc/elements/1.1/

Like tags, in general, we expect (hope?) that the community will develop its own standards by consensus over time.

---

# What about all the machine tags that are already in the Flickr database?

At the moment, they are still treated as plain old tags.

We have plans to go back and re-import them as machine tags but for now, only new tags will be processed as machine tags.

In the meantime, if you re-save a machine from the 'edit this tag' page it will be re-imported as a machine tag.

---

# Is the predicate *really* a predicate?

You are in a dark cave. In the corner is a fire and a man making bunny shadows on the wall with his hands. Whether or not it's really a 'predicate' depends on how much time you spend on the semantic-web mailing list. ;-)

It's close enough to being a predicate that it makes for a good short-hand.

---

# Wait, aren't machine tags just RDF?

No, machine tags are not RDF; they could play RDF on television, though.

See also :

weblog.scifihifi.com/2005/08/05/meta-tags-the-poor-mans-rdf

---

# Huh, what is RDF ?

RDF Describes Flickr. That's really all you need to know about RDF.
Jef Poskanzer PRO 11 years ago
Nice.

For your convenience, here's a pointer to the rest of my suggestions about machine tags: www.flickr.com/groups/api/discuss/72157594355854310/
admin
dopiaza PRO 11 years ago
This is great news - thanks very much!
aefitzhugh 11 years ago
Really nice to see this go live! Only wish I had time to play with it right now....
Dan Coulter PRO 11 years ago
If anyone is interested in joining a group to discuss a standardized system for assigning these machine tags, check out this group that I setup: flickr.com/groups/mtags/

Anyone and everyone is welcome.
dajobe PRO Posted 11 years ago. Edited by dajobe (member) 11 years ago
I've just noticed that API calls returning a tag element now have a new XML attribute machine_tag="0" or "1".
factoryjoe PRO 11 years ago
Rock on. I think this is cool. (If it's not, someone tell me, m'kay?)
stuartwhite Posted 11 years ago. Edited by stuartwhite (member) 11 years ago
Fantastic Stuff... I wondered what this was all about last night when I added a new feature to my website (www.pinkspots.net). the feature allows users to tag flickr photos of bars/clubs with special tags in order to display those particular photos of on the related venue page of my site.

I was adding the tags in the format pinkspots:venue=venueid and when testing the feature by tagging a few of my own photos they were appearing in flickr as Machine Tags - this confused me, but now it all makes sence! - thank you straup for clearing this up for me, and thanks flickr for doing such a grand job!
staffies2002 11 years ago
This is one of the great improvement!!! I'm so excited :-) Wonderful idea
rhodes 11 years ago
This all sounds very appealing to me. Especially the API integration. I'm curious to see new community built extensions coming out of this.
Glad to see the range querying is on the list.
cdevroe 11 years ago
I like the idea for sure, I just wonder if this feature would ever get any real traction with the end user? Will there be an interface built by Flickr to add machine tags to our photos?
danbri PRO 11 years ago
This is great stuff :) Still digesting what exactly it means in practice. Eg. whether I could set up default tag prefix URIs for my stream somehow so I don't need to declare xmlns:dc once for each photos. And wondering how, if at all, the Perl CPAN Flickr archiver will turn these tags into RDF...
Tom (hmm a rosa tint) 11 years ago
cdevero: Look at the upcoming.org example, with the right interfaces I'm betting this will get a lots of traction.
cdevroe 11 years ago
Tom: Oh, I have no doubt that this will be picked up by the "Web 2.0" community at large. In fact, it already has it seems.

I'm talking about the Moms and Pops out there that, even though Flickr makes tagging dead simple, still have problems using tags at all.

I suppose my question was: Will the interface for ADDING tags be updated to accommodate machine tags and make them more mainstream?
Wooble 11 years ago
I'm not sure it makes much sense for the Flickr site to do anything more wrt adding machine tags than it does already; surely to do more than letting users enter them manually the site would need to know the details of every single namespace being used by anyone anywhere and then put some incredibly complex UI in to handle entering them?
stillthedudeabides 11 years ago
Awesome! I've been wanting something like this forever... Specifically, I want to add a machine tag which identifies the original photo on my computer without polluting my "tag namespace"

Thanks guys!
evilnick PRO 11 years ago
Yay!
I agree with wooble - tag adding can probably left for upload clients for now - let them bash out a way of doing it accessibly.
lumis 11 years ago
very nice just what i was waiting for
i just added a PhotoBlog to my www.lumis.com/lumisGallery/ lumisGallery script which will use the machine tags to define blog categories right now the categories are not done but the blog is there if anyone wants to download it and give it a try and is pulling from the defined namespace.

lots of potential here for the machine tags
Kai Hendry 11 years ago
Any updates on getting some thing like a md5sum 'machine' tag?

I would like to know what pictures I have uploaded, to I can keep them in sync with my local collection.
destinyuk* 11 years ago
That is a great idea. Imagine being able to 'sync' all your computers in the real world with flickr, now that the upload limit has gone.
Tom on Formosa PRO 11 years ago
@drag: I thought the "secret" could be useful for that a while ago, but there was no conclusion in the end:

Here is the thread:
www.flickr.com/groups/api/discuss/72157594321379460/

Lets just hope the photoid will always stay like this...
Wooble Posted 11 years ago. Edited by Wooble (member) 11 years ago
It shouldn't be too difficult to build an application that tags all of your photos with something like checksum:md5=[whatever], but the bandwidth it would use could get unwieldy, as I assume you'd need to app to download all of your original photos to calculated the checksums on them.
Tom on Formosa PRO 11 years ago
@wooble: Downloading all and compared Is what I did ;-)
I then noticed I didn't find some of the originals on Flickr back when cross referencing the checksum. It turned out some Flickr "Original" photos got 0x0A (newline) at the end (making them one byte longer).
Something like 100 in 9000 photos were like this. Probably a bug in one of the "uploadr's" I used but I'm uncertain which one (I use email, sync API and the web thing)...
I don't tag my photos (I still consider it ugly) but I keep a local db with the Flickr ID and a reference to the local unique filename. Technically I can extend my local db and add more fields (title for example or tags).
WeatherQuality 11 years ago
I noticed that when you specify 'extra=tags' in the search api, then machine tags are returned with all the ":" and "=" still present (unlike the old days when those characters were stripped out). This change broke my scripts, but it is a change for the better.
striatic PRO 11 years ago
now that there is a limit of 75 tags per photo, will machine tags be counted in the 75?
straup PRO 11 years ago
For the moment, yes. Machine tags will be counted toward the limit of 75 tags per photo.
Tom (hmm a rosa tint) Posted 11 years ago. Edited by Tom (hmm a rosa tint) (member) 11 years ago
@draq: What about designing a tool that will download the small preview image, work out the md5 and add it back as a machine tag.

Could this work for spotting duplicate uploads?
Wooble 11 years ago
@Tom: I don't believe this would work for identifying which of your original images you've uploaded, as the preview image is generated at Flickr. You'd need to also have a way in your local image collection of associating the preview image with your original. It'd probably be far less work to assign a unique ID to each of your images before you upload them anywhere and have your Flickr upload software add a machine tag with that unique ID.
Evan Prodromou PRO 11 years ago
@straup: in your example about the Plateau (yay, Plateau Mont-Royal, BTW), you misspelled "quartier". "cartier" is a synonym and a proper name, like "Jacques Cartier".

Other notes: machine:tags=awesome . Good work.
Evan Prodromou PRO 11 years ago
Argh. IMTS "homonym".
straup PRO 11 years ago
Evan Prodromou - Thanks! That's what I get for being away from home for so long...
dajobe PRO 11 years ago
Announcing: Flickcurl - C API to Flickr

I wanted to play with machine tags and RDF, and I work in C so I've made a C library to call Flickr's web services to read photo metadata, with demonstration of generating RDF triples from it. These two parts are separable, so if you just want a C library to Flickr, you get that too.

Flickcurl
librdf.org/flickcurl/
Jef Poskanzer PRO 11 years ago
I noticed a photo with geotags where flickr.photos.getInfo returns machine_tag="0" and yet when I go to the flickr page and view the photo, those tags are hidden as they should be.

Here's the photo: www.flickr.com/photos/jef/33437567/
I imagine it's not hard to find other examples.

Is flickr's own UI not using the machine_tag attribute? Because old machine tags haven't been re-classified yet?
PhotoGraham PRO 11 years ago
I saw a comment somewhere that only new tags are treated as machine tags. I don't have a reference though.
straup PRO 11 years ago
Jef -

Yes, it is because that particular tag has not been re-indexed yet.

A "re-index all your machine tags" page is in the works, but it needs to be an explicit action on the part of individual users because machine tags are "cleaned" differently, thus changing URLs for the tag pages themselves.
Jef Poskanzer PRO 11 years ago
So the UI is ignoring the machine_tag attribute and instead deciding on its own whether a tag is machine or not? Maybe I should do the same.
seLusava Posted 11 years ago. Edited by seLusava (member) 11 years ago
The correct is geo:long,
not geo:lon. I see maprr

worldkit.org/geocoder/
PetroleumJelliffe 11 years ago
anyone know of a machine tag usage for airport codes? Can't seem to find any mention of it.
davipt [deleted] Posted 11 years ago. Edited by davipt (member) 11 years ago
I was once been tagged with a set of aero:* tags like the following:
aero:airport=eddl
aero:airline=dlh
aero:man=boeing
aero:model=737
aero:series=500
aero:tail=d-abjd

Dunno if there is some standard definition for those though...
Merkur* PRO 11 years ago
oK, Can someone explain to me as if I was 8 yrs old, what do I gain by using
aero:airport=dlh vs adding three simple tags to my photo i.e. aero airport and dlh ???

I'm curious to start using the mtags, but yeah, what exactly do I gain?
Mark Eichin PRO 11 years ago
(stale, but since it's still open) The key is disambiguation - humans are good at it, machines aren't. In your example, "dlh" by itself, is pretty likely to be an airport, but the one near me is BED - if I'm looking for pictures of hanscom field (BEDford, MA) I will *never* find them with a search for bed. aero:airport=bed, though, is pretty clear.

Not everything is susceptible to that kind of clarification - but baby steps, going after the things that *are*, is still worthwhile :-)
doctor house flckr [deleted] Posted 10 years ago. Edited by doctor house flckr (member) 10 years ago
aero:airport=eddl
aero:airline=dlh
aero:man=boeing
aero:model=737
aero:series=500
aero:tail=d-abjd

yes Dunno if there is some standard definition for those though...


2008tercihsonucu.blogspot.com
WeatherQuality 10 years ago
When I retrieve machine tags (or any tags) using the Flickr API, then I seem to pull back a 'normalized' version of the tag. In particular, all letters seem to be converted to lower case, and punctuation and spaces are removed. This is a real pain. I'm using the photos.search api if it makes any difference.

Does anybody have a workaround for this, or is this a known bug?

Thanks
matt 10 years ago
Does anybody have a workaround for this, or is this a known bug?

It's a frustrating limitation, that's for sure: you can find 'raw' versions of the tags, but search works on the normalised versions, which means that a:b=-1 and a:b=1 aren't distinguishable on a large scale – you have to check each individual result.
silentlennie 10 years ago
Triplets ? That sounds a lot like symantic web.
hardbutnot 10 years ago
I've been attempting to use sort with machine tags in the same photos.search api. Seems the sort is working to date level ONLY, even though the original photos are timestamped. I suppose I could attempt to sort inside my application, but ... is this a known bug / is there a workaround?

to reproduce, go to www.flickr.com/services/api/explore/
user id = 85097477@N00
tags = walkhome
sort = date-taken-asc
machine tags = geo:lat=, geo:lon=, geo:dir=
machine tag mode = any
extras = date_taken

first three results:
<photo id="978048548" owner="85097477@N00" secret="ad5dcdb8d5" server="1259" farm="2" title="DSC00289" ispublic="1" isfriend="0" isfamily="0" datetaken="2007-08-01 17:59:32" datetakengranularity="0"/>
<photo id="977179253" owner="85097477@N00" secret="011da408b7" server="1416" farm="2" title="DSC00285" ispublic="1" isfriend="0" isfamily="0" datetaken="2007-08-01 17:57:06" datetakengranularity="0"/>
<photo id="978039486" owner="85097477@N00" secret="df95c760e9" server="1270" farm="2" title="DSC00286" ispublic="1" isfriend="0" isfamily="0" datetaken="2007-08-01 17:58:02" datetakengranularity="0"/>

remove the machine tag bits and the first three results are correctly...
<photo id="978031002" owner="85097477@N00" secret="4a3bd3f881" server="1253" farm="2" title="DSC00283" ispublic="1" isfriend="0" isfamily="0" datetaken="2007-08-01 17:55:29" datetakengranularity="0"/>
<photo id="977176661" owner="85097477@N00" secret="3c646cda47" server="1346" farm="2" title="DSC00284" ispublic="1" isfriend="0" isfamily="0" datetaken="2007-08-01 17:56:24" datetakengranularity="0"/>
<photo id="977179253" owner="85097477@N00" secret="011da408b7" server="1416" farm="2" title="DSC00285" ispublic="1" isfriend="0" isfamily="0" datetaken="2007-08-01 17:57:06" datetakengranularity="0"/>
Wooble 10 years ago
The "better" one is whatever works for you.

Of course, not posting spam to groups and getting your account and all of your photos deleted would make all of your tags work better.
sopues PRO 10 years ago
Think foaf+Machine tags+notes. Anyone? :)
rachana1101 10 years ago
Hey I am new to Flickr API, is it possible to add machine tag to the other users photos through API or its only possible after they give permission for auth_token??
Silly Luis 10 years ago
rachana1101: Machine tags are treated like normal tags in this regard, so all the limitations to adding tags apply to them too.
robert.jurjevic PRO Posted 10 years ago. Edited by robert.jurjevic (member) 10 years ago
May I ask if people are using machine-tagging on Flickr, and if there is an official or unofficial body which regulates the usage.

Is it possible to use machine-tags for technical info about the photo equipment, i.e. camera body, lens, etc., or this is supposed to be in EXIF or the like? Say..

gear:body="Olympus E-1"
gear:lens="Sigma 30mm f1.4 EX DC HSM"

gear:camera="Canon PowerShot G5"


Thanks.
blech​ PRO Posted 10 years ago. Edited by blech​ (member) 10 years ago
Funnily enough, I've just written up the script I use to set machine tags for EXIF data. I use three namespaces: exif for purely EXIF information (eg focal_length, aperture), camera: for make and model, and file: if there's filename data in the EXIF (the Canon 450D adds it).

As the linked post explains, all this is in the EXIF, but by copying it to machine tags, it's easier to search for using Flickr's search (both programatically and via the web interface).

Back when machinetags.org/ had a wiki, I did add documentation for the predicates I was using within the exif: namespace, but nobody else seems to use them anyway. I moved to camera:make= and camera:model= because there are other people using those. I also use the lens: namespace, but those are done by hand. (As to whether there's a regulatory body, no; if you're lucky a standard will emerge, but like ordinary tagging, it's very much bottom-up rather than top-down.)

Hope that helps.
robert.jurjevic PRO Posted 10 years ago. Edited by robert.jurjevic (member) 10 years ago
Hello Paul,

Good stuff.

Sure, it looks like having EXIF info (either in their entirety or a chosen subset) as (standardized) machine tags should be useful, say I am not sure if I can get let say a list of top 50 photos sorted by some criteria (say interestingness) taken with certain camera make and lens, evan I might get EXIF info for each photo I guess I would have to get all of the photos from Flickr ;) as I would need to sort them according to some criteria (though I cannot sort them by interestingness as there isn't a function which can tell which of the two photos is more interesting), etc.

I think that Flickr could do it on the server side, rather than having a third party client software which requires authentication of each user whose photos are to be EXIF machine tagged.

May I ask how many percent of the Flickr images are already EXIF machine tagged using your script?

Thanks.

Regards,

Robert
katerossmail1 Posted 9 years ago. Edited by katerossmail1 (member) 9 years ago
Thanks a lot. This is one of the best posts, I have ever seen over Flickr.
beancounterbean 9 years ago
I just want to confirm that the 'title' of
{"machine_tags" => "dc:title=\"mr. camera\"}
is not the title of the photo, but a completely
separate entity, specifited in a tag.

I was trying with photos.search to get photos
titled, 'Dog,' with this machine tag, thus:
{"machine_tags" => "dc:title=dog"}

It looks like I have to use the text field of
photos.search,

This is a gotcha, I think. The documentation
led me astray with an example name for the
predicate that is used elsewhere in the API
with a different meaning.
admin
Sam Judson PRO 9 years ago
You are correct, doing a machine tag search searches the machine tags. I don't see how this is a 'gotcha' really, as the machine tag can have any 'predicate', and the 'dc' namespace just happens to have one called 'title'.
beancounterbean 9 years ago
A review of machine tags on w3.org:

鏈結名稱: FlickrMachineTags - Media Annotations Working Group Wiki
URL: www.w3.org/2008/WebVideo/Annotations/wiki/FlickrMachineTags
Bogota Colombia Posted 9 years ago. Edited by Bogota Colombia (member) 9 years ago
great news thank you so much !

two
loupiote (Old Skool) pro PRO Posted 9 years ago. Edited by loupiote (Old Skool) pro (member) 9 years ago
i find it really annoying that flickr allows the same predicate to have multiple values in one photo.

i.e. it's possible to have both:

plant:poisonous=yes
plant:poisonous=no

or

woman:pregnant=yes
woman:pregnant=no

i personally think that only one value per predicate should be allowed.

if multiple value must be used, they can be included in the predicate, like:

flower:color=red,yellow
my "all tags" page is huge and extremely slow to load because i use machine tags on most of my photos (and i have many photos).

i'm talking about this page:
www.flickr.com/photos/loupiote/alltags/

on most of my photos i use machine tags with parameters, and the paramerers used in machine tags are often different for each photo (e.g. geo:lat=xxxxxxxxxx for geo location tags, etc).

but the "all tags" page lists each machine tag and its parameter, and this causes that page to have become humongous (1.7 MB!!!) and very slow to build (about 1 minute wait time before flickr returns it). it now contains about 20,000 tags, with half of them being machine tags listed multiple times because of their different parameters.

maybe one solution would be for flickr to display machine tags in a separate page? (i.e. "all machine tags")?

or maybe flickr should display them aggregated, without their parameter? (e.g. geo:lat=* instead of thousands of those).

but right now there is definitely a scalability issue here, and it will only get worse when i add more images and more machine tags...

See discussion here:
www.flickr.com/groups/flickrideas/discuss/72157624545227761/
Jef Poskanzer PRO 6 years ago
Necro!

Hey has anyone run across a list or registry of machine tag formats in use? I googled but didn't find anything.

Want to make sure I'm not re-inventing the wheel.
WarzauWynn Posted 5 years ago. Edited by WarzauWynn (member) 5 years ago
Regarding case insensitivity, I've just noticed that machine tags that include a * appear to require lower case in the URL bar now. I just tested them in the API Explorer and they work case insensitively, but in the URL bar they require lower case. Not correct case, but specifically lower case, even if it's "incorrect". Very strange.

With API explorer all of the following work, but with tags it varies as such:

Lens:ID=159 # works
Lens:*=159 # does not work
lens:*=159 # works
*:ID=159 # does not work
*:id=159 # works
PierreFritsch Posted 3 years ago. Edited by PierreFritsch (member) 3 years ago
(Bug report)
I noticed that when calling flickr.photos.search with extras = tags, some characters get stripped out of the machine tags value, e.g. "-" or "%", and moreover the value is returned in lowercase.

My scenario is that I'm performing an upload of a big picture collection and I'd like Flickr to hold the information of what was uploaded already. I'm using machine tags to map the image on Flickr with the image in my local collection, in the format myapp:pictureguid=xxx-yyy-zzz.

I could perform a search to check each image separately and know if it was already uploaded, but this would result in a lot of isolated queries:
* tags = "myapp:pictureguid=picture-1" => 1 pic found => I don't need to upload this pic
* tags = "myapp:pictureguid=picture-2" => no pic found => I'll upload this pic
* ...

These queries would generate load on the Flickr servers and take time for me every time I restart the interrupted upload process.

When using the search with the extras tags, I can get information for all pictures at once by querying for machine_tags = "myapp:". Then I can check locally which pictures have been uploaded to Flickr already. However this does not work for me, as I compare my local picture guid, e.g. 7596U%twSTxSnh+Oq6rY-MQg with the value returned by Flickr, in this case 7596utwstxsnhoq6rymqg (which, obviously, does not match).

Can I expect this to get solved? Thanks & regards.
Jef Poskanzer PRO 3 years ago
Sounds like you're getting the canonicalized version of the tag but were expecting the raw version.
admin
Sam Judson PRO 3 years ago
Tags returned are always the clean version.

You'll have to clean them on your side as well to perform the compare - or create unique IDs which are the same clean and raw.
PierreFritsch Posted 3 years ago. Edited by PierreFritsch (member) 3 years ago
Hi Jef, Sam, thanks for the fast answer! Is there any place where I can find what canonicalized and/or clean version means for tags? The "this is not a FAQ" above suggests that any ASCII character would be supported... (which would include characters such as "%" and "-")

Moreover, I'm confused by the fact that when I query flickr.photos.search for a single picture with the "raw version" of the machine tag, I get exactly that picture. Moreover on the flickr photo page, when I hover over the machine tag, it's that "raw version" that gets displayed as well.

[EDIT] I found an external blog post from 2007 containing a regular expression to transform raw tags into clean tags - but this does not seem to be an official Flickr documentation
weblog.terrellrussell.com/2007/06/clean-and-store-your-ra...
Azchael PRO 3 years ago
Jef Poskanzer:

Hi Jef, am also looking for a list or an overview of machine tags that I can use to tag my photos. So far I am collecting everything I find in a personal list and add to that whenever I come across something new. A few examples that are common for photos:

event:type= (e.g. concert or fair)
event:venue=
location:city=Stuttgart
location:country=Germany
airport:iata=BCN
architecture:building=Airport
music:artist=
music:band=
abstract:shapes= (dot / circle / grid / lines)
aircraft:manufacturer=
architecture:building=Airport (cathedral / church / etc.)
architecture:completed=
architecture:building=Church

I took most of the above from the Flickr Machine Tag Browser I found on husk.org:
husk.org/code/machine-tag-browser.html

Cheers
Azchael
y.shinkarev 2 years ago
I add machine tags to photo.
Tags contain underline, something: think_fid.
If I get tags by flickr.tags.getListPhoto.
I see my tags in field "raw", but field "_content" have tags without underline symbol.
Why?
Also I get photos by flickr.photosets.getPhotos (using machine_tags/tags in extras) I also do not see in my tags in predicate name symbol underline (_)
Groups Beta