Skip to main content
The export and usage endpoints let you pull a complete snapshot of your NearIQ data and monitor how your account is being used. Both endpoints are read-only and require a valid API key.

GET /api/v1/export

Exports all account data as a single JSON payload. By default the response includes your business profile, all tracked competitors with their latest snapshots, and up to 500 alerts from the last 90 days. The response is served with a Content-Disposition: attachment header so browsers will prompt to save the file.
curl "https://neariq.io/api/v1/export" \
  -H "X-NearIQ-Key: niq_live_..." \
  -o neariq-export.json

Request parameters

include
string
Comma-separated list of sections to include. Accepted values: business, competitors, alerts. Defaults to all three if omitted.Example: include=business,alerts returns your profile and alerts but skips competitors.

Response fields

exportedAt
string
required
ISO 8601 timestamp of when the export was generated.
accountId
string
required
Your NearIQ user ID.
business
object
Your business profile. Present when business is included. Fields match GET /api/v1/me.
competitors
object[]
All tracked competitors. Present when competitors is included. Each object contains the standard competitor fields plus:
alerts
object[]
Alerts from the last 90 days (up to 500). Present when alerts is included. Each alert includes:

Example — export only alerts

curl "https://neariq.io/api/v1/export?include=alerts" \
  -H "X-NearIQ-Key: niq_live_..."
{
  "exportedAt": "2025-04-27T14:30:00.000Z",
  "accountId": "usr_abc123",
  "alerts": [
    {
      "id": "alt_xyz",
      "title": "Rival Pizzeria dropped to 3.8 stars",
      "description": "Rival Pizzeria's rating fell from 4.1 to 3.8 over the last 30 days.",
      "recommendation": "Highlight your higher rating in local advertising this week.",
      "severity": "opportunity",
      "type": "rating_drop",
      "competitorName": "Rival Pizzeria",
      "createdAt": "2025-04-25T09:00:00.000Z"
    }
  ]
}

GET /api/v1/usage

Returns API usage statistics for your account, including your subscription plan, trial status, competitor and alert counts, and details about all your API keys.
curl https://neariq.io/api/v1/usage \
  -H "X-NearIQ-Key: niq_live_..."

Response fields

accountId
string
required
Your NearIQ user ID.
plan
string
required
Your effective subscription plan. Possible values: trial, expired, starter, growth, agency, enterprise, scale, unlimited, org_member.
trialEndsAt
string
ISO 8601 timestamp of when your trial expires, or null if you are not on a trial.
memberSince
string
ISO 8601 timestamp of when your account was created.
competitors
object
required
alerts
object
required
apiKeys
object[]
required

Example response

{
  "accountId": "usr_abc123",
  "plan": "growth",
  "trialEndsAt": null,
  "memberSince": "2025-01-15T10:00:00.000Z",
  "competitors": { "tracked": 8 },
  "alerts": { "last30Days": 14 },
  "apiKeys": [
    {
      "id": "key_abc",
      "name": "Production",
      "createdAt": "2025-02-01T00:00:00.000Z",
      "lastUsedAt": "2025-04-27T13:55:00.000Z",
      "revoked": false
    }
  ]
}