Is there a WordPress API or feed that returns all comments for a specified author?

I’m looking for a way to access all comments authored by a specific user. I know there is a feed for all comments regardless of user (http://example.com/comments/feed/) but is there a way to limit comments to a certain user?

Related posts

Leave a Reply

1 comment

  1. The get_comments() function allows you to pass in an array of parameters to filter on – http://codex.wordpress.org/Function_Reference/get_comments

    To get all comments for user_ID 1, you would use:

    $args = array( 'ID' => 1 );
    $comments = get_comments( $args );
    

    The result will be an array of comment objects that match your search criteria. You can use multiple filters at once, for example the user ID in conjunction with a status.