views:

91

answers:

2

how to download all the tags from delicious, like all the tags shown in: http://delicious.com/tag

A: 

If you mean your own tags, then the easiest solution is to use the Export feature on its web site. I guess you can automate this (including authentication) via curl, wget or something similar.

Andrey Vlasovskikh
+2  A: 

It's not possible to get all tags, you can get all tags for your username (replace the placeholders with your username and password):

curl https://{username}:{password}@api.del.icio.us/v1/tags/get

This returns some XML which (for me) looks something like this:

<?xml version="1.0" encoding="UTF-8"?>    
<tags>
  <tag count="42" tag=".Net"/>
  <tag count="9" tag="AI"/>
  <tag count="1" tag="ASP"/>
  <tag count="64" tag="Accessibility"/>
  <tag count="15" tag="Admin"/>
  <tag count="3" tag="Agile"/>
  <tag count="57" tag="Ajax"/>
  <tag count="12" tag="Amiga"/>
  ...
</tags>

Or you can get a list of recommended or suggested tags for a particular URL:

curl https://{username}:{password}@api.del.icio.us/v1/posts/suggest?url=http://stackoverflow.com/

This returns XML with two different types of tag, your tags which are recommended plus tags from all users which are popular:

<?xml version="1.0" encoding="UTF-8"?>
<suggest>
  <recommended>Reference</recommended>
  <recommended>Development</recommended>
  <recommended>Software</recommended>
  <recommended>Tips</recommended>
  <recommended>Community</recommended>
  <recommended>Technology</recommended>
  <recommended>HowTo</recommended>
  <recommended>Forum</recommended>
  <recommended>Web2.0</recommended>
  <recommended>Blog</recommended>
  <recommended>Learning</recommended>
  <recommended>FAQ</recommended>
  <popular>programming</popular>
  <popular>reference</popular>
  <popular>development</popular>
  <popular>software</popular>
  <popular>tips</popular>
</suggest>

There's a webmonkey article which covers using the Delicious API from PHP.

robertc