GET
/api/v1/google-search-console/zoektermen Opmerkingen
-
Authenticeer met je API-sleutel in de header
Authorization: Bearer apib_live_JOUW_SLEUTEL. - Het antwoord is gepagineerd: herhaal de aanvraag met
?cursor=<next_cursor>totnext_cursornullis. - Deze tabel ondersteunt geen incrementeel ophalen: haal bij elke run de volledige tabel op.
Queryparameters
| Parameter | Omschrijving |
|---|---|
connection | Beperk tot één gekoppeld account (UUID uit connections). |
limit | Aantal rijen per pagina, 1 t/m 1000 (standaard 100). |
cursor | De waarde van next_cursor uit het vorige antwoord (24 uur geldig). |
Filteren kan op elk veld hieronder: schrijf veld=waarde (gelijk aan) of veld[operator]=waarde,
bijvoorbeeld id[ne]=waarde. De operatoren die per veld beschikbaar zijn staan in de
OpenAPI-specificatie.
Velden
| Veld | Type | Omschrijving |
|---|---|---|
connection_id | uuid | Account (connection) |
connection_label | text | Accountnaam |
id | uuid | ID |
synced_at | timestamptz | Laatst gesynchroniseerd |
datum | date | Datum |
zoekterm | text | Zoekterm |
clicks | integer | Klikken |
impressions | integer | Vertoningen |
ctr | numeric | CTR |
position | numeric | Gem. positie |
Importeren in je tools
Aanvraag
GET https://app.apiboard.nl/api/v1/google-search-console/zoektermen HTTP/1.1
Host: app.apiboard.nl
Authorization: Bearer apib_live_JOUW_SLEUTEL
# Let op: gepagineerd. Herhaal met ?cursor=<next_cursor> tot next_cursor null is.
# Deze tabel ondersteunt geen incrementeel ophalen: haal bij elke run de volledige tabel op. curl -H "Authorization: Bearer apib_live_JOUW_SLEUTEL" \
"https://app.apiboard.nl/api/v1/google-search-console/zoektermen"
# Let op: gepagineerd. Herhaal met ?cursor=<next_cursor> tot next_cursor null is.
# Deze tabel ondersteunt geen incrementeel ophalen: haal bij elke run de volledige tabel op. import json
import os
import requests
TOKEN = "apib_live_JOUW_SLEUTEL"
URL = "https://app.apiboard.nl/api/v1/google-search-console/zoektermen"
STAAT_BESTAND = "google-search-console_zoektermen_staat.json" # bewaart rijen + watermark tussen runs
staat = {"watermark": None, "rijen": {}}
if os.path.exists(STAAT_BESTAND):
with open(STAAT_BESTAND) as f:
staat = json.load(f)
basis_params = {}
# Alles ophalen: elke run haalt de volledige tabel opnieuw op.
staat["rijen"] = {}
cursor = None
onvolledig = set()
while True:
params = dict(basis_params)
if cursor:
params["cursor"] = cursor
resp = requests.get(URL, params=params, headers={"Authorization": f"Bearer {TOKEN}"})
resp.raise_for_status()
body = resp.json()
for koppeling in body["connections"]:
if not koppeling["backfill_complete"]:
onvolledig.add(koppeling["label"])
for rij in body["data"]:
staat["rijen"][rij["id"]] = rij # dedupliceren op id, laatste versie wint
cursor = body["next_cursor"]
if cursor is None:
staat["watermark"] = body["sync_watermark"]
break
# Rijen die bij de bron verwijderd zijn, uit de lokale set halen.
staat["rijen"] = {i: r for i, r in staat["rijen"].items() if not r.get("bron_verwijderd_op")}
with open(STAAT_BESTAND, "w") as f:
json.dump(staat, f)
for label in sorted(onvolledig):
print(f"Waarschuwing: {label} is nog niet volledig gesynchroniseerd; de data kan onvolledig zijn.")
print(f"{len(staat['rijen'])} rijen.") let
Basis = "https://app.apiboard.nl",
Pad = "/api/v1/google-search-console/zoektermen",
Token = "apib_live_JOUW_SLEUTEL",
Filters = [],
HaalPaginaOp = (cursor as nullable text) =>
Json.Document(Web.Contents(Basis, [
RelativePath = Pad,
Query = if cursor = null then Filters else Record.AddField(Filters, "cursor", cursor),
Headers = [Authorization = "Bearer " & Token]
])),
// Volg next_cursor tot die null is; de pagina met next_cursor = null telt ook mee.
Paginas = List.Generate(
() => HaalPaginaOp(null),
each _ <> null,
each if [next_cursor] = null then null else HaalPaginaOp([next_cursor]),
each [data]
),
AlleRijen = List.Combine(Paginas),
Tabel = if List.IsEmpty(AlleRijen)
then #table({"id", "synced_at"}, {})
else Table.FromRecords(AlleRijen, null, MissingField.UseNull),
// Dedupliceer op id (een rij die tijdens de refresh wijzigt, kan twee keer terugkomen):
// eerst de nieuwste versie bovenaan, dan houdt Distinct die. Verwijder daarna rijen
// die bij de bron verwijderd zijn.
NieuwsteEerst = Table.Buffer(Table.Sort(Tabel, {{"synced_at", Order.Descending}})),
ZonderDubbel = Table.Distinct(NieuwsteEerst, {"id"}),
ZonderVerwijderd = Table.SelectRows(ZonderDubbel, each Record.FieldOrDefault(_, "bron_verwijderd_op", null) = null)
in
ZonderVerwijderd
// Let op: het token staat hierboven in de M-query, en dus in het .pbix-bestand zelf -
// wees voorzichtig met het delen van dat bestand.
// Let op: staat een administratie in "connections" op backfill_complete = false, dan is
// die nog niet volledig gesynchroniseerd - de data hierboven kan dan onvolledig zijn. Voorbeeldantwoord
{
"connections": [
{
"id": "43d9a41a-3529-4be2-b891-b23781997895",
"label": "Voorbeeld B.V.",
"backfill_complete": true
}
],
"data": [
{
"connection_id": "43d9a41a-3529-4be2-b891-b23781997895",
"connection_label": "Voorbeeld B.V.",
"id": "314feb6e-f809-4f72-b6d8-da1b68d15ab5",
"synced_at": "2026-10-07T02:58:12.304211+00:00",
"datum": "2026-01-15",
"zoekterm": "voorbeeld zoekterm",
"clicks": 42,
"impressions": 42,
"ctr": 125.5,
"position": 125.5
}
],
"next_cursor": null,
"sync_watermark": "2026-10-07T03:00:00.000000Z"
} De waarden zijn fictief; de vorm komt overeen met wat de API teruggeeft.
Velden in het antwoord
connections-
De gekoppelde accounts waar dit antwoord over gaat. Elk account heeft een
id, eenlabelenbackfill_complete:truebetekent dat de eerste volledige synchronisatie klaar is,falsedat de data nog onvolledig is. data-
De rijen. Elke rij heeft
connection_idenconnection_label: uit welk account de rij komt. next_cursor- Waarmee je de volgende pagina ophaalt.
nullbetekent dat je bij de laatste pagina bent. sync_watermark-
Tot dit tijdstip is de data compleet. Gebruik het als startpunt (
modified_since) voor de volgende incrementele ophaalronde.