v1

Add keywords to a Niche's Master Keyword List

Changed on

Adds your own keywords to a Niche's Master Keyword List (MKL), the same way the web app does. Every submitted keyword a phrase exclusion does not block is reported in exactly one of these originBreakdown groups:

  • alreadyInMkl — already in the MKL; left untouched.
  • takenFromOutliers / takenFromResidue — moved into the MKL from the Outliers or Residue list. Free.
  • addedManually — new to the Niche. Ranked against the Niche's Competitors; relevancy can be 0.

Two groups report keywords that match one of the Niche's keyword exclusions:

  • takenFromExcluded — matched an exact exclusion. The exclusion is removed, so the keyword shows again; it is also listed in the group above it landed in.
  • blockedByPhraseExclusion — matched a phrase exclusion. The rule is left in place and the keyword is not added; it appears in no other group, and matchedPhrase names the rule to remove first.

Cost. While the Niche is fresh (dived within the last 24 hours, or a Dive is already running) the add is free and the keywords are readable from GET /v1/niches/{nicheId}/keywords at once. Once it is stale, adding any new keyword re-dives the Niche with its current Competitors and consumes one Dive token per Competitor, like a same_competitors re-dive. The response then carries refresh.diveId; poll GET /v1/niches/dives/{diveId} until success, after which the keywords are in the MKL.

Send dryRun: true first to see tokensUsed without saving or paying anything, then pass that figure as maxTokensUsed on the real call so it can never cost more than the dry run said. A dry run runs every check the real call does except the 422, which only the re-dive itself can discover. Undo an add with POST /v1/niches/{nicheId}/keywords/remove.

Rate limited to 2 requests per minute per Niche, dry runs included.

post/v1/niches/{nicheId}/keywords

Request

  • Base URL
    https://api.datadive.tools
  • URL
    https://api.datadive.tools/v1/niches/{nicheId}/keywords
  • Auth
    API key in header x-api-key

Path parameters

nicheIdstring required

The unique identifier of the Niche

Request body

keywordsstring[] required

Keywords to add to the Niche's Master Keyword List, 100 at most and 255 characters each. They are lower-cased and trimmed and must be unique after that; blank entries are ignored.

dryRunboolean

When true, returns the same response a real call would — including tokensUsed — without saving anything or consuming Dive tokens. Counts towards the rate limit.

maxTokensUsednumber

The most Dive tokens this call may consume. When adding the keywords would re-dive a stale Niche for more than this, the call fails with error: "MAX_TOKENS_EXCEEDED" and nothing is saved or charged. Pass the tokensUsed of a dry run to make sure the real call never costs more than you confirmed, or 0 to never pay for a re-dive. No limit when omitted.

Example request

{
  "keywords": [
    "paint by numbers for adults",
    "diamond painting kits"
  ]
}

Response

messagestring

Example response

{
  "data": {
    "originBreakdown": {
      "alreadyInMkl": [
        "diamond painting kits"
      ],
      "takenFromOutliers": [],
      "takenFromResidue": [],
      "addedManually": [
        "paint by numbers for adults"
      ],
      "takenFromExcluded": [
        "diamond painting kits"
      ],
      "blockedByPhraseExclusion": [
        {
          "keyword": "cheap paint by numbers",
          "matchedPhrase": "cheap"
        }
      ]
    },
    "refresh": {
      "diveId": "b3e1f2c4-7e6a-4d2a-9f1e-123456789abc",
      "estimatedCompletionDate": "2026-08-01T00:00:00Z"
    }
  }
}

Changes

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      endpoint added