Skip to content

API reference

Keywords

Keywords endpoints of the SemanticsOn REST API.

List keywords

GET/projects/{projectId}/keywords

volume, cpc and competition are only set when they came from a connected data provider (metricSource: provider) or your own import (metricSource: user_import); otherwise they are null. aiCompetitionEstimate is a qualitative AI judgement, not a measured metric.

Path parameters

  • projectIdstringrequired

Query parameters

  • limitintegeroptional

    Items per page, 1–100.

    1–100 · default 25

  • cursorstringoptional

    Pass nextCursor from the previous page to get the next one.

    at most 200 characters

  • clusterIdstringoptional

    Only keywords in this cluster (none for unclustered)

  • intentstringoptional
  • searchstringoptional

    at most 200 characters

curl https://semanticson.com/api/v1/projects/PROJECT_ID/keywords \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A list object: { "object": "list", "data": [ … ], "hasMore": false, "nextCursor": null }. See pagination.

Errors use the standard error object.

Add or update keywords (batch)

POST/projects/{projectId}/keywords

Adds up to 500 keywords at once. Phrases are stored lower-case with collapsed whitespace; a phrase that already exists in the project is updated with the fields you send (created / updated count both). You may include your own volume, cpc and competition — they are stored with metricSource: user_import (sending all three as null clears them). volume, cpc and competition are only set when they came from a connected data provider (metricSource: provider) or your own import (metricSource: user_import); otherwise they are null. aiCompetitionEstimate is a qualitative AI judgement, not a measured metric.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • projectIdstringrequired

Request body

  • keywordsarray of objectsrequired

    1–500 items

  • keywords[].phrasestringrequired

    1–200 characters

  • keywords[].intentstringoptional

    One of: , informational, commercial, transactional, navigational

  • keywords[].clusterIdstring or nulloptional

    Cluster in the same project, or null

    1–64 characters

  • keywords[].mappedUrlstring or nulloptional

    URL that targets this keyword

    at most 500 characters

  • keywords[].notesstringoptional

    at most 1,000 characters

  • keywords[].volumeinteger or nulloptional

    Monthly search volume from your own data

    0–1,000,000,000

  • keywords[].cpcnumber or nulloptional

    Cost per click from your own data

    0–100,000

  • keywords[].competitionnumber or nulloptional

    Competition value from your own data (any 0–100 scale, e.g. 0.42 or 42)

    0–100

curl -X POST https://semanticson.com/api/v1/projects/PROJECT_ID/keywords \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "keywords": [
    {
      "phrase": "espresso grind size",
      "intent": "informational",
      "clusterId": "cm1cluster…"
    },
    {
      "phrase": "best espresso grinder",
      "intent": "commercial",
      "volume": 5400,
      "cpc": 1.35,
      "competition": 0.62
    }
  ]
}'

Response · 201 Created

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Get a keyword

GET/keywords/{keywordId}

volume, cpc and competition are only set when they came from a connected data provider (metricSource: provider) or your own import (metricSource: user_import); otherwise they are null. aiCompetitionEstimate is a qualitative AI judgement, not a measured metric.

Path parameters

  • keywordIdstringrequired

    The keyword id

    1–64 characters

curl https://semanticson.com/api/v1/keywords/KEYWORD_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Update a keyword

PATCH/keywords/{keywordId}

Send only the fields to change. Sending any of volume, cpc, competition replaces all three with your own values (missing ones become null) and sets metricSource: user_import; sending all three as null clears the metrics. Renaming to a phrase that already exists in the project returns 409.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • keywordIdstringrequired

    The keyword id

    1–64 characters

Request body

  • phrasestringoptional

    1–200 characters

  • intentstringoptional

    One of: , informational, commercial, transactional, navigational

  • clusterIdstring or nulloptional

    Cluster in the same project, or null

    1–64 characters

  • mappedUrlstring or nulloptional

    URL that targets this keyword

    at most 500 characters

  • notesstringoptional

    at most 1,000 characters

  • volumeinteger or nulloptional

    Monthly search volume from your own data

    0–1,000,000,000

  • cpcnumber or nulloptional

    Cost per click from your own data

    0–100,000

  • competitionnumber or nulloptional

    Competition value from your own data (any 0–100 scale, e.g. 0.42 or 42)

    0–100

curl -X PATCH https://semanticson.com/api/v1/keywords/KEYWORD_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": "commercial",
  "clusterId": "cm1cluster…",
  "mappedUrl": "https://example.com/grinders",
  "volume": 5400
}'

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Delete a keyword

DELETE/keywords/{keywordId}

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • keywordIdstringrequired

    The keyword id

    1–64 characters

curl -X DELETE https://semanticson.com/api/v1/keywords/KEYWORD_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 204 No Content

Success returns an empty body (204) or a small confirmation object.

Errors use the standard error object.

Delete keywords (batch)

POST/projects/{projectId}/keywords/delete

Deletes up to 1,000 keywords of the project by id. Ids that are not in the project are ignored; deleted is the number actually removed.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • projectIdstringrequired

Request body

  • idsarray of stringsrequired

    1–1,000 items

curl -X POST https://semanticson.com/api/v1/projects/PROJECT_ID/keywords/delete \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "cm1kw1…",
    "cm1kw2…"
  ]
}'

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.