Answers.Body: <p>I'm not aware of an API, but they way they have it set up it's pretty easy to gather data via a technique called <a href="http://en.wikipedia.org/wiki/Web_scraping" rel="nofollow" title="screen/web scraping">screen/web scraping</a>.</p>
  
  <p>For example, a search on your name gives a link to a specific page with your member id in the URL. Then if you have a programming language/library that is DOM-aware, you can simply figure out where certain things will be, based on the design of the page. Using jquery selectors, and a couple of traversals, that page can be parsed to get the rating as such: </p>
  
  <pre><code>&gt; $("td td td:contains(Regular Rating)").next().find("nobr").text();
  "2072  
  2012-03(Current floor is 1800)"
  </code></pre>
  
  <p>Nice rating, by the way.</p>
  
  <p>It's a bit painful, and even more painful if they ever decide to change the design of the pages, but eventually you'll be able to parse out all the data you want, and then build a way of collecting data for each member and storing it in your own database for analytics. It wouldn't be that hard to do, just iterate through member ids, and you can get their names, states, ratings, etc.--as much is available on their screens.</p>
  
  <p>Hope that helps.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-04T04:01:43.910Z
Answers.Text: And I just saw your website--you probably know all about scraping. Anyway, it would be cool if they offered an API, but I don't think that's the sort of business they're in.
Answers.UserDisplayName: Eve Freeman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-04T04:35:02.630Z
Answers.Text: I actually don't yet.  Something to learn.  Ah well, sounds like a fun weekend project!
Answers.UserDisplayName: Andrew Latham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-04T03:56:28.843Z
Answers.LastActivityDate: 2012-09-04T03:56:28.843Z
Answers.UserDisplayName: Eve Freeman
Answers.Body: <p>I don't think that the USCF has a full API, but there are a few special url's that you can use for simplified screen scraping/data parsing:</p>
  
  <ul>
  <li><a href="http://msa.uschess.org/thin.php" rel="noreferrer">http://msa.uschess.org/thin.php</a></li>
  <li><a href="http://msa.uschess.org/thin2.php" rel="noreferrer">http://msa.uschess.org/thin2.php</a></li>
  <li><a href="http://msa.uschess.org/thin3.php" rel="noreferrer">http://msa.uschess.org/thin3.php</a></li>
  </ul>
  
  <p>In each of those "thin" pages, you can pass a member ID as a url parameter (for example <code>thin3.php?11111111</code>).</p>
  
  <p>The server response is very very lightweight - no extraneous markup.</p>
  
  <p>These pages were designed for cell phone browser use by TD's the day of the tournament if I remember correctly, but they're also useful for extracting data.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-06T19:08:18.753Z
Answers.Text: Nice find. Definitely better than parsing the markup.
Answers.UserDisplayName: Eve Freeman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-06T19:23:38.623Z
Answers.Text: Just a note, this will give you current rating and name by member id, or member id by name, but it doesn't give you any tournament history stats.
Answers.UserDisplayName: Eve Freeman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-06T19:56:46.967Z
Answers.Text: @WesFreeman the only way that I've been able to find tournament history stats (and, well, history) is by very methodical parsing of the msa pages.  I might have some old php code that extracts data somewhere, I'll see if I can dig that up when I'm alone with my external hard drive later.
Answers.UserDisplayName: Andrew
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-11-05T20:32:43.040Z
Answers.Text: They REALLY need some form of API.  There are so many cool mashups that could be done...
Answers.UserDisplayName: Mongo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-09-05T16:16:53.700Z
Answers.LastActivityDate: 2012-09-05T16:16:53.700Z
Answers.UserDisplayName: Andrew
Body: <p>A while ago there was a site made by NM Jonathan Hilton's father that did some analytics on player's USCF rating histories.</p>
  
  <p>I thought it was a pretty good site, but it disappeared.  There are still some tools like that floating around.  I was wondering if there was some sort of USCF API, or how that sort of data might be grabbed.</p>
  
Tags: <programming><uscf>
Title: Is there a USCF API?
ThreadText: # Is there a USCF API?
  
  (Asked by: username_0 on 2012-09-04)
  
  A while ago there was a site made by NM Jonathan Hilton's father that did some analytics on player's USCF rating histories.
  
  I thought it was a pretty good site, but it disappeared. There are still some tools like that floating around. I was wondering if there was some sort of USCF API, or how that sort of data might be grabbed.
  
  **Tags:** programming, uscf
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2012-09-04. Score: 4 | Accepted answer
  
  I'm not aware of an API, but they way they have it set up it's pretty easy to gather data via a technique called [screen/web scraping](http://en.wikipedia.org/wiki/Web_scraping "screen/web scraping").
  
  For example, a search on your name gives a link to a specific page with your member id in the URL. Then if you have a programming language/library that is DOM-aware, you can simply figure out where certain things will be, based on the design of the page. Using jquery selectors, and a couple of traversals, that page can be parsed to get the rating as such:
  
  ```
  > $("td td td:contains(Regular Rating)").next().find("nobr").text();
  "2072  
  2012-03(Current floor is 1800)"
  
  ```
  
  Nice rating, by the way.
  
  It's a bit painful, and even more painful if they ever decide to change the design of the pages, but eventually you'll be able to parse out all the data you want, and then build a way of collecting data for each member and storing it in your own database for analytics. It wouldn't be that hard to do, just iterate through member ids, and you can get their names, states, ratings, etc.--as much is available on their screens.
  
  Hope that helps.
  
  > **Comments:**
  > **username_1**: And I just saw your website--you probably know all about scraping. Anyway, it would be cool if they offered an API, but I don't think that's the sort of business they're in.  
  > **username_0**: I actually don't yet.  Something to learn.  Ah well, sounds like a fun weekend project!  
  
  ---
  
  ### Answer by username_2 on 2012-09-05. Score: 5
  
  I don't think that the USCF has a full API, but there are a few special url's that you can use for simplified screen scraping/data parsing:
  
  * <http://msa.uschess.org/thin.php>
  * <http://msa.uschess.org/thin2.php>
  * <http://msa.uschess.org/thin3.php>
  
  In each of those "thin" pages, you can pass a member ID as a url parameter (for example `thin3.php?11111111`).
  
  The server response is very very lightweight - no extraneous markup.
  
  These pages were designed for cell phone browser use by TD's the day of the tournament if I remember correctly, but they're also useful for extracting data.
  
  > **Comments:**
  > **username_1**: Nice find. Definitely better than parsing the markup.  
  > **username_1**: Just a note, this will give you current rating and name by member id, or member id by name, but it doesn't give you any tournament history stats.  
  > **username_2**: @WesFreeman the only way that I've been able to find tournament history stats (and, well, history) is by very methodical parsing of the msa pages.  I might have some old php code that extracts data somewhere, I'll see if I can dig that up when I'm alone with my external hard drive later.  
  > **username_3**: They REALLY need some form of API.  There are so many cool mashups that could be done...  
  
  ---
  
  