Skip to main content
POST
/
api
/
queries
/
list
Get all queries
curl --request POST \
  --url https://api.mentionlab.io/api/queries/list \
  --header 'Content-Type: application/json' \
  --header 'x-project-id: <x-project-id>' \
  --data '
{
  "query": "climate change",
  "languages": [
    "en",
    "fr"
  ],
  "countries": [
    "BE",
    "FR"
  ],
  "tagIds": [
    12,
    34
  ],
  "tagNames": [
    "politics",
    "economy"
  ],
  "sort": [
    {
      "field": "query",
      "direction": "ASC"
    }
  ]
}
'
{
  "page": {
    "totalRecords": 123,
    "limit": 123,
    "currentPage": 123,
    "totalPages": 123,
    "nextPage": 123,
    "prevPage": 123
  },
  "results": [
    {
      "id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
      "project": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
      "tags": [
        1,
        2,
        3
      ],
      "query": "mentionlab",
      "language": "en",
      "country": "US",
      "updatedAt": "2023-08-22T10:00:00.000Z"
    }
  ]
}

Headers

x-project-id
string
required

Project ID to specify the project context

Query Parameters

limit
integer
default:50
Required range: 1 <= x <= 500
page
integer
default:1
Required range: x >= 1

Body

application/json
query
string

Free-text search filter applied to the query text. Performs a case-insensitive partial match against the query name.

Example:

"climate change"

languages
enum<string>[]

Filter queries by language. Accepts one or more supported language codes; only queries matching any of the provided codes are returned.

Available options:
en,
es,
fr,
pt,
de,
it,
tr,
nl,
pl,
sq,
ar,
hy,
az,
ba,
eu,
be,
bn,
bho,
bs,
bg,
yue,
ca,
zh-cn,
hr,
cs,
da,
et,
fo,
fi,
gl,
ka,
el,
gu,
hi,
hu,
id,
ga,
ja,
jv,
kn,
ks,
kk,
kok,
ko,
ky,
lv,
lt,
ru,
mk,
mai,
ms,
mt,
cmn,
mr,
mwr,
nan,
ro-MD,
mn,
cnr,
ne,
no,
or,
ps,
fa,
pa,
raj,
ro,
sa,
sat,
sr,
sd,
si,
sk,
sl,
sv,
uk,
ur,
uz,
vi,
cy,
wuu,
th
Example:
["en", "fr"]
countries
enum<string>[]

Filter queries by country. Accepts one or more supported country codes; only queries matching any of the provided codes are returned.

Available options:
AD,
AE,
AF,
AG,
AL,
AM,
AO,
AR,
AT,
AU,
AZ,
BA,
BB,
BD,
BE,
BF,
BG,
BH,
BI,
BJ,
BN,
BO,
BR,
BS,
BT,
BW,
BZ,
CA,
CD,
CF,
CG,
CH,
CI,
CL,
CN,
CM,
CO,
CR,
CV,
CY,
CZ,
DE,
DJ,
DK,
DM,
DO,
DZ,
EC,
EE,
EG,
ER,
ES,
ET,
FI,
FJ,
FM,
FR,
GA,
GB,
GD,
GE,
GH,
GM,
GN,
GQ,
GR,
GT,
GW,
GY,
HK,
HN,
HR,
HT,
HU,
ID,
IE,
IL,
IN,
IQ,
IS,
IT,
JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KR,
KW,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
LY,
MA,
MC,
MD,
ME,
MG,
MH,
MK,
ML,
MM,
MN,
MR,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NE,
NG,
NI,
NL,
NO,
NP,
NR,
NZ,
OM,
PA,
PE,
PG,
PH,
PK,
PL,
PS,
PT,
PW,
PY,
QA,
RO,
RS,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SI,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
SV,
SZ,
TD,
TG,
TH,
TJ,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
US,
UY,
UZ,
VA,
VN,
VU,
WS,
YE,
ZA,
ZM,
ZW
Example:
["BE", "FR"]
tagIds
number[]

Filter queries by associated tag identifiers. Returns queries linked to any of the provided tag IDs.

Example:
[12, 34]
tagNames
string[]

Filter queries by associated tag names. Performs a case-insensitive match and returns queries linked to any of the provided tag names.

Example:
["politics", "economy"]
sort
object[]

Sorting options for the result set. Each entry specifies a field and direction. Sortable fields are "query" and "updatedAt". Defaults to sorting by query ascending.

Example:
[{ "field": "query", "direction": "ASC" }]

Response

page
object
required
results
object[]