API REST de evaluiA
Integra el poder de evaluiA en tus aplicaciones
REST
API RESTful estándar
JSON
Formato de respuesta
99.9%
Uptime garantizado
Autenticación
La API de evaluiA utiliza API Keys para autenticación. Incluye tu clave en el header Authorization de cada petición.
Ejemplo de autenticación
curl https://api.evaluia.com/v1/mentions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Nota: Obtén tu API Key desde el panel de control en Configuración → API Keys
Endpoints Principales
GET
/v1/mentions
Obtiene todas las menciones de tu marca
Parámetros de consulta
| Parámetro | Tipo | Descripción |
|---|---|---|
limit | integer | Número de resultados (máx: 100) |
offset | integer | Paginación (inicio) |
sentiment | string | Filtrar por: positive, negative, neutral |
date_from | date | Fecha inicio (YYYY-MM-DD) |
Ejemplo de respuesta
{
"data": [
{
"id": "men_1234567890",
"text": "Excelente servicio de evaluiA, muy recomendable",
"sentiment": "positive",
"score": 0.92,
"source": "twitter",
"author": "@usuario123",
"url": "https://twitter.com/usuario123/status/...",
"created_at": "2025-11-13T10:30:00Z"
}
],
"meta": { "total": 1247, "limit": 10, "offset": 0 }
}
POST
/v1/monitors
Crea un nuevo monitor de keywords
Cuerpo de la petición
{
"name": "Monitor Principal",
"keywords": ["evaluiA", "reputación online"],
"sources": ["twitter", "google", "facebook"],
"alerts": { "email": true, "slack": true, "threshold": "negative" }
}
Respuesta exitosa (201)
{
"id": "mon_9876543210",
"name": "Monitor Principal",
"status": "active",
"created_at": "2025-11-13T10:30:00Z"
}
GET
/v1/analytics/sentiment
Obtiene análisis de sentimiento agregado
Ejemplo de respuesta
{
"period": "30d",
"sentiment": { "positive": 72.5, "neutral": 18.3, "negative": 9.2 },
"total_mentions": 3847,
"trend": "improving",
"change": +12.3
}
Ejemplos de Código
JavaScript (Node.js)
const axios = require('axios');
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.evaluia.com/v1';
async function getMentions() {
try {
const response = await axios.get(`${BASE_URL}/mentions`, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
params: { limit: 10, sentiment: 'positive' }
});
console.log(response.data);
} catch (error) { console.error('Error:', error.response.data); }
}
getMentions();
Python
import requests
API_KEY = 'your_api_key_here'
BASE_URL = 'https://api.evaluia.com/v1'
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
params = {
'limit': 10,
'sentiment': 'positive'
}
response = requests.get(
f'{BASE_URL}/mentions',
headers=headers,
params=params
)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f'Error: {response.status_code}')
PHP
<?php
$apiKey = 'your_api_key_here';
$baseUrl = 'https://api.evaluia.com/v1';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $baseUrl . '/mentions?limit=10&sentiment=positive',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$data = json_decode($response, true);
print_r($data);
} else {
echo "Error: $httpCode";
}
?>
Rate Limits
| Plan | Requests/minuto | Requests/día |
|---|---|---|
| Starter | 60 | 5,000 |
| Professional | 120 | 15,000 |
| Enterprise | 300 | 50,000 |
Nota: Los headers de respuesta incluyen X-RateLimit-Remaining y X-RateLimit-Reset para monitorear tu uso.
Webhooks
Configura webhooks para recibir notificaciones en tiempo real cuando se detecten nuevas menciones o cambios importantes en tu reputación.
Eventos disponibles
- ✓
mention.created- Nueva mención detectada - ✓
alert.triggered- Alerta activada (mención negativa) - ✓
sentiment.changed- Cambio significativo en sentimiento - ✓
report.ready- Informe mensual generado
Ejemplo de payload
{
"event": "mention.created",
"timestamp": "2025-11-13T10:30:00Z",
"data": {
"mention_id": "men_1234567890",
"text": "Excelente servicio de evaluiA",
"sentiment": "positive",
"score": 0.92,
"source": "twitter",
"url": "https://twitter.com/..."
}
}
¿Necesitas Ayuda con la API?
Nuestro equipo técnico está disponible para ayudarte
Contactar Soporte Técnico