WPapi.org
WPapi is a super easy to use API that gives you access to the stats for your WordPress-hosted plugins and themes, which you can use on your own blog or website for graphs, or like whatever.
A quick explanation
If you dig around you can find the xml feed that WordPress uses to generate their stats graphs for plugins and themes in the extend directory, however I wanted a JSON feed. To be more specific I wanted JSON because I wanted to be able to use it to make some sexy graphs, possibly using something like this.
There is also a currently undocumented WordPress API that is used within WordPress as part of the plugin/theme installer/updater - this API returns (among other things) the details of the specified plugin or theme - in the case of a plugin, it returns pretty much everything you'd find in the readme file.
WPAPI is using a combination of the 'hidden' WordPress xml feed as the data source for the stats and the currently undocumented WordPress API for plugin/theme information, collecting all the data, caching it, and then serving it up in a variety of formats (XML, JSON, JSONP, Serialised PHP and CSV). Have a look at the examples on the documentation pages to see the range of information that is returned.
Ok, cool, how do I use it?
http://wpapi.org/api/type/slug.format
What's it all mean?
- type
- too easy, this will be either plugin or theme
- slug
- if your plugin is http://wordpress.org/extend/plugins/fluency-admin/
then your slug is simply fluency-admin - format
- you've got the choice of xml, json, jsonp, php or csv
Got it? Here's a couple of quick examples just in case…
http://wpapi.org/api/plugin/fluency-admin.xml
http://wpapi.org/api/plugin/wp-super-cache.json
http://wpapi.org/api/theme/carrington-blog.jsonp
http://wpapi.org/api/theme/p2.php
http://wpapi.org/api/plugin/stats.csv
Check the documentation for more info.
JSON Response
| URL |
http://wpapi.org/api/plugin/slug.json
http://wpapi.org/api/theme/slug.json
|
||
|---|---|---|---|
| Parameters | count | (integer) | specify how many days of stats to return. |
| onlystats | (boolean) | if true, will exclude full plugin/theme details from response | |
Examples
Full response for a plugin - including both stats and details
http://wpapi.org/api/plugin/fluency-admin.json
{
"added":"2009-09-20",
"author":{
"name":"Dean Robinson",
"url":"http:\/\/deanjrobinson.com\/",
"profile":"http:\/\/wordpress.org\/extend\/plugins\/profile\/deanjrobinson"
},
"average_downloads":"147.048",
"contributors":{
"contributor-deanjrobinson":"http:\/\/wordpress.org\/extend\/plugins\/profile\/deanjrobinson"
},
"download_link":"http:\/\/downloads.wordpress.org\/plugin\/fluency-admin.2.3.2.zip",
"hits":"145",
"homepage":"http:\/\/deanjrobinson.com\/projects\/fluency-admin\/",
"last_update_details":"2010-07-10 14:10:02",
"last_update_stats":"2010-07-10 14:10:00",
"name":"Fluency Admin",
"num_ratings":"37",
"rating":"99",
"requires":"2.9",
"sections":{
"description":"<!-- HTML Content -->",
"installation":"<!-- HTML Content -->",
"screenshots":"<!-- HTML Content -->",
"changelog":"<!-- HTML Content -->",
"faq":"<!-- HTML Content -->"
},
"slug":"fluency-admin",
"stats":{
"2010-06-30":"327",
"2010-07-01":"291",
"2010-07-02":"227",
"2010-07-03":"177",
"2010-07-04":"183",
"2010-07-05":"223",
"2010-07-06":"253",
"2010-07-07":"253",
"2010-07-08":"223",
"2010-07-09":"820"
},
"tags":{
"tag-design":"design",
"tag-login":"login",
"tag-theme":"theme",
"tag-plugin":"plugin",
"tag-admin":"admin",
"tag-fluency":"fluency",
"tag-color-scheme":"color scheme"
},
"tested":"3.0",
"total_days":"293",
"total_downloads":"43085",
"type":"plugin",
"updated":"2010-07-09",
"version":"2.3.2"
}
Full response for a theme - including both stats and details
http://wpapi.org/api/theme/twentyten.json
{
"author":"wordpressdotorg",
"average_downloads":"441.211",
"download_link":"http:\/\/wordpress.org\/extend\/themes\/download\/twentyten.1.0.3.zip",
"hits":"1",
"homepage":"http:\/\/wordpress.org\/extend\/themes\/twentyten",
"last_update_details":"2010-07-10 15:39:29",
"last_update_stats":"2010-07-10 15:39:27",
"name":"TwentyTen",
"num_ratings":"12",
"preview_url":"http:\/\/wp-themes.com\/twentyten",
"rating":"75",
"screenshot_url":"http:\/\/wp-themes.com\/wp-content\/themes\/twentyten\/screenshot.png",
"sections":{
"description":"The 2010 default theme for WordPress."
},
"slug":"twentyten",
"stats":{
"2010-06-21":"250",
"2010-06-22":"829",
"2010-06-23":"658",
"2010-06-24":"556",
"2010-06-25":"518",
"2010-06-26":"429",
"2010-06-27":"418",
"2010-06-28":"465",
"2010-06-29":"511",
"2010-06-30":"454",
"2010-07-01":"415",
"2010-07-02":"358",
"2010-07-03":"270",
"2010-07-04":"312",
"2010-07-05":"347",
"2010-07-06":"428",
"2010-07-07":"405",
"2010-07-08":"402",
"2010-07-09":"358"
},
"tags":{
"tag-black":"black",
"tag-blue":"blue",
"tag-white":"white",
"tag-two-columns-1":"two-columns",
"tag-fixed-width-1":"fixed-width",
"tag-custom-header":"custom-header",
"tag-custom-background":"custom-background",
"tag-threaded-comments":"threaded-comments",
"tag-sticky-post":"sticky-post",
"tag-translation-ready":"translation-ready",
"tag-microformats":"microformats",
"tag-rtl-language-support":"rtl-language-support",
"tag-editor-style":"editor-style"
},
"total_days":"19",
"total_downloads":"8383",
"type":"theme",
"updated":"2010-06-21",
"version":"1.0.3"
}
Response with 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.json?onlystats=true
{
"average_downloads":211.381,
"hits":12,
"last_update_stats":"2009-10-11 19:49:28",
"slug":"fluency-admin",
"stats":{
"2009-09-20":"694",
"2009-09-21":"619",
"2009-09-22":"312",
"2009-09-23":"302",
"2009-09-24":"228",
"2009-09-25":"180",
"2009-09-26":"158",
"2009-09-27":"145",
"2009-09-28":"217",
"2009-09-29":"204",
"2009-09-30":"181",
"2009-10-01":"158",
"2009-10-02":"115",
"2009-10-03":"115",
"2009-10-04":"103",
"2009-10-05":"132",
"2009-10-06":"134",
"2009-10-07":"145",
"2009-10-08":"112",
"2009-10-09":"107",
"2009-10-10":"78"
},
"total_days":21,
"total_downloads":4439,
"type":"plugin"
}
Response with 3 days of stats and 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.json?count=3&onlystats=true
{
"average_downloads":211.381,
"count":3,
"hits":12,
"last_update_stats":"2009-10-11 19:49:28",
"slug":"fluency-admin",
"stats":{
"2009-10-08":"112",
"2009-10-09":"107",
"2009-10-10":"78"
},
"total_days":21,
"total_downloads":4439,
"type":"plugin",
}
JSONP Response
| URL |
http://wpapi.org/api/plugin/slug.jsonp
http://wpapi.org/api/theme/slug.jsonp
|
||
|---|---|---|---|
| Parameters | count | (integer) | specify how many days of stats to return. |
| onlystats | (boolean) | if true, will exclude full plugin/theme details from response | |
| callback | (string) | name of custom javascript callback function Defaults to "wpapi_callback" if not specified. |
|
Examples
Full response for a plugin - including both stats and details
http://wpapi.org/api/plugin/fluency-admin.jsonp
wpapi_callback({
"added":"2009-09-20",
"author":{
"name":"Dean Robinson",
"url":"http:\/\/deanjrobinson.com\/",
"profile":"http:\/\/wordpress.org\/extend\/plugins\/profile\/deanjrobinson"
},
"average_downloads":"147.048",
"contributors":{
"contributor-deanjrobinson":"http:\/\/wordpress.org\/extend\/plugins\/profile\/deanjrobinson"
},
"download_link":"http:\/\/downloads.wordpress.org\/plugin\/fluency-admin.2.3.2.zip",
"hits":"145",
"homepage":"http:\/\/deanjrobinson.com\/projects\/fluency-admin\/",
"last_update_details":"2010-07-10 14:10:02",
"last_update_stats":"2010-07-10 14:10:00",
"name":"Fluency Admin",
"num_ratings":"37",
"rating":"99",
"requires":"2.9",
"sections":{
"description":"<!-- HTML Content -->",
"installation":"<!-- HTML Content -->",
"screenshots":"<!-- HTML Content -->",
"changelog":"<!-- HTML Content -->",
"faq":"<!-- HTML Content -->"
},
"slug":"fluency-admin",
"stats":{
"2010-06-30":"327",
"2010-07-01":"291",
"2010-07-02":"227",
"2010-07-03":"177",
"2010-07-04":"183",
"2010-07-05":"223",
"2010-07-06":"253",
"2010-07-07":"253",
"2010-07-08":"223",
"2010-07-09":"820"
},
"tags":{
"tag-design":"design",
"tag-login":"login",
"tag-theme":"theme",
"tag-plugin":"plugin",
"tag-admin":"admin",
"tag-fluency":"fluency",
"tag-color-scheme":"color scheme"
},
"tested":"3.0",
"total_days":"293",
"total_downloads":"43085",
"type":"plugin",
"updated":"2010-07-09",
"version":"2.3.2"
})
Full response for a theme - including both stats and details
http://wpapi.org/api/theme/twentyten.jsonp
wpapi_callback({
"author":"wordpressdotorg",
"average_downloads":"441.211",
"download_link":"http:\/\/wordpress.org\/extend\/themes\/download\/twentyten.1.0.3.zip",
"hits":"1",
"homepage":"http:\/\/wordpress.org\/extend\/themes\/twentyten",
"last_update_details":"2010-07-10 15:39:29",
"last_update_stats":"2010-07-10 15:39:27",
"name":"TwentyTen",
"num_ratings":"12",
"preview_url":"http:\/\/wp-themes.com\/twentyten",
"rating":"75",
"screenshot_url":"http:\/\/wp-themes.com\/wp-content\/themes\/twentyten\/screenshot.png",
"sections":{
"description":"The 2010 default theme for WordPress."
},
"slug":"twentyten",
"stats":{
"2010-06-21":"250",
"2010-06-22":"829",
"2010-06-23":"658",
"2010-06-24":"556",
"2010-06-25":"518",
"2010-06-26":"429",
"2010-06-27":"418",
"2010-06-28":"465",
"2010-06-29":"511",
"2010-06-30":"454",
"2010-07-01":"415",
"2010-07-02":"358",
"2010-07-03":"270",
"2010-07-04":"312",
"2010-07-05":"347",
"2010-07-06":"428",
"2010-07-07":"405",
"2010-07-08":"402",
"2010-07-09":"358"
},
"tags":{
"tag-black":"black",
"tag-blue":"blue",
"tag-white":"white",
"tag-two-columns-1":"two-columns",
"tag-fixed-width-1":"fixed-width",
"tag-custom-header":"custom-header",
"tag-custom-background":"custom-background",
"tag-threaded-comments":"threaded-comments",
"tag-sticky-post":"sticky-post",
"tag-translation-ready":"translation-ready",
"tag-microformats":"microformats",
"tag-rtl-language-support":"rtl-language-support",
"tag-editor-style":"editor-style"
},
"total_days":"19",
"total_downloads":"8383",
"type":"theme",
"updated":"2010-06-21",
"version":"1.0.3"
})
Response with 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.jsonp?onlystats=true
wpapi_callback({
"average_downloads":211.381,
"hits":12,
"last_update":"2009-10-11 19:49:28",
"slug":"fluency-admin",
"stats":{
"2009-09-20":"694",
"2009-09-21":"619",
"2009-09-22":"312",
"2009-09-23":"302",
"2009-09-24":"228",
"2009-09-25":"180",
"2009-09-26":"158",
"2009-09-27":"145",
"2009-09-28":"217",
"2009-09-29":"204",
"2009-09-30":"181",
"2009-10-01":"158",
"2009-10-02":"115",
"2009-10-03":"115",
"2009-10-04":"103",
"2009-10-05":"132",
"2009-10-06":"134",
"2009-10-07":"145",
"2009-10-08":"112",
"2009-10-09":"107",
"2009-10-10":"78"
},
"total_days":21,
"total_downloads":4439,
"type":"plugin"
})
Response with 3 days of stats and 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.jsonp?count=3&onlystats=true
wpapi_callback({
"average_downlods":211.381,
"count":3,
"hits":12,
"last_update_stats":"2009-10-11 19:49:28",
"slug":"fluency-admin",
"stats":{
"2009-10-08":"112",
"2009-10-09":"107",
"2009-10-10":"78"
},
"total_days":21,
"total_downloads":4439,
"type":"plugin"
})
Response with 5 days of stats, a custom callback function and 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.jsonp?count=5&callback=myFunction&onlystats=true
myFunction({
"average_downlods":211.381,
"count":5,
"hits":12,
"last_update_stats":"2009-10-11 19:49:28",
"slug":"fluency-admin",
"stats":{
"2009-10-06":"134",
"2009-10-07":"145",
"2009-10-08":"112",
"2009-10-09":"107",
"2009-10-10":"78"
},
"total_days":21,
"total_downloads":4439,
"type":"plugin"
})
PHP Response
| URL |
http://wpapi.org/api/plugin/slug.php
http://wpapi.org/api/theme/slug.php
|
||
|---|---|---|---|
| Parameters | count | (integer) | specify how many days of stats to return. |
| onlystats | (boolean) | if true, will exclude full plugin/theme details from response | |
Response is a serialized string, which can be easily converted back into an array.
Examples
Full response for a plugin - including both stats and details
http://wpapi.org/api/plugin/fluency-admin.php
a:23:{
s:5:"added";s:10:"2009-09-20";
s:6:"author";a:3:{
s:4:"name";s:13:"Dean Robinson";
s:3:"url";s:25:"http://deanjrobinson.com/";
s:7:"profile";s:57:"http://wordpress.org/extend/plugins/profile/deanjrobinson";
}
s:17:"average_downloads";s:7:"147.048";
s:12:"contributors";a:1:{
s:25:"contributor-deanjrobinson";s:57:"http://wordpress.org/extend/plugins/profile/deanjrobinson";
}
s:13:"download_link";s:61:"http://downloads.wordpress.org/plugin/fluency-admin.2.3.2.zip";
s:4:"hits";s:3:"146";
s:8:"homepage";s:48:"http://deanjrobinson.com/projects/fluency-admin/";
s:19:"last_update_details";s:19:"2010-07-10 14:10:02";
s:17:"last_update_stats";s:19:"2010-07-10 14:10:00";
s:4:"name";s:13:"Fluency Admin";
s:11:"num_ratings";s:2:"37";
s:6:"rating";s:2:"99";
s:8:"requires";s:3:"2.9";
s:8:"sections";a:5:{
s:11:"description";s:21:"<!-- HTML Content -->";
s:12:"installation";s:21:"<!-- HTML Content -->";
s:11:"screenshots";s:21:"<!-- HTML Content -->";
s:9:"changelog";s:21:"<!-- HTML Content -->";
s:3:"faq";s:21:"<!-- HTML Content -->";
}
s:4:"slug";s:13:"fluency-admin";
s:5:"stats";a:10:{
s:10:"2010-06-30";s:3:"327";
s:10:"2010-07-01";s:3:"291";
s:10:"2010-07-02";s:3:"227";
s:10:"2010-07-03";s:3:"177";
s:10:"2010-07-04";s:3:"183";
s:10:"2010-07-05";s:3:"223";
s:10:"2010-07-06";s:3:"253";
s:10:"2010-07-07";s:3:"253";
s:10:"2010-07-08";s:3:"223";
s:10:"2010-07-09";s:3:"820";
}
s:4:"tags";a:7:{
s:10:"tag-design";s:6:"design";
s:9:"tag-login";s:5:"login";
s:9:"tag-theme";s:5:"theme";
s:10:"tag-plugin";s:6:"plugin";
s:9:"tag-admin";s:5:"admin";
s:11:"tag-fluency";s:7:"fluency";
s:16:"tag-color-scheme";s:12:"color scheme";
}
s:6:"tested";s:3:"3.0";
s:10:"total_days";s:3:"293";
s:15:"total_downloads";s:5:"43085";
s:4:"type";s:6:"plugin";
s:7:"updated";s:10:"2010-07-09";
s:7:"version";s:5:"2.3.2";
}
Full response for a theme - including both stats and details
http://wpapi.org/api/theme/twentyten.php
a:21:{
s:6:"author";s:15:"wordpressdotorg";
s:17:"average_downloads";s:7:"441.211";
s:13:"download_link";s:63:"http://wordpress.org/extend/themes/download/twentyten.1.0.3.zip";
s:4:"hits";s:1:"2";
s:8:"homepage";s:44:"http://wordpress.org/extend/themes/twentyten";
s:19:"last_update_details";s:19:"2010-07-10 15:39:29";
s:17:"last_update_stats";s:19:"2010-07-10 15:39:27";
s:4:"name";s:9:"TwentyTen";
s:11:"num_ratings";s:2:"12";
s:11:"preview_url";s:30:"http://wp-themes.com/twentyten";
s:6:"rating";s:2:"75";
s:14:"screenshot_url";s:63:"http://wp-themes.com/wp-content/themes/twentyten/screenshot.png";
s:8:"sections";a:1:{
s:11:"description";s:37:"The 2010 default theme for WordPress.";
}
s:4:"slug";s:9:"twentyten";
s:5:"stats";a:19:{
s:10:"2010-06-21";s:3:"250";
s:10:"2010-06-22";s:3:"829";
s:10:"2010-06-23";s:3:"658";
s:10:"2010-06-24";s:3:"556";
s:10:"2010-06-25";s:3:"518";
s:10:"2010-06-26";s:3:"429";
s:10:"2010-06-27";s:3:"418";
s:10:"2010-06-28";s:3:"465";
s:10:"2010-06-29";s:3:"511";
s:10:"2010-06-30";s:3:"454";
s:10:"2010-07-01";s:3:"415";
s:10:"2010-07-02";s:3:"358";
s:10:"2010-07-03";s:3:"270";
s:10:"2010-07-04";s:3:"312";
s:10:"2010-07-05";s:3:"347";
s:10:"2010-07-06";s:3:"428";
s:10:"2010-07-07";s:3:"405";
s:10:"2010-07-08";s:3:"402";
s:10:"2010-07-09";s:3:"358";
}
s:4:"tags";a:13:{
s:9:"tag-black";s:5:"black";
s:8:"tag-blue";s:4:"blue";
s:9:"tag-white";s:5:"white";
s:17:"tag-two-columns-1";s:11:"two-columns";
s:17:"tag-fixed-width-1";s:11:"fixed-width";
s:17:"tag-custom-header";s:13:"custom-header";
s:21:"tag-custom-background";s:17:"custom-background";
s:21:"tag-threaded-comments";s:17:"threaded-comments";
s:15:"tag-sticky-post";s:11:"sticky-post";
s:21:"tag-translation-ready";s:17:"translation-ready";
s:16:"tag-microformats";s:12:"microformats";
s:24:"tag-rtl-language-support";s:20:"rtl-language-support";
s:16:"tag-editor-style";s:12:"editor-style";
}
s:10:"total_days";s:2:"19";
s:15:"total_downloads";s:4:"8383";
s:4:"type";s:5:"theme";
s:7:"updated";s:10:"2010-06-21";
s:7:"version";s:5:"1.0.3";
}
Response with 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.php?onlystats=true
a:8:{
s:17:"average_downloads";s:7:"211.381";
s:4:"hits";s:2:"64";
s:11:"last_update";s:19:"2009-10-11 21:11:07";
s:4:"slug";s:13:"fluency-admin";
s:5:"stats";a:21:{
s:10:"2009-09-20";s:3:"694";
s:10:"2009-09-21";s:3:"619";
s:10:"2009-09-22";s:3:"312";
s:10:"2009-09-23";s:3:"302";
s:10:"2009-09-24";s:3:"228";
s:10:"2009-09-25";s:3:"180";
s:10:"2009-09-26";s:3:"158";
s:10:"2009-09-27";s:3:"145";
s:10:"2009-09-28";s:3:"217";
s:10:"2009-09-29";s:3:"204";
s:10:"2009-09-30";s:3:"181";
s:10:"2009-10-01";s:3:"158";
s:10:"2009-10-02";s:3:"115";
s:10:"2009-10-03";s:3:"115";
s:10:"2009-10-04";s:3:"103";
s:10:"2009-10-05";s:3:"132";
s:10:"2009-10-06";s:3:"134";
s:10:"2009-10-07";s:3:"145";
s:10:"2009-10-08";s:3:"112";
s:10:"2009-10-09";s:3:"107";
s:10:"2009-10-10";s:2:"78";
}
s:10:"total_days";s:2:"21";
s:15:"total_downloads";s:4:"4439";
s:4:"type";s:6:"plugin";
}
Response with 4 days of stats and 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.php?count=4&onlystats=true
a:8:{
s:17:"average_downloads";s:7:"211.381";
s:5:"count";s:1:"4";
s:4:"hits";s:2:"64";
s:11:"last_update";s:19:"2009-10-11 21:11:07";
s:4:"slug";s:13:"fluency-admin";
s:5:"stats";a:21:{
s:10:"2009-10-07";s:3:"145";
s:10:"2009-10-08";s:3:"112";
s:10:"2009-10-09";s:3:"107";
s:10:"2009-10-10";s:2:"78";
}
s:10:"total_days";s:2:"21";
s:15:"total_downloads";s:4:"4439";
s:4:"type";s:6:"plugin";
}
XML Response
| URL |
http://wpapi.org/api/plugin/slug.xml
http://wpapi.org/api/theme/slug.xml
|
||
|---|---|---|---|
| Parameters | count | (integer) | specify how many days of stats to return. |
| onlystats | (boolean) | if true, will exclude full plugin/theme details from response | |
Examples
Full response for a plugin - including both stats and details
http://wpapi.org/api/plugin/fluency-admin.xml
<?xml version="1.0" encoding="UTF-8"?>
<data>
<added>2009-09-20</added>
<author>
<name>Dean Robinson</name>
<url>http://deanjrobinson.com/</url>
<profile>http://wordpress.org/extend/plugins/profile/deanjrobinson</profile>
</author>
<average_downloads>147.048</average_downloads>
<contributors>
<contributor>
<name>deanjrobinson</name>
<profile>http://wordpress.org/extend/plugins/profile/deanjrobinson</profile>
</contributor>
</contributors>
<download_link>http://downloads.wordpress.org/plugin/fluency-admin.2.3.2.zip</download_link>
<hits>144</hits>
<homepage>http://deanjrobinson.com/projects/fluency-admin/</homepage>
<last_update_details>2010-07-10 14:10:02</last_update_details>
<last_update_stats>2010-07-10 14:10:00</last_update_stats>
<name>Fluency Admin</name>
<num_ratings>37</num_ratings>
<rating>99</rating>
<requires>2.9</requires>
<sections>
<description><!-- HTML content --></description>
<installation><!-- HTML content --></installation>
<screenshots><!-- HTML content --></screenshots>
<changelog><!-- HTML content --></changelog>
<faq><!-- HTML content --></faq>
</sections>
<slug>fluency-admin</slug>
<stats>
<value date="2010-06-29">329</value>
<value date="2010-06-30">327</value>
<value date="2010-07-01">291</value>
<value date="2010-07-02">227</value>
<value date="2010-07-03">177</value>
<value date="2010-07-04">183</value>
<value date="2010-07-05">223</value>
<value date="2010-07-06">253</value>
<value date="2010-07-07">253</value>
<value date="2010-07-08">223</value>
<value date="2010-07-09">820</value>
</stats>
<tags>
<tag>design</tag>
<tag>login</tag>
<tag>theme</tag>
<tag>plugin</tag>
<tag>admin</tag>
<tag>fluency</tag>
<tag>color scheme</tag>
</tags>
<tested>3.0</tested>
<total_days>293</total_days>
<total_downloads>43085</total_downloads>
<type>plugin</type>
<updated>2010-07-09</updated>
<version>2.3.2</version>
</data>
Full response for a theme - including both stats and details
http://wpapi.org/api/theme/twentryten.xml
<?xml version="1.0" encoding="UTF-8"?>
<data>
<author>wordpressdotorg</author>
<average_downloads>441.211</average_downloads>
<download_link>http://wordpress.org/extend/themes/download/twentyten.1.0.3.zip</download_link>
<hits>0</hits>
<homepage>http://wordpress.org/extend/themes/twentyten</homepage>
<last_update_details>2010-07-10 15:39:29</last_update_details>
<last_update_stats>2010-07-10 15:39:27</last_update_stats>
<name>TwentyTen</name>
<num_ratings>12</num_ratings>
<preview_url>http://wp-themes.com/twentyten</preview_url>
<rating>75</rating>
<screenshot_url>http://wp-themes.com/wp-content/themes/twentyten/screenshot.png</screenshot_url>
<sections>
<description>The 2010 default theme for WordPress.</description>
</sections>
<slug>twentyten</slug>
<stats>
<value date="2010-06-21">250</value>
<value date="2010-06-22">829</value>
<value date="2010-06-23">658</value>
<value date="2010-06-24">556</value>
<value date="2010-06-25">518</value>
<value date="2010-06-26">429</value>
<value date="2010-06-27">418</value>
<value date="2010-06-28">465</value>
<value date="2010-06-29">511</value>
<value date="2010-06-30">454</value>
<value date="2010-07-01">415</value>
<value date="2010-07-02">358</value>
<value date="2010-07-03">270</value>
<value date="2010-07-04">312</value>
<value date="2010-07-05">347</value>
<value date="2010-07-06">428</value>
<value date="2010-07-07">405</value>
<value date="2010-07-08">402</value>
<value date="2010-07-09">358</value>
</stats>
<tags>
<tag>black</tag>
<tag>blue</tag>
<tag>white</tag>
<tag>two-columns</tag>
<tag>fixed-width</tag>
<tag>custom-header</tag>
<tag>custom-background</tag>
<tag>threaded-comments</tag>
<tag>sticky-post</tag>
<tag>translation-ready</tag>
<tag>microformats</tag>
<tag>rtl-language-support</tag>
<tag>editor-style</tag>
</tags>
<total_days>19</total_days>
<total_downloads>8383</total_downloads>
<type>theme</type>
<updated>2010-06-21</updated>
<version>1.0.3</version>
</data>
Response with 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.xml?onlystats=true
<?xml version="1.0" encoding="UTF-8"?>
<data>
<average_downloads>211.381</average_downloads>
<hits>12</hits>
<last_update_stats>2009-10-11 19:49:28</last_update_stats>
<slug>fluency-admin</slug>
<stats>
<value date="2009-09-20">694</value>
<value date="2009-09-21">619</value>
<value date="2009-09-22">312</value>
<value date="2009-09-23">302</value>
<value date="2009-09-24">228</value>
<value date="2009-09-25">180</value>
<value date="2009-09-26">158</value>
<value date="2009-09-27">145</value>
<value date="2009-09-28">217</value>
<value date="2009-09-29">204</value>
<value date="2009-09-30">181</value>
<value date="2009-10-01">158</value>
<value date="2009-10-02">115</value>
<value date="2009-10-03">115</value>
<value date="2009-10-04">103</value>
<value date="2009-10-05">132</value>
<value date="2009-10-06">134</value>
<value date="2009-10-07">145</value>
<value date="2009-10-08">112</value>
<value date="2009-10-09">107</value>
<value date="2009-10-10">78</value>
</stats>
<total_days>21</total_days>
<total_downloads>4439</total_downloads>
<type>plugin</type>
</data>
Response with 3 days of stats and 'onlystats' set to TRUE
http://wpapi.org/api/plugin/fluency-admin.xml?count=3&onlystats=true
<?xml version="1.0" encoding="UTF-8"?>
<data>
<average_downloads>211.381</average_downloads>
<count>3</count>
<hits>12</hits>
<last_update_stats>2009-10-11 19:49:28</last_update_stats>
<slug>fluency-admin</slug>
<stats>
<value date="2009-10-08">112</value>
<value date="2009-10-09">107</value>
<value date="2009-10-10">78</value>
</stats>
<total_days>21</total_days>
<total_downloads>4439</total_downloads>
<type>plugin</type>
</data>
CSV
| URL |
http://wpapi.org/api/plugin/slug.csv
http://wpapi.org/api/theme/slug.csv
|
||
|---|---|---|---|
| Parameters | count | (integer) | specify how many days of stats to return. |
Only returns the download stats for the specified plugin or theme.
Examples
Default response
http://wpapi.org/api/plugin/fluency-admin.csv
"date","downloads", "2009-09-20","694", "2009-09-21","619", "2009-09-22","312", "2009-09-23","302", "2009-09-24","228", "2009-09-25","180", "2009-09-26","158", "2009-09-27","145", "2009-09-28","217", "2009-09-29","204", "2009-09-30","181", "2009-10-01","158", "2009-10-02","115", "2009-10-03","115", "2009-10-04","103", "2009-10-05","132", "2009-10-06","134", "2009-10-07","145", "2009-10-08","112", "2009-10-09","107", "2009-10-10","78",
Response with 4 days of stats
http://wpapi.org/api/plugin/fluency-admin.csv?count=4
"date","downloads", "2009-10-07","145", "2009-10-08","112", "2009-10-09","107", "2009-10-10","78",
WPAPI updates
July 10, 2010
- Updated Documentation and Examples to reflect API changes/additions for plugins and themes.
- Change to the save/update methods to keep existing stats.
- Because the WordPress stats api call only returns the last 699 days, I'm now merging this data with the already collected data so that WPapi can return as many days of statistics as possible.
- Fixed update bug for theme/plugin details (wasn't updating after initial collection)
May 22, 2010
- Added 'onlystats' parameter to allow for just the stats for the plugin/theme to be returned.
April 3, 2010
- Added Plugin details in addition to stats:
- New info includes: added, updated, author (name, url, profile), contributors (name, profile), download_link, homepage, name, num_ratings, rating, requires, sections (description, installation, screenshots, changelog, faq), tags, tested, version
- Added Theme details in addition to stats:
- New info includes: updated, author, download_link, homepage, name, num_ratings, rating, sections (description), tags, version, preview_url, screenshot_url
- Nodes in returned data are now sorted alphabetically.
October 18, 2009
- Updated Documentation and Examples (usage examples coming soon).
- Added CSV output format (stats only).
- Added 'count' parameter to all formats.
October 12, 2009
- Added JSONP (with custom callback support) and PHP (serialized string) output formats.
- Fixed content type for XML and JSON feeds.
October 11, 2009
- Initial launch
- Added XML and JSON output formats.