This page outlines the API for accessing the word count information for NaNoWriMo. There are five major types of information you can retrieve:
These functions are meant to be used by external tools to graphically track your wordcount data.
To get the current wordcount, use the following URL, using your numerical uid.
http://www.nanowrimo.org/wordcount_api/wc/30837
If you are currently logged in, your uid is shown in the example above. You can find any user's uid by navigating to their profile page and examining the URL.
The current wordcount will be returned in an XML structure:
<!DOCTYPE wc [ <!ELEMENT wc (uid, error, uname, user_wordcount)> <!ELEMENT uid (#PCDATA)> <!ELEMENT error (#PCDATA)> <!ELEMENT uname (#PCDATA)> <!ELEMENT user_wordcount (#PCDATA)> ]>
For example, you might see:
<wc> <uid>30837</uid> <uname>NewMexicoKid</uname> <user_wordcount>2699</user_wordcount> </wc>
Return to the top of this page
To get the wordcount history, use the following URL, using your numerical uid.
http://www.nanowrimo.org/modules/wordcount_api/wchistory/30837
If you are currently logged in, your uid is shown in the example above. You can find any user's uid by navigating to their profile page and examining the URL.
The wordcount history will be returned in an XML structure:
<!DOCTYPE wchistory [ <!ELEMENT wchistory (uid,error,uname,user_wordcount,wordcounts)> <!ELEMENT uid (#PCDATA)> <!ELEMENT error (#PCDATA)> <!ELEMENT uname (#PCDATA)> <!ELEMENT user_wordcount (#PCDATA)> <!ELEMENT wordcounts (wcentry+)> <!ELEMENT wcentry (wc,wcdate)> <!ELEMENT wc (#PCDATA)> <!ELEMENT wcdate (#PCDATA)> ]>
For example, the output might look like:
<wchistory> <uid>30837</uid> <uname>NewMexicoKid</uname> <user_wordcount>25001</user_wordcount> <wordcounts> <wcentry> <wc>2699</wc> <wcdate>2005-11-01</wcdate> </wcentry> <wcentry> <wc>2315</wc> <wcdate>2005-11-02</wcdate> </wcentry> <wcentry> <wc>6302</wc> <wcdate>2005-11-04</wcdate> </wcentry> </wordcounts> </wchistory>
Return to the top of this page
To get the site wordcount use the following URL:
http://www.nanowrimo.org/wordcount_api/wcstatssummaryThe site wordcount will be returned in an XML structure:
<!DOCTYPE min, max, average, stddev, count [ <!ELEMENT error (#PCDATA)> <!ELEMENT wcstatssummary (site_wordcount, error, min, max, average, stddev, count)> <!ELEMENT site_wordcount (#PCDATA)> <!ELEMENT min (#PCDATA)> <!ELEMENT max (#PCDATA)> <!ELEMENT average (#PCDATA)> <!ELEMENT stddev (#PCDATA)> <!ELEMENT count (#PCDATA)> ]>
The final results will look like:
<wcstatssummary> <site_wordcount>38200</site_wordcount> <wcdate>2005-11-01</wcdate> <min>25</min> <max>5000</max> <average>1677</average> <stddev>350</stddev> <count>84579</count> </wcstatssummary>
Return to the top of this page
To get the site wordcount history,
http://www.nanowrimo.org/wordcount_api/wcstatsThe site wordcount history will be returned in an XML structure:
<!DOCTYPE wcstats [ <!ELEMENT error (#PCDATA)> <!ELEMENT wcstats (site_wordcount, error, wcentry+)> <!ELEMENT site_wordcount (#PCDATA)> <!ELEMENT wordcounts (wcentry+)> <!ELEMENT wcentry (wc, wcdate, min, max, average, stddev, count)> <!ELEMENT wcdate (#PCDATA)> <!ELEMENT min (#PCDATA)> <!ELEMENT max (#PCDATA)> <!ELEMENT average (#PCDATA)> <!ELEMENT stddev (#PCDATA)> <!ELEMENT count (#PCDATA)> ]>
The final results will look like:
<wcstats> <site_wordcount>38200</site_wordcount> <wordcounts> <wcentry> <wc>6002234</wc> <wcdate>2005-11-01</wcdate> <min>25</min> <max>5000</max> <average>1677</average> <stddev>350</stddev> <count>84579</count> </wcentry> <wcentry> <wc>17823647</wc> <wcdate>2005-11-02</wcdate> <min>34</min> <max>50000</max> <average>2596</average> <stddev>500</stddev> <count>84579</count> </wcentry> <wordcounts> </wcstats>
Return to the top of this page
To get the region wordcount, use the following URL with a region id:
http://www.nanowrimo.org/wordcount_api/wcregion/190
If you are logged in and have a home region set, your home region id has been automatically inserted into the example. You can find any region's id by navigating to the region page and examining the URL.
The regional wordcount will be returned in an XML structure:
<!DOCTYPE wcregion [ <!ELEMENT wcregion (rid, error, rname, region_wordcount, min, max, average, stddev, count)> <!ELEMENT rid (#PCDATA)> <!ELEMENT error (#PCDATA)> <!ELEMENT rname (#PCDATA)> <!ELEMENT region_wordcount (#PCDATA)> <!ELEMENT min (#PCDATA)> <!ELEMENT max (#PCDATA)> <!ELEMENT average (#PCDATA)> <!ELEMENT stddev (#PCDATA)> <!ELEMENT count (#PCDATA)> ]>
For example, you might see:
<wcregion> <rid>3</rid> <rname>Arizona :: Elsewhere</rname> <region_wordcount>25320</region_wordcount> <min>25</min> <max>5000</max> <average>1677</average> <stddev>350</stddev> <count>84579</count> </wcregion>
Return to the top of this page
To get the region wordcount, use the following URL with a region id:
http://www.nanowrimo.org/wordcount_api/wcregionhist/190
If you are logged in and have a home region set, your home region id has been automatically inserted into the example. You can find any region's id by navigating to the region page and examining the URL.
The regional wordcount history will be returned in an XML structure:
<!DOCTYPE wcregionhist [ <!ELEMENT wcregionhist (rid, error, rname, region_wordcount, wordcounts)> <!ELEMENT rid (#PCDATA)> <!ELEMENT error (#PCDATA)> <!ELEMENT rname (#PCDATA)> <!ELEMENT region_wordcount (#PCDATA)> <!ELEMENT wordcounts (wcentry+)> <!ELEMENT wcentry (wc,wcdate, max, min, average, stddev, count)> <!ELEMENT wc (#PCDATA)> <!ELEMENT wcdate (#PCDATA)> <!ELEMENT min (#PCDATA)> <!ELEMENT max (#PCDATA)> <!ELEMENT average (#PCDATA)> <!ELEMENT stddev (#PCDATA)> <!ELEMENT count (#PCDATA)> ]>
For example, you might see:
<wcregionhist> <rid>3</rid> <rname>Arizona::Elsewhere</rname> <wcrank>135</wcrank> <wordcounts> <wcentry> <wc>11320</wc> <wcdate>2005-11-01</wcdate> <min>34</min> <max>50000</max> <average>2596</average> <stddev>500</stddev> <count>84579</count> </wcentry> <wcentry> <wc>13727</wc> <wcdate>2005-11-02</wcdate> <min>34</min> <max>50000</max> <average>2596</average> <stddev>500</stddev> <count>84579</count> </wcentry> <wcentry> <wc>14288</wc> <wcdate>2005-11-03</wcdate> <min>34</min> <max>50000</max> <average>2596</average> <stddev>500</stddev> <count>84579</count> </wcentry> <wcentry> <wc>14288</wc> <wcdate>2005-11-04</wcdate> <min>34</min> <max>50000</max> <average>2596</average> <stddev>500</stddev> <count>84579</count> </wcentry> <wcentry> <wc>25320</wc> <wcdate>2005-11-05</wcdate> <min>34</min> <max>50000</max> <average>2596</average> <stddev>500</stddev> <count>84579</count> </wcentry> </wordcounts> </wcregionhist>
To get the genre wordcount, use the following URL with a genre id:
http://www.nanowrimo.org/wordcount_api/wcgenre/5
If you are logged in and you have a genre set on the author info page, your genre id has been automatically inserted into the example above.
The genre wordcount is mostly identical in structure and function to the region wordcount.
Return to the top of this page
To get the genre wordcount history, use the following URL with a genre id:
http://www.nanowrimo.org/wordcount_api/wcgenrehist/5
If you are logged in and you have a genre set on the author info page, your genre id has been automatically inserted into the example above.
The genre wordcount history is mostly identical in structure and function to the region wordcount history.
Return to the top of this page