Your first API call
The REST API connects Sentir to your own systems: your clients’ dashboard, a portal, an internal tool that starts searches. It does what the MCP server does, with the same keys, scopes and token caps. The other ways to connect Sentir are under Integrations.
What you need
Section titled “What you need”- An account on the Agency plan or above.
- An access key. You make it under AI & MCP, at the end of the page: how to make one. To start searches, tick Can start searches and set its token cap per call.
The base address is https://sentirsocial.com/api/v1. Every answer is JSON.
The steps
Section titled “The steps”-
Keep the key in an environment variable. Never put it in code or in a web page.
Ventana de terminal export SENTIR_KEY="sntr_…" -
Check that it works.
GET /mesays which account the key belongs to, its scopes and its cap.Ventana de terminal curl "https://sentirsocial.com/api/v1/me" -H "Authorization: Bearer $SENTIR_KEY"{ "data": { "email": "ana@example.com", "account": "Example Agency", "role": "owner", "scopes": ["read", "write"], "maxTokensPerCall": 10, "via": "token" } } -
Ask what it would cost.
POST /searches/estimatestarts nothing and spends no tokens.Ventana de terminal curl -X POST "https://sentirsocial.com/api/v1/searches/estimate" \-H "Authorization: Bearer $SENTIR_KEY" -H "Content-Type: application/json" \-d '{"keyword":"Telcel","focus":"How people feel about the service and its prices","platforms":["x","facebook"],"dateFrom":"2026-11-01","dateTo":"2026-11-07","maxTokens":5}' -
Start the search. With the same fields,
POST /searchesstarts it and answers at once with itsid. This call does spend tokens: it holdsmaxTokensand charges what it reads; the rest comes back.Ventana de terminal curl -X POST "https://sentirsocial.com/api/v1/searches" \-H "Authorization: Bearer $SENTIR_KEY" -H "Content-Type: application/json" \-d '{"keyword":"Telcel","focus":"How people feel about the service and its prices","platforms":["x","facebook"],"dateFrom":"2026-11-01","dateTo":"2026-11-07","maxTokens":5}'{ "data": { "id": "0b6f3b1e-4c1d-4b7a-9a43-1d2f3a4b5c6d", "url": "https://sentirsocial.com/en/search/0b6f3b1e-…", "tokensHeld": 5, "status": "queued" } } -
Wait for it to finish. A search takes minutes. A webhook is best: Sentir tells you with
search.finished. Otherwise askGET /searches/{id}every 30 seconds untilstatusisdone. -
Read the report.
GET /searches/{id}/reportbrings the report as markdown and as an object with its numbers.Ventana de terminal curl "https://sentirsocial.com/api/v1/searches/0b6f3b1e-4c1d-4b7a-9a43-1d2f3a4b5c6d/report" -H "Authorization: Bearer $SENTIR_KEY"
What next
Section titled “What next”- Reference: every route, with examples in curl, JavaScript and Python.
- Webhooks: get told when a search finishes.
- Limits and errors: 60 calls a minute, the error codes and the versions.