API Description

Keyword groups

Creating a group of keywords

The method allows to add a group for project keywords.

Parameters

NameRequiredDescription
nameYesName of the project keyword group to be added
site_idYesID of the project to which a keyword group will be added

Request format

POST https://api4.seranking.com/keyword-groups
{“name”: “groupname”,”site_id”: 1}

Result

If successful, the server returns the 201 HTTP code and an array containing the ID of the added project keyword group.

NameRequiredDescription
group_idYesID of the added project keyword group

Response example

{
    “group_id”: 123456
}

Errors

HTTP code Error message
404Empty name
404Empty site_id

Moving keywords to another group

The method allows to transfer project keywords from one group to another.

Parameters

NameRequiredDescription
keywords_idsYesArray of the IDs of keywords to be transferred

Request format

POST /keyword-groups/{group_id}/keywords
{“keywords_ids”: [1,2,3,4,5]}

Result

If successful, the server returns the 204 HTTP code.

Errors

HTTP code Error message
404Group not found

Renaming a keyword group

The method allows to change the name of a project keyword group.

Parameters

NameRequiredDescription
nameYesNew keyword group name

Request format

PUT /keyword-groups/{group_id}
{“name”: “new name”}

Result

If successful, the server returns the 204 HTTP code.

Errors

HTTP code Error message
404Empty name
404Group not found

Deleting a keyword group

The method allows to delete a project keyword group.

Request format

DELETE /keyword-groups/{group_id}

Result

If successful, the server returns the 204 HTTP code.

Errors

HTTP code Error message
404Group not found

Getting a list of keyword groups

The method allows to get a list of of keyword groups for a specified project.

Request format

GET /keyword-groups/{site_id}

Result

If successful, the server returns an array of keyword groups for the specified project.

NameRequiredDescription
idYesProject keyword group ID
nameYesProject keyword group name
creation_dateYesDate of creation of a project keyword group

Response example

[
    {
        “id”: “123”,
        “name”: “NewKeyGroup”,
        “creation_date”: “2018-08-27”
    },
    {
        “id”: “456”,
        “name”: “NewKeyGroup1”,
        “creation_date”: “2018-08-27”
    },
    {
        “id”: “789”,
        “name”: “NewKeyGroup2”,
        “creation_date”: “2018-08-27”
    }
]

Errors

HTTP code Error message
400No keywords ids in request
404Group not found