<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Indexed Content &#187; api</title>
	<atom:link href="http://indexedcontent.com/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://indexedcontent.com</link>
	<description>SEO Services &#38; Link Building</description>
	<lastBuildDate>Tue, 17 Nov 2009 22:37:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Reddit&#8217;s Secret API</title>
		<link>http://indexedcontent.com/smo/reddit-smo/reddits-secret-api/</link>
		<comments>http://indexedcontent.com/smo/reddit-smo/reddits-secret-api/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 07:18:56 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[reddit]]></category>
		<category><![CDATA[api]]></category>

		<guid isPermaLink="false">http://indexedcontent.com/?p=464</guid>
		<description><![CDATA[Despite its open source platform, reddit has been relatively slow in extending functionality.  However there are some (slightly) hidden json endpoints.]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks I have been working on creating a tool to gather some social media metrics to track social media optimization campaigns.  Friendfeed is your friend if you&#8217;re embarking on the same project.  While looking for a native reddit API however I stumbled across a post on code.reddit.com that mentioned an API endpoint.  </p>
<p>http://code.reddit.com/ticket/154:</p>
<blockquote><p>In many applications, such as Socialite, it is valuable to look up information about a link on reddit. Currently, there are two good ways to do this using the JSON API:</p>
<p>Info call<br />
Example: http://www.reddit.com/api/info.json?count=1&#038;url=STORYURL</p>
<p>The API &#8220;info&#8221; call is an ideal way to look up reddit stories by URL. However, in some cases, looking up stories by URL alone presents problems:</p>
<p>1. URLs are not mapped to stories on a one-to-one basis. Since the same URL can be posted to many subreddits, when looking up stories by URL, it becomes necessary to constrain the search by subreddit, e.g.: http://www.reddit.com/r/subreddit/api/info.json?count=1&#038;url=STORYURL </p></blockquote>
<p>For a typical reddit story the json looks like:</p>
<pre class="brush: jscript;">
{&quot;kind&quot;: &quot;Listing&quot;, &quot;data&quot;: {&quot;children&quot;: [{&quot;kind&quot;: &quot;t3&quot;, &quot;data&quot;: {&quot;subreddit_id&quot;: &quot;t5_6&quot;, &quot;clicked&quot;: false, &quot;name&quot;: &quot;t3_70ehq&quot;, &quot;ups&quot;: 3709, &quot;created&quot;: 1220933746.0, &quot;url&quot;: &quot;http:\/\/voices.washingtonpost.com\/the-trail\/2008\/09\/08\/obama_to_palin_dont_mock_the_c.html&quot;, &quot;num_comments&quot;: 871, &quot;downs&quot;: 943, &quot;author&quot;: &quot;neoabraxas&quot;, &quot;domain&quot;: &quot;voices.washingtonpost.com&quot;, &quot;subreddit&quot;: &quot;reddit.com&quot;, &quot;score&quot;: 2766, &quot;likes&quot;: null, &quot;title&quot;: &quot;Obama to Palin:\&quot;Don't mock the Constitution. Don't make fun of it. Don't suggest that it's not American to abide by what the founding fathers set up. It's worked pretty well for over 200 years.\&quot;&quot;, &quot;hidden&quot;: false, &quot;saved&quot;: false, &quot;id&quot;: &quot;70ehq&quot;}}, {&quot;kind&quot;: &quot;t3&quot;, &quot;data&quot;: {&quot;subreddit_id&quot;: &quot;t5_2cneq&quot;, &quot;clicked&quot;: false, &quot;name&quot;: &quot;t3_70e4r&quot;, &quot;ups&quot;: 96, &quot;created&quot;: 1220928368.0, &quot;url&quot;: &quot;http:\/\/voices.washingtonpost.com\/the-trail\/2008\/09\/08\/obama_to_palin_dont_mock_the_c.html&quot;, &quot;num_comments&quot;: 9, &quot;downs&quot;: 61, &quot;author&quot;: &quot;andybigs&quot;, &quot;domain&quot;: &quot;voices.washingtonpost.com&quot;, &quot;subreddit&quot;: &quot;politics&quot;, &quot;score&quot;: 35, &quot;likes&quot;: null, &quot;title&quot;: &quot;Obama to Palin: 'Don't Mock the Constitution'&quot;, &quot;hidden&quot;: false, &quot;saved&quot;: false, &quot;id&quot;: &quot;70e4r&quot;}}]}}
</pre>
<p>So there you have it.  No auth string required, just open access to a portion of reddit&#8217;s db.  So far the only endpoint visible is URL.  With a little trial and error you can probably find some other useful endpoints other then the URL one listed.</p>
<img src="http://indexedcontent.com/?ak_action=api_record_view&id=464&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://indexedcontent.com/smo/reddit-smo/reddits-secret-api/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using the Digg API</title>
		<link>http://indexedcontent.com/smo/digg/using-the-digg-api/</link>
		<comments>http://indexedcontent.com/smo/digg/using-the-digg-api/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 18:01:17 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[digg]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[smo]]></category>

		<guid isPermaLink="false">http://indexedcontent.com/digg/using-the-digg-api/</guid>
		<description><![CDATA[Everyday microblogging is gaining more traction.  In this article we go over some of the basic steps of syndicating your social network activity on your blog/website via digg's api]]></description>
			<content:encoded><![CDATA[<p>Digg&#8217;s new API is impressive.  Incorporating your digg user account activity or your domain&#8217;s popular posts into your blog or using it as part of a micro blogging strategy is a snap.  The easiest way I have found is to use Nick Halstead&#8217;s <a href="http://www.nickhalstead.com/code-bank/">Simple Digg API Usage</a> script.  This script doesn&#8217;t require PEAR and it works on PHP 4 &amp; 5.</p>
<h2>Digg User Lookup</h2>
<div style="clear:both;padding-top:8px;"></div>
<h1>The Basics</h1>
<p>To get started, you need to create (as in &#8216;out of thin air&#8217;) an <strong>application key</strong> and a <strong>user agent</strong>.  There is no application key signup like Google or Youtube, however the application key you choose should meet the following requirements:</p>
<blockquote><p>from the <a href="http://apidoc.digg.com/">digg api wiki</a><br />
The value of the appkey argument must be a valid absolute URI (see IETF RFC 2396) that identifies the application making the request. The URI might point to:</p>
<ul>
<li>The application itself, if it&#8217;s a web application.</li>
<li>A web page describing the application.</li>
<li>A web page offering the application for download.</li>
<li>The author&#8217;s web site.</li>
</ul>
</blockquote>
<h2>Html</h2>
<p>The html for the form to display to request digg user name.</p>
<pre class="brush: php;">&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
&lt;table border=&quot;0&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;td colspan=&quot;2&quot;&gt;User Lookup&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
&lt;tbody&gt;
  &lt;tr&gt;
    &lt;td&gt;User Name&lt;/td&gt;
    &lt;td&gt;
  &lt;input maxlength=&quot;50&quot; name=&quot;uid&quot; size=&quot;25&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;submit&quot; /&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt;
</pre>
<h2>Code</h2>
<p>The backend code to function the submit request</p>
<pre class="brush: php;">decode($response);
        foreach($decoded-&gt;users as &amp;$user) {
             // $user = $decoded-&gt;users;
                $name = $user-&gt;name;
                $icon = $user-&gt;icon;
                $registered = $user-&gt;registered;
                $profileviews = $user-&gt;profileviews;
                              function timestamp_to_date ($registered)
                              {
                              $date = date ('m-d-Y' , $registered);
                              echo $date;
                              }
                echo &quot;&lt;div id=\&quot;archivebox\&quot;&gt;&quot;;
                echo &quot;&lt;h2&gt;&lt;img src=&quot;\&quot; alt=&quot;&quot; /&gt;&quot;;
                echo &quot;$name&quot;;
                echo &quot;User Since: &quot;;
                timestamp_to_date ($registered);
                echo &quot;&quot;;
                echo &quot;Profile Views: $profileviews &quot;;
                echo &quot;&lt;/h2&gt;&lt;h3&gt;User Links&lt;/h3&gt;&quot;;
                echo &quot;&lt;ul&gt;&quot;;
                }
                foreach($user-&gt;links as $link) {
                $href = $link-&gt;href;
                $description = $link-&gt;description;
                echo &quot;&lt;li&gt;&lt;a href=&quot;$href&quot;&gt;$description&lt;/a&gt;&lt;/li&gt;&quot;;
                }
                echo &quot;&lt;/ul&gt;&quot;;
                echo &quot;&lt;/div&gt;&quot;;

        } else {             //form hasn't been submitted
        $user = &quot;elebrio&quot;;
	require(&quot;JSON.php&quot;);
	ini_set('user_agent', 'ic/1.0');
	$appkey = 'http://indexedcontent.com';
        $response = file_get_contents(&quot;http://services.digg.com/user/$user?appkey=$appkey&amp;type=json&quot;);
        $json = new Services_JSON();
	$decoded = $json-&gt;decode($response);
        foreach($decoded-&gt;users as &amp;$user) {
             // $user = $decoded-&gt;users;
                $name = $user-&gt;name;
                $icon = $user-&gt;icon;
                $registered = $user-&gt;registered;
                $profileviews = $user-&gt;profileviews;
                              function timestamp_to_date ($registered)
                              {
                              $date = date ('m-d-Y' , $registered);
                              echo $date;
                              }
                echo &quot;&lt;div id=\&quot;archivebox\&quot;&gt;&quot;;
                echo &quot;&lt;h2&gt;&lt;img src=&quot;\&quot; alt=&quot;&quot; /&gt;&quot;;
                echo &quot;$name&quot;;

                echo &quot;User Since: &quot;;
                timestamp_to_date ($registered);
                echo &quot;&quot;;
                echo &quot;Profile Views: $profileviews &quot;;
                echo &quot;&lt;/h2&gt;&lt;h3&gt;User Links&lt;/h3&gt;&quot;;
                echo &quot;&lt;ul&gt;&quot;;
                }
                foreach($user-&gt;links as $link) {
                $href = $link-&gt;href;
                $description = $link-&gt;description;
                echo &quot;&lt;li&gt;&lt;a href=&quot;$href&quot;&gt;$description&lt;/a&gt;&lt;/li&gt;&quot;;
                }
                echo &quot;&lt;/ul&gt;&quot;;
                echo &quot;&lt;/div&gt;&quot;;
		}
?&gt;</pre>
<p>In order to get this code working on your site, you will need to change two variables.</p>
<ul>
<li> appkey  &#8211; replace with your domain
<pre class="brush: php;"> $appkey ='http://indexedcontent.com';</pre>
</li>
<li> user agent
<pre class="brush: php;"> ini_set('user_agent', 'ic/1.0');</pre>
<p>ic/1.0 is my site&#8217;s current user agent.  You can basically name this whatever you want.</li>
</ul>
<h2>Additional Resources</h2>
<ul>
<li><a href="http://groups.google.com/group/diggapi">http://groups.google.com/group/diggapi</a></li>
</ul>
<img src="http://indexedcontent.com/?ak_action=api_record_view&id=33&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://indexedcontent.com/smo/digg/using-the-digg-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Keyword Rankings Tool</title>
		<link>http://indexedcontent.com/featured/new-keyword-rankings-tool/</link>
		<comments>http://indexedcontent.com/featured/new-keyword-rankings-tool/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 07:48:57 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[keyword rankings]]></category>
		<category><![CDATA[seodigger]]></category>

		<guid isPermaLink="false">http://indexedcontent.com/seo/new-keyword-rankings-tool/</guid>
		<description><![CDATA[Please help us test our new keyword rankings tool that pulls data from the Seodigger.com api.]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re beta testing a new <a href="http://indexedcontent.com/tools/keyword-rankings-tool/">keyword rankings tool</a> that pulls data from the <a class="external" href="http://seodigger.com">Seodigger.com</a> api.  It&#8217;s basically one api call to seodigger specifying the domain to search for and a variable that limits results.  We then wrap it up in some pretty css via <a class="external" href="http://jquery.com/">jquery</a>.  Please check it out and report any bugs to ryanunderdown &gt;at&lt; gmail &gt;dot&lt; com</p>
<img src="http://indexedcontent.com/?ak_action=api_record_view&id=38&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://indexedcontent.com/featured/new-keyword-rankings-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
