Skip to main content
POST
/
api
/
analytics
/
fan-outs
/
queries
/
{queryId}
/
fan-outs
List of fan-outs for a query (distinct by hash)
curl --request POST \
  --url https://api.mentionlab.io/api/analytics/fan-outs/queries/{queryId}/fan-outs \
  --header 'Content-Type: application/json' \
  --header 'x-project-id: <x-project-id>' \
  --data '
{
  "timeFrom": "2024-01-01T00:00:00.000Z",
  "timeTo": "2024-12-31T23:59:59.999Z",
  "aiModels": [
    "<string>"
  ],
  "tagIds": [
    1,
    2,
    3
  ],
  "tagsJobExecutionIds": [
    10,
    20
  ],
  "tagFilterMethod": "AND",
  "tagsJobExecutionFilterMethod": "AND"
}
'
{
  "page": {
    "totalRecords": 123,
    "limit": 123,
    "currentPage": 123,
    "totalPages": 123,
    "nextPage": 123,
    "prevPage": 123
  },
  "results": [
    {
      "fanOut": "best running shoes for marathon training",
      "occurrenceCount": 12
    }
  ]
}

Headers

x-project-id
string
required

Project ID to specify the project context

Path Parameters

queryId
string
required

Query Parameters

limit
number
Example:

50

page
number
Example:

1

Body

application/json
timeFrom
string<date-time>

Filter from this date (inclusive)

Example:

"2024-01-01T00:00:00.000Z"

timeTo
string<date-time>

Filter until this date (inclusive)

Example:

"2024-12-31T23:59:59.999Z"

aiModels
string[]

Filter by AI models

tagIds
number[]

Filter by tag IDs. Use with tagFilterMethod to specify AND/OR logic.

Example:
[1, 2, 3]
tagsJobExecutionIds
number[]

Filter by job execution tag IDs. Use with tagsJobExecutionFilterMethod to specify AND/OR logic.

Example:
[10, 20]
tagFilterMethod
enum<string>

Tag filter method: AND = query must have ALL tags, OR = query must have at least ONE tag

Available options:
AND,
OR
Example:

"AND"

tagsJobExecutionFilterMethod
enum<string>

Job execution tag filter method: AND = job execution must have ALL tags, OR = job execution must have at least ONE tag

Available options:
AND,
OR
Example:

"AND"

Response

200 - application/json
page
object
required
results
object[]