Skip to main content
POST
/
v1
/
reports
/
citations
JavaScript
import Profound from 'profoundai';

const client = new Profound({
  apiKey: 'My API Key',
});

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

console.log(response.data);
{
  "data": [
    {
      "dimensions": [
        "example.com",
        "/some/path",
        "2023-10-01"
      ],
      "metrics": [
        10,
        0.05
      ]
    }
  ],
  "info": {
    "query": {
      "date_interval": "day",
      "dimensions": [
        "hostname",
        "path",
        "date"
      ],
      "filters": [
        {
          "field": "hostname",
          "operator": "is",
          "value": "example.com"
        }
      ],
      "metrics": [
        "count",
        "share_of_voice"
      ]
    },
    "total_rows": 200
  }
}

Authorizations

X-API-Key
string
header
required

Body

application/json
metrics
enum<string>[]
required
category_id
string<uuid>
required
start_date
string<date-time>
required

Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.

end_date
string<date-time>
required

End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.

date_interval
enum<string>
default:day

Date interval for the report. (only used with date dimension)

Available options:
day,
week,
month,
year
dimensions
enum<string>[]

Dimensions to group the report by.

order_by
object

Custom ordering of the report results.

The order is a record of key-value pairs where:

  • key is the field to order by, which can be a metric or dimension
  • value is the direction of the order, either 'asc' for ascending or 'desc' for descending.

When not specified, the default order is the first metric in the query descending.

Examples:
{ "date": "asc" }
pagination
object

Pagination settings for the report results.

filters
Filters · array

List of filters to apply to the citations report.

  • HostnameFilter
  • PathFilter
  • RegionIdFilter
  • TopicIdFilter
  • ModelIdFilter
  • TagIdFilter
  • UrlFilter
  • RootDomainFilter
  • PromptTypeFilter

Response

Successful Response

info
object
required

Base model for report information.

data
Result · object[]
required