Skip to main content
POST
/
v1
/
prompts
/
answers
JavaScript
import Profound from 'profoundai';

const client = new Profound({
  apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
});

const response = await client.prompts.answers({
  category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  end_date: '2019-12-27T18:11:19.117Z',
  start_date: '2019-12-27T18:11:19.117Z',
});

console.log(response.data);
{
  "info": {},
  "data": [
    {
      "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_at": "2023-11-07T05:31:56Z",
      "prompt": "<string>",
      "prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "mentions": [
        "<string>"
      ],
      "prompt_type": "<string>",
      "response": "<string>",
      "citations": [
        "<string>"
      ],
      "themes": [
        "<string>"
      ],
      "sentiment_themes": [
        {
          "type": "<string>",
          "name": "<string>"
        }
      ],
      "search_queries": [
        "<string>"
      ],
      "topic": "<string>",
      "region": "<string>",
      "model": "<string>",
      "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "asset": "<string>",
      "tags": [
        "<string>"
      ],
      "persona": "<string>"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Body

application/json

Body for the answers endpoint.

category_id
string<uuid>
required
start_date
string<date-time>
required
end_date
string<date-time>
required
pagination
Pagination · object

Pagination parameters for the results. Default is 10,000 rows with no offset.

filters
(RegionIdFilter · object | ModelIdFilter · object | TagIdFilter · object | PromptTypeFilter · object | PromptFilter · object | PersonaIdFilter · object)[]

List of filters to apply to the answers report.

include
EnabledFieldsResponse · object

Response

Successful Response

Response for the answers endpoint.

info
Info · object
required
data
AnswersRawData · object[]
required