Google Alerts API Php Class (Miscellaneous)

Google announced a wonderful service called Google Alerts lately.

Unfortunately, Google hasn’t published an API for Google Alerts, yet. I know how frustrating is to search for an API and can’t find it. So I decided to code a PHP class to use Google Alerts programmatically.

You would be able to add alerts, delete alerts and list alerts by my Google Alerts API Class.

It is very simple to use. To use it;

1. Include it to your PHP code:
include(‘alerts.php’);

2. Call the class:
$alerts = new GoogleAlerts();

3. Define the username and password of your Google account:
$alerts->username = ’’;
$alerts->password = ’’;

And you would be able to list your alerts, add new alert and delete an alert now.

To List Google Alerts:

$alerts->listAlerts();

$alerts->addAlert(‘test’);

This code will return the info of the added alert like list function.

To Delete A Google Alert:

$alerts->deleteAlert(‘AB2Xq4hCMYO4rAnGLE_dX_g1s0VFPOvDsES-Y5Y‘); // s value

Download Google Alerts API Php Class (Miscellaneous)

One thought on “Google Alerts API Php Class (Miscellaneous)”

  1. You can send for me “google alerts api class php” ?
    Please, I need it to support for my forum.

    Thanks very much

Leave a Reply

Your email address will not be published. Required fields are marked *