User Activity

Is there an API available to use the Code Search capability in ServiceNow from within Background Scripts or Script Includes?  I have a long list of events (from the Event Registry) that I want to run through a script to call Code Search to see where ...
Helpfuls given to