Datarova
Datarova User API

View the keywords in a project, add keywords, or remove them.


List project keywords

GET
https://api.datarova.com
/v0/projects/{projectId}/keywords
Bearer (API key)

Returns project keywords for an owned project using cursor pagination.

Metrics window

The keyword metrics match the project's Keywords tab in the app, so they cover the window the account's plan allows. data.metrics_window names it on every response. four_weeks is the latest four loaded weeks, with the trend measured against the four weeks before them. latest_month is the latest loaded month, with the trend measured against the month before it; plans without weekly data get this window. The fields ending in _l4w and sales_distribution follow the window, and keep their names so a client works on every plan. dstr always uses the latest four loaded weeks.

Rate limit: 60 requests per 60 seconds.

Example request:

TerminalCode
curl --request GET \ --url 'https://api.datarova.com/v0/projects/1248/keywords?limit=50' \ --header 'Authorization: Bearer <api_key>'

List project keywords › path Parameters

projectId
​integer · min: 1 · max: 2147483647 · required

List project keywords › query Parameters

limit
​integer · min: 1 · max: 200

Default 50. Maximum 200.

Default: 50
cursor
​string

Opaque cursor returned by the previous page.

List project keywords › Responses

Keywords page.

​object · required

Add project keywords

POST
https://api.datarova.com
/v0/projects/{projectId}/keywords
Bearer (API key)

Adds up to 500 keywords to a marketplace project and returns which were added or already present. Use it to start tracking new keywords, optionally applying the same labels to every new item.

Request rules

Use the marketplace project’s project_id from GET /v0/projects and item-label IDs from GET /v0/item-labels. The project and labels must belong to your account. Project-label IDs cannot be used here. User API access and a credit balance that covers the call's 5 credits are required.

Keywords and limits

  • Send 1 to 500 keywords. Surrounding whitespace is removed and text is lowercased; interior whitespace is preserved. Each normalized keyword must contain 1 to 255 characters. Repeated keywords are processed once, in first-seen order.
  • The submitted count is checked before duplicates are removed. The JSON body must fit within 1 MiB, or 1,048,576 bytes.
  • New keywords must fit within your account’s tracked-keyword allowance and the project’s 2,000-keyword limit.

Optional labels

  • Omit label_ids or send [] to add new keywords without labels. Send [12] for one label or [12,34] for several. Duplicate IDs are ignored; null is invalid.
  • Existing keywords keep their labels, even in a mixed batch or when retrying an older POST. Use PATCH to replace or clear existing labels. Unknown fields and query parameters are rejected.

Results and errors

A 200 response contains data.project_id, data.added_keywords and data.unchanged_keywords. Both lists preserve the order you sent, after trimming and lowercasing. If every keyword already exists, added_keywords is empty.

For example, if garlic press is new and best garlic mincer already exists, the result is:

JSONCode
{"data":{"project_id":1248,"added_keywords":["garlic press"],"unchanged_keywords":["best garlic mincer"]}}

New keywords and their labels are saved together. Invalid labels reject the entire request, even when all keywords already exist. For 400 invalid_label_ids, correct the list; for 400 labels_unavailable, refresh your item-label catalog and remove unavailable IDs.

For 409, reduce the batch or free tracked-keyword capacity; no new keywords were added. After 413, reduce the serialized body before retrying. For 404 project_not_found, choose an accessible marketplace project. A successful addition confirms project membership; ranking results may become available later.

Rate limits and usage

The burst limit is 60 requests per 60 seconds. When enforced, responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. After 429, wait the number of seconds in Retry-After before retrying.

Each successful batch costs 5 credits, including a batch that changes nothing, and is recorded under project_keywords_add. See the shared quota headers and errors for your credit balance. Labels themselves do not consume tracked-item capacity.

Example requests

Replace <api_key> and <project_id>. The keywords and label IDs below are illustrative. Start with a request without labels:

TerminalCode
curl --request POST \ --url 'https://api.datarova.com/v0/projects/<project_id>/keywords' \ --header 'Authorization: Bearer <api_key>' \ --header 'Content-Type: application/json' \ --data '{"keywords":["garlic press","best garlic mincer"]}'

To label every new item, use this body with the same method, URL and headers. Replace 12 and 34 with IDs from your item-label catalog:

JSONCode
{"keywords":["garlic press","best garlic mincer"],"label_ids":[12,34]}

Use [12] for one label. Omit label_ids or send [] for no labels on new items. Existing items keep their current labels in every variant.

Add project keywords › path Parameters

projectId
​integer · min: 1 · max: 2147483647 · required

Add project keywords › Request Body

keywords
​string[] · minItems: 1 · maxItems: 500 · required

Keyword strings. Each value is trimmed and lowercased; normalized values must contain 1 to 255 characters and no NUL character. Normalized duplicates are processed once in first-seen order. The maximum of 500 submitted items applies before deduplication.

label_ids
​integer[]

Optional shared selection of account-owned item-label IDs for new attachments only. Omitted or [] creates unlabeled attachments. IDs are deduplicated; order is irrelevant. Null, foreign, deleted, or project-label-only IDs are invalid, even when all keywords already exist.

Add project keywords › Responses

The normalized batch was processed. Keywords already in the project or added by another request appear in unchanged_keywords.

​object · required

Replace keyword labels

PATCH
https://api.datarova.com
/v0/projects/{projectId}/keywords
Bearer (API key)

Replaces the item labels on existing keywords in one marketplace project and returns which changed or already had that selection. Use it to reorganize items or clear their labels without removing them or changing tracking and history.

Request rules

Use the marketplace project’s project_id from GET /v0/projects and item-label IDs from GET /v0/item-labels. The project and labels must belong to your account. Project-label IDs cannot be used here. User API access and a credit balance that covers the call's 5 credits are required.

  • Send 1 to 1,000 keywords; the limit counts submitted entries before duplicates are removed. Normalized duplicates are processed once, in first-seen order.
  • Supply the complete desired label_ids selection. Labels left out are removed. Use [12] for one label, [12,34] for several, or [] to clear assignments without deleting catalog labels.
  • Omitted or null label selections are invalid. Duplicate label IDs and their order do not change the selection. No other fields or query parameters are accepted.

Keywords are trimmed and lowercased, preserving interior whitespace. Each normalized keyword must contain 1 to 255 characters without NUL. Matching existing keywords follows the same normalization; their stored text is not changed.

The complete JSON body, including labels and whitespace, must fit within 2 MiB, or 2,097,152 bytes.

Results and errors

A 200 response contains data.project_id, the accepted data.label_ids in ascending order, and data.updated_keywords and data.unchanged_keywords. Each normalized submitted identity appears in exactly one list. An identical retry succeeds with every item unchanged. Existing item reads show the saved labels.

The whole batch succeeds or nothing changes. For 404 project_not_found or 404 keyword_not_found, check the project and requested items. For 400 invalid_label_ids, correct the list; for 400 labels_unavailable, refresh your item-label catalog. Reduce the serialized body after 413 request_body_too_large, and correct malformed input before retrying.

The same items in other projects or marketplaces are unaffected. Label replacement does not change tracking, history, or consume tracked-item capacity, so it remains available at that capacity limit.

Rate limits and usage

The burst limit is 60 requests per 60 seconds. When enforced, responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. After 429, wait the number of seconds in Retry-After before retrying.

Each successful batch costs 5 credits, including a batch that changes nothing, and is recorded under project_keywords_update. See the shared quota headers and errors for your credit balance. Labels themselves do not consume tracked-item capacity.

Example requests

Replace <api_key> and <project_id>. The items and label IDs below are illustrative; use IDs from your own item-label catalog and items already in the selected project.

TerminalCode
curl --request PATCH \ --url 'https://api.datarova.com/v0/projects/<project_id>/keywords' \ --header 'Authorization: Bearer <api_key>' \ --header 'Content-Type: application/json' \ --data '{"keywords":["coffee grinder","espresso grinder"],"label_ids":[12,34]}'

To clear labels from the same items, use this body with the same method, URL and headers:

JSONCode
{"keywords":["coffee grinder","espresso grinder"],"label_ids":[]}

Replace keyword labels › path Parameters

projectId
​integer · min: 1 · max: 2147483647 · required

Replace keyword labels › Request Body

keywords
​string[] · minItems: 1 · maxItems: 1000 · required
label_ids
​integer[] · required

Replace keyword labels › Responses

Atomic replacement succeeded; retries return all identities unchanged.

​object · required

Remove project keywords

DELETE
https://api.datarova.com
/v0/projects/{projectId}/keywords
Bearer (API key)

Removes between 1 and 100 keywords from a project.

Request rules

  • Send the keywords in the keywords array.
  • Each keyword is trimmed, converted to lowercase, and deduplicated in its original order.
  • Each normalized keyword must contain between 1 and 255 characters and no NUL character.

Results

Keywords currently in the project are returned in removed_keywords. Missing keywords and repeated removals are successful no-ops returned in unchanged_keywords. Both arrays preserve the normalized request order.

The response is returned only after the required project cleanup completes. If cleanup cannot be completed, the request returns an error rather than reporting a successful removal. If the project is not found for the account, the endpoint returns 404 project_not_found.

Rate limit: 60 requests per 60 seconds. Each successful removal costs 5 credits and is recorded under project_keywords_remove.

Example request:

TerminalCode
curl --request DELETE \ --url https://api.datarova.com/v0/projects/1248/keywords \ --header 'Authorization: Bearer <api_key>' \ --header 'Content-Type: application/json' \ --data '{"keywords":[" Garlic Press ","best garlic mincer"]}'

Remove project keywords › path Parameters

projectId
​integer · min: 1 · max: 2147483647 · required

Remove project keywords › Request Body

keywords
​string[] · minItems: 1 · maxItems: 100 · required

Keyword strings. Each value is trimmed and lowercased; normalized values must contain 1 to 255 characters and no NUL character. Normalized duplicates are processed once in first-seen order.

Remove project keywords › Responses

The normalized batch was processed after the removal workflow completed. Keywords found in the project appear in removed_keywords; missing keywords or keywords removed by another request appear in unchanged_keywords.

​object · required