> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neariq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier Integration

> Connect NearIQ to 5,000+ apps via Zapier triggers and actions.

NearIQ integrates with Zapier through authenticated API triggers and webhook subscriptions. When competitive events occur (rating changes, review surges, status changes), Zapier receives the event and can route it to any connected app.

## How it works

1. Create a Zap in Zapier and select NearIQ as the trigger app
2. Authenticate with your NearIQ API key (Growth plan or above)
3. Choose an event trigger (competitor rating change, review surge, etc.)
4. Configure the action (send to Slack, create CRM contact, update spreadsheet, etc.)

## Supported triggers

| Event                       | Description                                           |
| --------------------------- | ----------------------------------------------------- |
| `competitor.rating_change`  | A tracked competitor's rating changed                 |
| `competitor.review_surge`   | A competitor received an unusual increase in reviews  |
| `competitor.hours_change`   | A competitor updated their hours                      |
| `competitor.price_change`   | A competitor changed their pricing                    |
| `competitor.status_change`  | A competitor status signal changed                    |
| `competitor.website_change` | A competitor's website content changed                |
| `competitor.new_competitor` | A new competitor was added                            |
| `business.rating_change`    | Your business rating changed                          |
| `business.review_surge`     | Your business received an unusual increase in reviews |
| `alert.created`             | Any new alert was generated                           |
| `api_key.suspended`         | An API key was suspended                              |
| `api_key.reactivated`       | An API key was reactivated                            |
| `api_key.revoked_by_admin`  | An API key was revoked by an admin                    |

## API endpoints

### Subscribe (POST /api/zapier/subscribe)

Zapier calls this to register a webhook URL for a specific event.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://app.neariq.io/api/zapier/subscribe" \
    -H "X-NearIQ-Key: niq_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "hookUrl": "https://hooks.zapier.com/hooks/catch/...",
      "event": "competitor.rating_change"
    }'
  ```
</RequestExample>

### Poll (GET /api/zapier/poll?event=alert.created)

Returns the 25 most recent alerts for deduplication. Zapier uses the `id` field to track which alerts have already triggered.

## Requirements

* Growth plan or above (webhooks feature required)
* Valid NearIQ API key with `alerts:read` for polling or `webhooks:manage` for subscriptions
