As far as I know, Apple provides a free (as in zero-cost) SDK for iTunes
Visual Plug-Ins for both OS X and Windows. If you can't get what you need through that, you could always use iTunes Apple Events scripting interface to monitor via polling from another OS X app using an OSA-compatible interface such as AppleScript or appscript with Python, Ruby, or Objective-C. That may not be what you'd like but it is documented and supported.
For example, with py-appscript, here's how to access the current track and the those in the recently played smartlist:
>>> from appscript import *
>>> it = app('iTunes')
>>> it.current_track.rating() # 40 == 2 stars
40
>>> len(it.playlists['Recently Played'].tracks())
80
>>> it.playlists['Recently Played'].tracks[1].rating()
40
>>> it.playlists['Recently Played'].tracks[1].rating.set(to=100)
>>> it.playlists['Recently Played'].tracks[1].rating() # 100 = 5 stars
100
It's also possible to filter on various metadata fields (open the iTunes.app scripting definition in the AppleScript Script Editor to browse):
>>> import datetime
>>> an_hour_ago = datetime.datetime.now() - datetime.timedelta(hours=1)
>>> it.playlists['Library'].tracks[its.modification_date >= an_hour_ago]()
[app(u'/Applications/iTunes.app').sources.ID(45).library_playlists.ID(49347).file_tracks.ID(72017)]
But note that changes to ratings do not appear to affect the modification date.