User needs API
The purpose of this article is to describe API endpoints for user needs tagging of provided articles.
The service is a single API endpoint that takes the text of an article and returns its User Needs profile – the mix of reader needs the piece serves, expressed as scores, together with a short explanation of how the result was reached. It accepts one text at a time or several in a single batch.
|
Your credentials
Please treat the API key as a secret and keep it server-side. It should never appear in browser code or in a public repository. Let us know if it needs to be rotated at any point. |
POST https://api.smartocto.com/api/integrations/v2/<brandId>/ai/untagger |
Replace <brandId> in the path with the value from the table above.
The body contains a single batch array. Each entry has one field, text, which you populate with the article content:
{
|
Send the article body as plain text, without HTML markup. The more complete the text, the more reliable the result – a headline and a lead paragraph alone give the model very little to work with.
|
Usage limits – please observe these
If you need to process a larger archive in one go, please get in touch beforehand so we can plan it together rather than have the throughput limited unexpectedly. |
Taking a single article as input, in this case a fictional report for illustration:
https://www.example-news.org/world/harbour-city-reopens-rail-link/a-48217390
{
|
{
|
Every response contains the same eight sub-needs, grouped into four categories. These are the exact JSON field names to read:
| JSON field | User need | What the reader wants |
|---|---|---|
fact_driven – knowing what happened |
||
| update_me | Update me | To know what just happened |
| keep_me_engaged | Keep me engaged | To follow a story they are already invested in |
context_driven – understanding it |
||
| educate_me | Educate me | To have the background explained from the ground up |
| give_me_perspective | Give me perspective | To understand what it means and why it matters |
emotion_driven – feeling something |
||
| divert_me | Divert me | To be entertained or taken out of the everyday |
| inspire_me | Inspire me | To be moved, uplifted or given hope |
action_driven – doing something with it |
||
| connect_me | Connect me | To feel part of a community or a wider conversation |
| help_me | Help me | To get practical advice they can act on |
The table above follows the conceptual order of the model. In the JSON itself the keys are serialised alphabetically, which means score can appear between the two sub-needs rather than before them – as it does in fact_driven above. Please read the values by key name and never by position.
The output has two levels, and the distinction between them matters:
- The four
scorevalues – one per category – describe the overall mix of the article and add up to 100. In the example above: fact 46, context 41, emotion 8, action 5. - Within each category, the two sub-needs are a split of that category alone, and also add up to 100. They do not describe the article as a whole.
|
The one thing worth internalising A high sub-need percentage inside a low-scoring category is still small in absolute terms. In the example, |
The explanation field is free text and is meant for humans reviewing the output, not for parsing. Its wording and length vary between requests, so please do not build logic on it. Where the explanation quotes figures of its own, treat them as part of the model's narrative reasoning – the authoritative values are always the numeric fields.
There are two levels of status in the response: one per item in the response array and one for the request as a whole. Please check the per-item status rather than only the outer one, since an individual text can fail while the rest of the batch succeeds.
The request_id identifies the call on our side. If a result looks wrong or a request fails, sending us that value along with your description lets us trace exactly what happened.
The endpoint is available in our API explorer, which is the quickest way to get a feel for the output before integrating. Authorise with your API key and you can post texts directly from the browser:
https://apiexplorer.smartocto.com/#/ai/post__brandId__ai_untagger
We would suggest starting with a handful of articles whose User Needs profile your editors would recognise intuitively, and comparing the output against their judgement. It is the fastest way to build confidence in the scores before you run them at volume.