API Keys
Generate and manage API keys for programmatic access to the Nesika AI platform. Use API keys to integrate with external tools, automate workflows, and build custom dashboards.
On This Page
Overview
API keys provide programmatic access to all Nesika AI endpoints. With an API key, you can:
- Fetch overview statistics, competitor data, and pricing trends
- Manage tracked products (add, update, remove, bulk operations)
- Trigger and monitor price scans
- Access AI-generated pricing insights
- Export data to Excel, CSV, or connect to BI tools like Power BI
- Integrate with automation platforms like Make.com or Zapier
Workspace Admin Required
Generating an API Key
Follow these steps to generate a new API key:
Open Settings
Select the API Keys tab
Click Generate New API Key
Copy and save your key
Save Your Key Immediately
Using Your API Key
Include your API key in every request using the X-API-Key HTTP header:
curl -X GET https://api.nesika.ai/api/overview/statistics \ -H "X-API-Key: nes_your_api_key_here" \ -H "Content-Type: application/json"
All API responses follow a consistent JSON format with success,data, andmessage fields.
Managing Keys
From the API Keys settings tab, you can perform the following operations on your keys:
Revoke
Permanently deactivate a key. Revoked keys can no longer authenticate API requests. Use this when a key may have been compromised.
Rotate
Revoke the current key and generate a new replacement with the same name and remaining expiration. Use this for routine security rotation.
Key Limits
Rate Limits
Each API key is limited to 100 requests per minute using a sliding window. If you exceed this limit, the API returns HTTP 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.
Rate Limit Headers
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests per window (100) |
| Retry-After | Seconds to wait before retrying (returned with 429) |
Security Best Practices
- Never commit keys to source control. Use environment variables or a secrets manager to store your API key.
- Rotate keys regularly. Use the rotate feature to periodically replace keys without downtime.
- Use descriptive names. Name keys after their purpose (e.g., "make.com-integration", "power-bi-dashboard") so you can identify and revoke them if needed.
- Monitor usage counts. The key list shows how many times each key has been used — unexpected spikes may indicate misuse.
- Revoke compromised keys immediately. If a key is leaked, revoke it from Settings → API Keys right away.
Quick-Start Code Examples
Copy these examples to get started quickly. Replace YOUR_API_KEY with your actual key.
cURL
curl -X GET https://api.nesika.ai/api/overview/statistics \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json"
Python
import requests
response = requests.get(
"https://api.nesika.ai/api/overview/statistics",
headers={"X-API-Key": "YOUR_API_KEY"}
)
data = response.json()
print(data)JavaScript
const response = await fetch(
"https://api.nesika.ai/api/overview/statistics",
{ headers: { "X-API-Key": "YOUR_API_KEY" } }
);
const data = await response.json();
console.log(data);C# / .NET
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.nesika.ai/api/overview/statistics"
);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);