Sape.ru Xml-Rpc

Our xml-rpc interface is available at http://api.sape.ru/xmlrpc/. Request should be made using port 80, the body of xml-response should be put to POST_DATA. All communication is in UTF-8. Also you can work at https https://api.sape.ru/xmlrpc/.

If you know nothing about XML-RPC we recommend you read about it at www.xmlrpc.com:

  1. The protocol implementation for your favorite programming language.
  2. For those who use PHP we recommend Zend Framework

Display categories Hide categories
Select the role:
Select a category
(int) sape.login( (string) login, (string) token )
Advertiser
Publisher
Authorization and account settings

The authorization in the system. Call it at the beginning of each session. Then transfer all returned cookies upon every following request. The user's id is a result of the function execution. To generate a token for your account please open this page.

Name Type Obligatorily Description
login string Yes Login
token string Yes Token
Type Description
int User's ID
(array) sape.get_user()
Advertiser
Publisher
Authorization and account settings

User information.

Type Description
array User information:
  • login,
  • e-mail,
  • balance,
  • the number of purchased links,
  • the number of purchased links in the OK status,
  • monthly budget,
  • monthly budget with the OK status,
  • expense per day, expense per week,
  • income per day, income per week,
  • partnership program per day, partnership program per week,
  • the result per day, the result per week
(float) sape.get_balance()
Advertiser
Publisher
Balance

The current user's balance including blocked funds.

Type Description
float The current user's balance including blocked funds.
(float) sape.get_balance_real()
Advertiser
Publisher
Balance

The available user's balance.

Type Description
float The available user's balance.
(array) sape.get_balance_locks()
Advertiser
Publisher
Balance

The current balance with blocking details. The result contains information on the balance.

Type Description
array
  • "available" is the availability for all expenses,
  • "total" is overall balance with blockings,
  • "earned" means earnings:
    • "total" means total earnings,
    • Покупка новых ссылок на сайте приостановлена. frwbz"autoTransfer" means whether the expenses of the earnings are allowed or not
  • "bonus" are bonuses
  • "blockedAndBudget" are blocking and budgets,
  • "budget" are budgets:
    • "total" is a budget's total amount,
    • "subsys" are the subsystems' budgets:
      • "Sape" is the Sape-Link system's budget,
      • "ARTICLES" is the Sape-Article system's budget,
      • ...
  • "blocked" are blockings:
    • "total" means that it is all blocked,
    • "promo" is on the promotions,
    • "dox" is the failure of the documents offer,
    • "bonus" is a sponsorship,
    • "out" is the withdrawal request
    • "subsys" are the subsystems' blockings:
      • "Sape" is the Sape-Link system's budget,
      • "WIZARD" are the SeoWizard system's blockings
      • ...
(array) sape.get_bills( (int) year [, (int) month = null [, (int) day = null [, (int) user_id = null ]]] )
Advertiser
Publisher
Input / output of funds

The data on dates of the transfers/receipts of money in each account. The accounts linked to the legal person are displayed there by default. If there is such connection and you need to get a bill for a particular account, set up the user_id parameter. If there is user_id == true, the current user's information is displayed.

Name Type Obligatorily Default value Description
year int Yes - Year of sample
month int No null Month of sample
day int No null Day of sample
user_id int No null User's ID
Type Description
array
  • Bill ID,
  • the document number,
  • creation date,
  • amount,
  • receipt date,
  • transfer date
(array) sape.get_sites ( [ (array)opts ] )
Publisher
Sites

List of user's sites.

Name Type Obligatorily Description
opts array No opts may contain the following parameters:
  • (bool) show_days_to_recheck — display the number of days before the opportunity to run recrawling.,
  • (bool) show_block_display_params — "block_links_control " is the links' block display's parameters
  • (bool) show_traf_pages — display the number of traffic pages,
  • (int) pn = 0,
  • (int) ps = 0
Type Description
array The response's structure:
  • "id" is a site ID,
  • "url" is URL,
  • "cy" is CY,
  • "pr" is the homepage's PR,
  • "category_id" is a category ID,
  • "date_created" is is the registration date,
  • the date of the last change of maximum links for the site,
  • "status" is a status:
    • "NEW" is new,
    • "IND" means that it is crawled,
    • "OK" means that it works,
    • "IND_NOW" is in the crawling process,
    • "FAIL" is a failed moderation,
    • "IND_WAIT" is waiting for crawling,
    • "REIND_NOW" is in the re-crawling process,
    • "REIND_WAIT" is wating for re-crawling.
  • "comment_admin" is a moderator's comment,
  • "domain_level" is a domain level,
  • "flag_auto" is an auto mode flag,
  • "mpp_1, mpp_2, mpp_3" is a maximum number of links at each level,
  • "flag_blocked_in_yandex" is a blocking flag in Yandex,
  • "flag_hide_url" means to hide URL,
  • "links_delimiter " is a links delimiter,
  • "links_css_class " is a links' class,
  • "links_css_class_context" is a contextual links' class,
  • "flag_use_unprintable_words_stop_list, flag_use_adult_words_stop_list, flag_use_ambiguous_words_stop_list " are flags of use for standard lists of censored words,
  • "flag_not_for_sale " is a links' sale suspension flag,
  • "amount_today" is the amount for today,
  • "amount_yesterday" is the amount for yesterday,
  • "amount_total " is the total amount,
  • "in_yaca" is the site's presence in YACA,
  • "in_dmoz" is the site's presence in DMOZ,
  • "nof_yandex" is the number of pages in Yandex,
  • "nof_google" is the number of pages in Google,
  • "days_to_recheck" means the number of days until an opportunity to start re-crawling,
  • "show_only_block" is a flag of the block of displayed links,
  • "nof_traf_pages " is the number of traffic pages,
  • "auto_set_prices " means to automatically set the new prices on pages:
    • 0 means not to set,
    • 1 are averages on the site,
    • 2 are set manually,
    • 3 means averages on the system, multiplied by auto_set_prices_factor.
  • "auto_set_prices_factor " is a multiplier of the new prices for pages (from 0.1 to 3; used when auto_set_prices = 3),
  • "pr_change_auto_set_prices" means to automatically set new prices during the PR change:
    • 0 means not to set,
    • 1 are averages on the site,
    • 2 are set manually,
    • 3 means averages on the system, multiplied by pr_change_prices_factor.
  • "pr_change_prices_factor " is a multiplier of the new prices for pages during the PR change (from 0.1 to 3; used when pr_change_auto_set_prices = 3)
  • "pr_change_auto_set_prices_link" means to automatically change prices for current links during the PR change of pages (0 - do not change, 1 - change),
  • "block_links_control " is the links' block display's parameters
    • "background_color" is the background color,
    • "border_color" is the border color,
    • "header_color" is the heading color,
    • "text_color" is the text color,
    • "url_color" is the URL color,
    • "sign_color" is the signature color,
    • "header_size" is the heading size,
    • "text_size" is the text size,
    • "url_size" is the URL size,
    • "sign_size" is the signature size,
    • "border_width" is the border width,
    • "border_use_radius" means to round URLs off,
    • "text_align" is the text alignment in the block,
    • "text_sign" is the signature text,
    • "block_orientation" is the text's orientation in the block (0 is vertical, 1 is horizontal),
    • "show_header" is the heading's display flag,
    • "show_url " is the URL's display flag,
    • "block_width_custom" isthe block's width,
    • "css_class_prefix" is the prefix of the css classes' names,
    • "block_no_css" (0 means to automatically generate and introduce it into the page code, 1 means to use your stylesheet),
    • "block_width" is the width of the links' block,
    • "block_width_unit" is the width measuring type (px or %).
(array) sape.get_site_regions( (int) site_id )
Publisher
Sites

List of site's regions.

Name Type Obligatorily Description
site_id int Yes Site's ID
Type Description
array List of site's regions.
(array) sape.get_site_page( (int) site_id, (int) page_id )
Publisher
Sites
Pages

Properties of the site's page.

Name Type Obligatorily Description
site_id int Yes Site's ID
page_id int Yes Page's ID
Type Description
Array Properties of the site's page.
(array) sape.get_site_pages( (int) site_id [, (array) opts ] )
Publisher
Sites
Pages

Returns a list of site's pages.

Name Type Obligatorily Description
site_id int Yes Site's ID
opts array No opts may contain the following parameters:
  • (int)level,
  • (int)pr,
  • (int)only_ext_links,
  • (int)pn = 0,
  • (int)ps = 0.
Type Description
array List of site's pages.
The response's structure:
  • Page's ID
  • status and contextual status:
    • "new" is a new page,
    • "OK" means that page is active,
    • "DEL" means that page is deleted,
    • "NO_CODE" means code is not found.
  • Page URL,
  • PR,
  • page level,
  • the outbound link number,
  • price,
  • the links' number,
  • Sape Rank.
(int) sape.site_pages_activate( (int) site_id [, (int|array) page_ids [, (bool) flag_context = false ]] )
Publisher
Sites
Pages

Activation of site's pages.

Name Type Obligatorily Default value Description
site_id int Yes - Site's ID
page_ids int|array No - Pages ID
flag_context bool No false If it is "true", the context page will be activated. Otherwise,the conventional page will be activated.
Type Description
int The number of activated pages.
(int) sape.site_pages_exclude( (int) site_id, (int|array) page_ids [, (bool) flag_context = false ] )
Publisher
Sites
Pages

Exclusion of site's pages.

Name Type Obligatorily Default value Description
site_id int Yes - Site's ID
page_ids int|array Yes - Pages ID
flag_context bool No false If it is "true", the context page will be activated. Otherwise,the conventional page will be activated.
Type Description
int The number of excluded pages.
(int) sape.site_pages_purge( (int) site_id, (int|array) page_ids [, (bool) flag_context = false ] )
Publisher
Sites
Pages

Removing the site's pages.

Name Type Obligatorily Default value Description
site_id int Yes - Site's ID
page_ids int|array Yes - Pages ID
flag_context bool No false If it is "true", the context page will be activated. Otherwise,the conventional page will be activated.
Type Description
int The number of removed pages.
(array) sape.get_sites_pages_count( [ (string) status ] )
Publisher
Sites
Pages

The number of pages on sites.

Name Type Obligatorily Description
status string No Link Status. When transfered only the links with the specified status are displayed in the results.
Possible values:
  • "WAIT_WM" means that link is waiting for the publisher's confirmation,
  • "WAIT_SEO" means that link is waiting for the advertiser's confirmation,
  • "OK" means that link is placed,
  • "ERROR" means that link is not found,
  • "SLEEP" means that link is locked due to the advertiser's lack of money.
Type Description
array The number of pages on sites.
(int) sape.get_site_pages_count( (int) site_id [, (string) status ] )
Publisher
Sites
Pages

The number of pages on a site.

Name Type Obligatorily Description
site_id int Yes Site's ID
status string No Link Status. When transfered only the links with the specified status are displayed in the results.
Possible values:
  • "WAIT_WM" means that link is waiting for the publisher's confirmation,
  • "WAIT_SEO" means that link is waiting for the advertiser's confirmation,
  • "OK" means that link is placed,
  • "ERROR" means that link is not found,
  • "SLEEP" means that link is locked due to the advertiser's lack of money.
Type Description
int The number of pages on a site.
(array) sape.get_sites_pages_context_count( [ (string) status ] )
Publisher
Sites
Pages
Contextual links

The number of contextual pages on sites.

Name Type Obligatorily Description
status string No Link Status. When transfered only the links with the specified status are displayed in the results.
Possible values:
  • "WAIT_WM" means that link is waiting for the publisher's confirmation,
  • "WAIT_SEO" means that link is waiting for the advertiser's confirmation,
  • "OK" means that link is placed,
  • "ERROR" means that link is not found,
  • "SLEEP" means that link is locked due to the advertiser's lack of money.
Type Description
array The number of contextual pages on sites.
(int) sape.get_site_pages_context_count( (int) site_id [, (string) status ] )
Publisher
Sites
Pages
Contextual links

The number of contextual pages on a site.

Name Type Obligatorily Description
site_id int Yes Site's ID
status string No Link Status. When transfered only the links with the specified status are displayed in the results.
Possible values:
  • "WAIT_WM" means that link is waiting for the publisher's confirmation,
  • "WAIT_SEO" means that link is waiting for the advertiser's confirmation,
  • "OK" means that link is placed,
  • "ERROR" means that link is not found,
  • "SLEEP" means that link is locked due to the advertiser's lack of money.
Type Description
int The number of contextual pages on a site.
(array) sape.get_site_money_stats( (int) site_id [, (int) year [, (int) month [, (int) day ]]] )
Publisher
Financial statistics
Sites

Income statistics of the site.

Name Type Obligatorily Description
site_id int Yes Site's ID
year int No Year of sample
month int No Month of sample
day int No Day of sample
Type Description
array Income statistics of the site.
(array) sape.get_projects( [ (bool|hash) show_deleted [, (int) pn = 0 [, (int) ps = 10000 ]]] )
Advertiser
Projects

List of user's projects.

Name Type Obligatorily Default value Description
show_deleted bool|hash No - Display removed.
pn int No 0 The page number (for pagination).
ps int No 10000 The number of elements to display on the page (for pagination).
Type Description
array Возможна передача параметров в виде хеша:
  • (bool)show_deleted - display removed,
  • (bool)show_count - display the URL and the link in the OK status number.
Возвращает список, каждый элемент содержит:
  • Project ID,
  • title,
  • Automatically withdraw the links from the sites which are not in Yandex
  • do not extend the limit to the outbound links number of the favourite sites,
  • automatically remove the links for homepages with the outbound links number exceeded the specified value,
  • automatically remove the links for the second page level with the outbound links number exceeded the specified value,
  • automatically remove the links for the third page level with the outbound links number exceeded the specified value,
  • automatically remove the links with the ERROR status for several days,
  • spent today,
  • spent yesterday,
  • total spent,
  • creation date,
  • the project URL number,
  • the number of the link in the OK status.
(array) sape.get_project( (int) project_id )
Advertiser
Projects

User's project parameters.

Name Type Obligatorily Description
project_id int Yes Project ID
Type Description
array User's project parameters:
  • Project ID,
  • title,
  • Automatically withdraw the links from the sites which are not in Yandex
  • do not extend the limit to the outbound links number of the favourite sites,
  • automatically remove the links for homepages with the outbound links number exceeded the specified value,
  • automatically remove the links for the second page level with the outbound links number exceeded the specified value,
  • automatically remove the links for the third page level with the outbound links number exceeded the specified value,
  • automatically remove the links with the ERROR status for several days,
  • spent today,
  • spent yesterday,
  • total spent,
  • creation date,
  • removal date (only for remote projects),
  • the project URL number,
  • the number of the link in the OK status.
(bool) sape.project_update( (int) project_id, (hash) project_params )
Advertiser
Projects

Change of the site's settings in accordance with the passed parameters.

Name Type Obligatorily Description
project_id int Yes Project ID
project_params hash Yes Possible parameters:
  • "name" is the project's title,
  • "flag_cancel_links_yabl" means to automatically remove links from sites that are not in Yandex SE,
  • "flag_ext_links_max_no_wl" means to not extend the limit to the outbound links number of the favourite sites,
  • "nof_ext_links_max_l1" means to automatically remove the links for homepages with the outbound links number exceeded the specified value,
  • "nof_ext_links_max_l2" means to automatically remove the links for the second page level with the outbound links number exceeded the specified value,
  • "nof_ext_links_max_l3" means to automatically remove the links for the third page level with the outbound links number exceeded the specified value,
  • "nof_days_to_keep_errors" means to automatically remove the links with the ERROR status for several days,
Type Description
bool Change of the site's settings in accordance with the passed parameters.
(hash) sape.get_url( (int) url_id [, (bool) show_deleted ] )
Advertiser
URLs

URL information (including removed).

Name Type Obligatorily Default value Description
url_id int Yes - URL ID,
show_deleted bool No false If there is "show_deleted == true", then the result contains:
  • URL ID,
  • Project ID,
  • URL,
  • title,
  • moderation mode,
  • combined mode,
  • creation date,
  • amount for today,
  • amount for yesterday,
  • total amount,
  • number of total links,
  • automode launch period,
  • keyword,
  • yandex position,
  • change in yandex position,
  • date of the change in yandex position,
  • mail position,
  • change in mail position,
  • date of the change in mail position.
Type Description
array URL information (including removed).
(array) sape.get_urls( (int) project_id [, (bool) show_deleted [, (array) opts ]] )
Advertiser
URLs

List of project's URLs (including removed).

Name Type Obligatorily Default value Description
project_id int Yes - Project ID
show_deleted bool No false If there is "show_deleted == true". then each element contains:
  • URL ID,
  • Project ID,
  • URL,
  • title,
  • moderation mode,
  • combined mode,
  • creation date,
  • amount for today,
  • amount for yesterday,
  • total amount,
  • number of total links,
  • automode launch period,
  • keyword,
  • yandex position,
  • change in position,
  • date of position change.
opts array No - May contain the following parameters:
  • (boolean)tiny — output a brief information,
  • (int)pn = 0 — the page number (for pagination).
  • (int)ps = 0 — the number of elements to display on the page (for pagination)
Type Description
array List of project's URLs (including removed).
(array) sape.get_project_sites( (int) project_id )
Advertiser
Projects
Sites

Site ID list, where links are purchased.

Name Type Obligatorily Description
project_id int Yes Project ID
Type Description
array Site ID list, where links are purchased.
(array) sape.get_url_anchors( (int) url_id )
Advertiser
URLs
Anchors

List of URL's anchors.

Name Type Obligatorily Description
url_id int Yes URL ID,
Type Description
array List of URL's anchors, each element contains:
  • Anchor text ID,
  • anchor text,
  • the number of used times.
(int) sape.get_url_anchors_count( (int) url_id )
Advertiser
URLs
Anchors

The number of URL's anchors.

Name Type Obligatorily Description
url_id int Yes URL ID,
Type Description
int The number of URL's anchors.
(array) sape.get_urls_anchors_count( (hash) params )
Advertiser
URLs
Anchors

Sape.get_urls_anchors_count((hash) params)" is an anchor number list by all URLs.

Name Type Obligatorily Description
params hash Yes Possible call parameters are:
  • (int|array)project_id - Project ID / projects ID,
  • (int|array)url_id - URL's ID / URLs ID
Type Description
array Sape.get_urls_anchors_count((hash) params)" is an anchor number list by all URLs.
The result contains:
  • URL ID,
  • the anchor text number.
(string|array) sape.get_placement_status( (string) id [, (bool) check_sleep_balance = false ] )
Advertiser
Publisher
Links

The current status of the link by ID.

Name Type Obligatorily Default value Description
id string Yes - Link ID
check_sleep_balance bool No false If there is a "check_sleep_balance" flag, the array with the following margins will be returned:
  • Link status,
  • flag indicating the balance sleep (due to the advertiser's lack of money)
Type Description
string|array The current status of the link by ID.
(array) sape.get_url_money_stats( (int) url_id [, (int) year [, (int) month [, (int) day ]]] )
Advertiser
Financial statistics
URLs

The expense statistics of the URL.

Name Type Obligatorily Description
url_id int Yes URL ID,
year int No Year of sample
month int No Month of sample
day int No Day of sample
Type Description
array The expense statistics of the URL.
(array) sape.get_project_money_stats( (int) project_id [, (int) year [, (int) month [, (int) day ]]] )
Advertiser
Financial statistics
Projects

The expense statistics of the project.

Name Type Obligatorily Description
project_id int Yes Project ID
year int No Year of sample
month int No Month of sample
day int No Day of sample
Type Description
array The expense statistics of the project.
(array) sape.get_projects_money_stats( (int) year [, (int) month [, (int) day ]] )
Advertiser
Financial statistics
Projects

The expense statistics of all projects.

Name Type Obligatorily Description
year int Yes Year of sample
month int No Month of sample
day int No Day of sample
Type Description
array The expense statistics of all projects.
(array) sape.get_balance_money_stats( (int) year [, (int) month [, (int) day ]] )
Advertiser
Publisher
Financial statistics

The statistics of the balance changes.

Name Type Obligatorily Description
year int Yes Year of sample
month int No Month of sample
day int No Day of sample
Type Description
array The statistics of the balance changes.
(array) sape.get_categories()
Advertiser
Publisher
Categories and lists of transfers

The array of the site's categories.

Type Description
array The array of the site's categories.
(array) sape.get_categories_v2( (string) $lang = 'ru')
Advertiser
Publisher
Categories and lists of transfers

The array of the site's categories.

Type Description
array The array of the site's categories.
(array) sape.get_domain_zones()
Advertiser
Publisher
Categories and lists of transfers

The array of the domain zones.

Type Description
array The array of the domain zones.
(array) sape.get_regions()
Advertiser
Publisher
Categories and lists of transfers

The array of regions.

Type Description
array The array of the domain zones.
(array) sape.get_yaca_categories()
Advertiser
Publisher
Categories and lists of transfers

The array of YACA.

Type Description
array The array of YACA.
(array) sape.get_whitelists()
Advertiser
Publisher
White and black lists

The array of whitelists.

Type Description
array The array of whitelists.
(array) sape.get_messages( (hash) filter [, (int) pn = 0 [, ps = 100 ]] )
Advertiser
Publisher
Notifications

The selection of messages according to the parameters specified in the associated filter array.

Name Type Obligatorily Default value Description
pn int No 0 The page number
ps int No 100 The number of messages on the page. Can take the following values: 10,50,100,250,500,1000.
filter hash Yes - Possible filters are:
  • "dates " is an array of dates with the required messages. Only last 7 days are avaliable
  • "query" is a filter's text (UTF-8)
  • "types" is an array of the message types
    • 1 - A new link * to URL * is placed on the page *
    • 2 - A new request for the link * to URL * placement on the page *
    • 3 - A URL link * placement on the page * is approved by the site's host (AUTO) and by the advertiser (AUTO)
    • 4 - A link * to URL * placement on the page * is approved by the site's host (AUTO) and is waiting for the advertiser's confirmation.
    • 5 - A link * to URL * placement on the page * is cancelled.
    • 6 - A text link * to URL * is updated on the page * - new text*
    • 7 - A request for the change of text link * on the page * - new text *
    • 8 - A new price (*) for the link * placement to the site * on the page * is accepted.
    • 9 - The link * to URL * placement on the page * is confirmed by the advertiser.
    • 10 - The site * [ID:*] with all requests and links is removed from the system by advertiser!
    • 11 - The project * is removed
    • 12 - The URL * is added to the project *
    • 13 - The URL removal from the project
    • 14 - During the last * days there were no requests for new links from your site [ID:*]. The purchase of new links on the site is suspended. Use feedback when you solve the problem.
    • 15 - During the link placement check-up your link * to the site * was not found. It may be connected with the hosting problems of the site. The funds from your account won't be charged for these 24 hours. When the site's availability is restored, your link placement will be resumed.
    • 16 - The outbound links number on all pages is updated.
    • 17 - The site * is not crawled by the Yandex search engine.
    • 18 - The site's homepage * is not responding! Solve the problem and add the site to the system again.
    • 19- Your site * has been crawled by our spider and is being sent for moderation. To start working you need to allow the pages for selling. The site will work after our moderator's check-up.
    • 20 - The site * is removed from the system.
    • 21- Your site *has been crawled by our contextual spider. To start working you need to allow pages with contextual code to selling.
    • 22 - The price for link placement * [*] on the page * is increased from * to *. You have * days to accept new price or to refuse the link.
    • 24 - A URL link placement is approved by the site's host and by the advertiser (AUTO).
    • 25 - A URL link placement is approved by the site's host and is waiting for the advertiser's confirmation.
    • 26 - You did not approve or reject any request within 10 days. That is why your URL [ID:*] * from the project * was forcibly transferred to a manual mode from a semi-automatic one.
    • 27 - The URL* mode of the moderation was changed to manual/automatic
    • 28 - The project * is in SLEEP
    • 29 - A link * to URL * placement on the page * is suspended due to advertiser's zero balance (now link is in SLEEP status).
    • 31 - Your site [ID:*] has been activated after an absence of requests for new links.
    • 32 - The link * to URL* placement on the page * has been restored ( now the link is in the OK status).
    • 33 - The request for the change of link text * to URL* on the page * - *new text* - is approved by site's host (AUTO).
    • 34 - The setting to use the rel="nofollow" attribute for the URL * is turned on.
    • 35 - The setting to use the rel="nofollow" attribute for the URL * is turned off
    • 36 - The frequence of the URL* automode work was changed on * day (days).
    • 37 - There is a big percentage of links in ERROR status on your site *. New links purchase on the site is suspended. Use feedback when you solve the problem.
    • 38 - During the link placement check-up your link * to the site * was not found. It may be connected with the hosting problems of the site. The funds from your account won't be charged for these 24 hours. When the site's availability is restored, your link placement will be resumed.
    • 39 - A link * to URL * placement on the page * is cancelled.
Type Description
array The selection of messages according to the parameters specified in the associated filter array.
If something is found, there is an array:
  • "row_count" is the number of messages
  • "page_count " is the number of pages
  • "messages" is an array of messages. Each element contains:
    • "date" is a date
    • "body" is a message text (UTF-8)
    • "type " is a type
(int) sape.placements_accept_wm( (array) ids )
Advertiser
Publisher
Links

The publisher's approval of links. Approve links in a "WAIT_WM" status. The array contains no more than 100 elements.

Name Type Obligatorily Description
ids array Yes Links ID
Type Description
int Returns the number of successfully approved.
(array) sape.get_placements_new_prices( (int) project_id [, (int) days ] )
Advertiser
Publisher
Links

Receipt of the new prices of the projects links.

Name Type Obligatorily Default value Description
project_id int Yes 0 If "project_id == 0", then the receipt of new link prices for all projects is activated.
project_id int No 30 The number of days during which the prices were changed.
Type Description
array New prices of project links.
The array returns, each element contains:
  • "id " is a Link ID
  • "date" is the previous price installation date
  • "price" is the previous price
  • "date_price_changed" is the new price installation date
  • "price_new" is the new price
(array) sape.get_projects_folders()
Advertiser
Sites

The array returns, each element contains:

  • Project ID
  • Section ID
  • section title

Type Description
array
  • Project ID
  • Section ID
  • section title
(array) sape.get_sites_folders()
Publisher
Sites

The array returns, each element contains:

  • Site's ID
  • Section ID
  • section title

Type Description
array
  • Site's ID
  • Section ID
  • section title
(array) sape.site_update( (int) site_id,  (hash) site_params )
Publisher
Sites

Changes of the site's settings in accordance with the transferred parameters.

Name Type Obligatorily Description
site_id int Yes Site's ID
site_params hash Yes Possible parameters:
  • "auto" is the automatic mode,
  • "flag_hide_url" means to hide the URL,
  • "flag_use_unprintable_words_stop_list" means to use lists of censored words which are foul language,
  • "flag_use_adult_words_stop_list" means to use lists of censored words which are adult content,
  • "flag_use_ambiguous_words_stop_list" means to use the lists of dubious censored words,
  • "flag_reject_foreign_words" means not to accept links fully in Latin,
  • "auto_activate_pages" means to activate new pages automatically,
  • "flag_not_for_sale" means not to accept new requests for the site,
  • "flag_no_dispenser_check" means that links are placed manually on this site,
  • "auto_set_prices" means to set automatically new prices (0 means do not set,1 means averages on the site, 2 means averages for the system multiplied by(auto_set_prices_factor), 3 means set manually),
  • "auto_set_prices_factor" is the value for "averages in the system multiplied by" flag,
  • ]]
  • [[pr_change_auto_set_prices; автоматически устанавливать новые цены при изменении PR(0 — не устанавливать, 1 — средние по сайту, 2 — средние по системе умноженные на(pr_change_prices_factor), 3 — заданные вручную),
  • "pr_change_prices_factor" is the value for the "averages on system multiplied by" flag when you change PR,
  • "nof_placements_autostop" is the link's number in the OK status after which you should stop accepting requests,
  • "price_context_factor_l1" is the factor prices' setting for contextual links from the homepage,
  • "price_context_factor_l2" is the factor prices' setting for the contextual links for pages on the second level,
  • "price_context_factor_l3" is the factor prices' setting for the contextual links for the pages on the third level,
  • "traf_factor" is the factor prices' setting for the traffic pages. Prices are updated immediately
  • "show_only_block" is the links' display mode (0 means mixed, 1 means only block format),
  • "block_links_control " is the links' block display's parameters
    • "background_color" is the background color,
    • "border_color" is the border color,
    • "header_color" is the heading color,
    • "text_color" is the text color,
    • "url_color" is the URL color,
    • "sign_color" is the signature color,
    • "header_size" is the heading size,
    • "text_size" is the text size,
    • "url_size" is the URL size,
    • "sign_size" is the signature size,
    • "border_width" is the border width,
    • "border_use_radius" means to round URLs off,
    • "text_align" is the text alignment in the block,
    • "text_sign" is the signature text,
    • "block_orientation" is the text's orientation in the block (0 is vertical, 1 is horizontal),
    • "show_header" is the heading's display flag,
    • "show_url " is the URL's display flag,
    • "block_width_custom" isthe block's width,
    • "css_class_prefix" is the prefix of the css classes' names,
    • "block_no_css" (0 means to automatically generate and introduce it into the page code, 1 means to use your stylesheet),
    • "block_width" is the width of the links' block,
    • "block_width_unit" is the width measuring type (px or %).
Тип Описание
array Changes of the site's settings in accordance with the transferred parameters.
(bool) sape.project_move_to_folder( (int) project_id, (int) folder_id )
Advertiser
Projects

The transfer of a project to another section.

Name Type Obligatorily Description
project_id int Yes Project ID
folder_id int Yes Directory ID
Type Description
bool The transfer of a project to another section.
(bool) sape.site_move_to_folder( (int) site_id, (int) folder_id )
Publisher
Sites

The transfer of a site to another section.

Name Type Obligatorily Description
site_id int Yes Site's ID
folder_id int Yes Directory ID
Type Description
bool The transfer of a site to another section.
(array) sape.get_placements_text_updates( [ (int) site_id ] )
Advertiser
Publisher
Links
Anchors

Receipt of text change requests.

Name Type Obligatorily Description
site_id int No If "site_id" is set, then it is set only for one site (otherwise for all user's sites).
Type Description
array The array returns, each element contains:
  • "id " is a Link ID
  • "date_created" is a link creation date
  • "txt" is the previous text
  • "request_date " is the creation date of a text change request
  • "request_txt" is the new text
  • "action_reject" is a flag, indicating the result of the request rejection.
    • 1 means that the previous link is saved;
    • 2 means that the previous link is removed
(bool) sape.placement_delete( (string) id )
Advertiser
Publisher
Links

Link removal by ID.

Name Type Obligatorily Description
id string Yes Link ID
Type Description
bool Link removal by ID
(array) sape.placements_delete( (array) ids )
Advertiser
Publisher
Links

Links removal by ID array.

Name Type Obligatorily Description
ids array Yes ID array
Type Description
array It returns the ID of the array which was successfully removed. The array contains no more than 100 elements.
(array) sape.placements_text_updates_accept( (array) pl_ids )
Advertiser
Publisher
Links
Anchors

The approval of text change requests.

Name Type Obligatorily Description
pl_ids array Yes List of ID links
Type Description
array An array with new links ID returns in the same way as in the input.
(bool) sape.placements_text_updates_reject( (array) pl_ids )
Advertiser
Publisher
Links
Anchors

Rejection of text change requests.

Name Type Obligatorily Description
pl_ids array Yes List of ID links
Type Description
array An array with new links ID returns in the same way as in the input.
(string) sape.placement_create( (int) page_id, (int) url_id, (string) anchor [, (hash) params) ] )
Advertiser
Publisher
Extended
Links

New links placement.

Name Type Obligatorily Description
page_id int Yes Page's ID
url_id int Yes URL ID,
anchor string Yes If the anchor is a number, then text from the text database is selected by ID == anchor . If anchor == 0, then the next unused text is taken.
params hash No Possible parameters:
  • "max_price" is a maximum price for the link. If this price is greater than the maximum, then do not but it,
  • "force_seo_wait" is a status installation if it is possible: 1 - is waiting for advertiser's confirmation, 2 - is placed.
Type Description
string New links placement.
(array) sape.placements_create( (hash) placements )
Advertiser
Publisher
Extended
Links

New links placement.

Name Type Obligatorily Description
placements hash Yes An array of placements (no more than 100 elements) should be constructed as follows:
  • "page_id" is a number,
  • "url_id" is a number,
  • "(string) anchor" - if it is a number, then a text from database by "ID==anchor" is selected. If "anchor==0", then next unused text is selected. If text is transfered, it becomes an anchor text.
  • "params" is an array. Possible parameters are:
    • "max_price" is a maximum price for the link. If this price is greater than the maximum, then do not but it,
    • "force_seo_wait" is a status installation if it is possible: 1 - is waiting for advertiser's confirmation, 2 - is placed.
Type Description
array In case of success, then an array with links ID or the errors' description is returned.
(int) sape.placement_update_url( (string) id, (int) url_id )
Advertiser
Publisher
Extended
Links
URLs

Link URL change. The links transfer is possible only between URLs of the same domain.

Name Type Obligatorily Description
id string Yes Link ID
url_id int Yes URL ID,
Type Description
int Link URL change. The links transfer is possible only between URLs of the same domain.
(text|bool) sape.placement_update_text( (string) id, (string) anchor [, (int) action_reject = 1 ] )
Advertiser
Publisher
Extended
Links
Anchors

Link text update.

Name Type Obligatorily Default value Description
ID string Yes - Link ID
anchor string Yes - If the anchor is a number, then text from the text database is selected by ID == anchor . If anchor == 0, then the next unused text is taken.
action_reject int No 1 Action upon publisher's refusal to change the text: 1 - keep the link, 2 - remove the link.
Type Description
text|bool In case of success, the link ID with a new text or "true" is returned, if a request for text changes has been added.
(string) sape.placements_update_text_delayed( (hash) pl_anchor [, (int) action_reject = 1 ] )
Advertiser
Publisher
Extended
Links
Anchors
Pending tasks

Background update of links' texts.

Name Type Obligatorily Default value Description
pl_anchor hash Yes - "pl_anchor" - the keys of this array should be the links IDs as a string, and the values should be texts or anchors IDs: array ((string) pl_id => (string) anchor, ...);
action_reject int No 1 Action upon publisher's refusal to change the text: 1 - keep the link, 2 - remove the link.
Type Description
string It returns a task pointer (handler).
(bool) sape.placement_accept_seo( (string) id )
Advertiser
Publisher
Extended
Links

Advertiser's confirmation of link. Approve links in WAIT_SEO status.

Name Type Obligatorily Description
id string Yes Link ID
Type Description
bool Advertiser's confirmation of link
(array) sape.placements_accept_seo( (array) ids )
Extended
Links
Advertiser
Publisher

Advertiser's confirmation of link. Approve links in WAIT_SEO status.

Name Type Obligatorily Description
ids array Yes Array of links ID. Array of no more than 100 elements.
Type Description
array The array returns, each element contains:
  • "id " is a Link ID
  • "status" is a status: 0 - ALREADY_IS, 1 - OK, -1 - FAILED
(array) sape.placement_sleep_url( (int) url_id )
Advertiser
Publisher
Extended
Links
URLs

The sleeping of all URL links.

Name Type Obligatorily Description
url_id int Yes URL ID,
Type Description
array An array with statistics is returned:
  • "slept" is a number of successfully slept links,
  • "not_slept" is a number of links with an error during sleeping,
  • "removed" is a number of removed requests.
(bool) sape.placement_sleep_project( (int) project_id )
Advertiser
Publisher
Extended
Links
Projects

The sleeping of all links and all URLs of the project.

Name Type Obligatorily Description
project_id int Yes Project ID
Type Description
bool The sleeping of all links and all URLs of the project.
(int) sape.placement_unsleep_url( (int) url_id )
Advertiser
Publisher
Extended
Links
URLs

The unsleeping of all URL links.

Name Type Obligatorily Description
url_id int Yes URL ID,
Type Description
int In case of success, it returns a number of successfully unslept links.
(int) sape.placement_sleep( (array|string) placement_ids )
Advertiser
Publisher
Extended
Links

The sleeping of a link or a group of links.

Name Type Obligatorily Description
placement_ids array|string Yes Link ID or links group.
Type Description
int In case of success, it returns a number of successfully slept links.
(int) sape.placement_unsleep( (array|string) placement_ids )
Advertiser
Publisher
Extended
Links

The unsleeping of a link or a group of links.

Name Type Obligatorily Description
placement_ids array|string Yes Link ID or links group.
Type Description
int In case of success, it returns a number of successfully unslept links.
(int) sape.placements_delete_url( (int) url_id [, (string) status ] )
Advertiser
Publisher
Extended
Links
URLs

All links rejection (if status is not specified, then all links will be removed).

Name Type Obligatorily Description
url_id int Yes URL ID,
status string No If status is not specified, then all links will be removed
Type Description
int In case of success, it returns a number of successfully removed requests.
(int) sape.placements_wait_delete_url( (int) url_id )
Advertiser
Publisher
Extended
Links
URLs

Rejection of all WAIT URLs (WAIT_SEO and WAIT_WM).

Name Type Obligatorily Description
url_id int Yes URL ID,
Type Description
int In case of success, it returns a number of successfully removed requests.
(bool) sape.placements_new_price_accept( (array) pl_ids )
Advertiser
Publisher
Extended
Links

Approval of new links' prices at the end of the term.

Name Type Obligatorily Description
pl_ids array Yes Links ID
Type Description
bool Approval of new links' prices at the end of the term.
(bool) sape.placements_new_price_reject( (array) pl_ids )
Advertiser
Publisher
Extended
Links
URLs

Rejection of new links' prices at the end of the term.

Name Type Obligatorily Description
pl_ids array Yes Links ID
Type Description
bool Rejection of new links' prices at the end of the term.
(int) sape.project_add( (string) name )
Advertiser
Publisher
Extended
Projects

New project's creation.

Name Type Obligatorily Description
name string Yes Project's title
Type Description
int In case of success, it returns a created project's ID.
(bool) sape.project_delete( (int) project_id )
Advertiser
Publisher
Extended
Projects

Project's removal.

Name Type Obligatorily Description
project_id int Yes Project ID
Type Description
bool Project's removal.
(int) sape.url_add( (int) project_id, (string) url [, (string) name [, (string) keyword ]] )
Advertiser
Extended
URLs

Adding a new URL to the project.

Name Type Obligatorily Description
project_id int Yes Project ID
url string Yes URL
name string No URL's title
keyword string No Keyword
Type Description
int In case of success, it returns a created project's ID.
(bool) sape.url_update( (int) url_id, (hash) params )
Advertiser
Extended
URLs

Change of the URL's settings in accordance with the passed parameters.

Name Type Obligatorily Description
url_id int Yes URL ID,
params hash Yes Possible parameters:
  • "project_id" is a project ID,
  • "url" is URL,
  • "name" is the project's title,
  • "keyword" is a keyword,
  • "auto_activity_period" is a automode launch period,
  • "flag_hide_links_from_se" to set rel="nofollow" attribute to links (may be changed only once per day).
Type Description
bool Change of the URL's settings.
(bool) sape.url_delete( (int) url_id )
Advertiser
Extended
URLs

URL removal.

Name Type Obligatorily Description
url_id int Yes URL ID,
Type Description
bool URL removal.
(string) sape.url_anchor_add( (int) url_id, (string) anchor [, (hash) params) ] )
Advertiser
Extended
URLs
Anchors

A new text adding to URL.

Name Type Obligatorily Description
url_id int Yes URL ID,
anchor string Yes Anchor
params hash No Possible parameters:
  • "limit" is the number of text use in links
Type Description
string In case of success, new text ID is returned. This can be used for new links creation or texts change.
(array) sape.url_anchors_add( (int) url_id, (array) anchor [, (hash) params) ] )
Advertiser
Extended
URLs
Anchors

New texts adding to URL.

Name Type Obligatorily Description
url_id int Yes URL ID,
anchor array Yes Anchors
params hash No Possible parameters:
  • "limit" is the number of text use in links
  • return_errors— Возвращать ошибки, ответ будет в виде array(anchors_id => array(id,...), errors=>array(array(error_code,text_num),...), где text_num - порядковый номер недобавленного текста (нумерация от 1)
  • "check_exist" returns the error, if transfered text is on the URL. If this parameters is not specified and there is anchor double, then ID of an already existing anchor returns
Type Description
array It returns the ID array with successfully added texts or the array with ID and Errors (see the "return_errors" parameter), which can be further used to create new links and change texts.
(bool) sape.url_anchor_delete( (int) url_id, (string) anchor )
Advertiser
Extended
URLs
Anchors

Text removal from the URL's text base (ID or a string can be specified).

Name Type Obligatorily Description
url_id int Yes URL ID,
anchor string Yes Anchor
Type Description
bool If it is successful, it returns 'true". If there is no such a text, it is an error.
(int) sape.url_anchors_delete( (int) url_id  [, (array) anchor_ids ] )
Advertiser
Extended
URLs
Anchors

All texts removal from the URL's texts base (or set texts, if "anchor_ids" is set).

Name Type Obligatorily Description
url_id int Yes URL ID,
anchor_ids array No ID array in the lines form.
Type Description
int In case of success, it returns a number of removed texts.
(bool) sape.url_set_autoseo( (int) url_id, (bool) flag_auto, (bool) flag_require_confirm )
Advertiser
Extended
URLs
Filters and autofilters

The change of the URL's moderation mode.

Name Type Obligatorily Description
url_id int Yes URL ID,
flag_auto bool Yes "flag_auto == false " is manual change, (flag_auto == true && flag_require_confirm == false) is automatic change, (flag_auto == true && flag_require_confirm == true) is semi-automatic.
flag_require_confirm bool Yes "flag_auto == false " is manual change, (flag_auto == true && flag_require_confirm == false) is automatic change, (flag_auto == true && flag_require_confirm == true) is semi-automatic.
Type Description
bool The change of the URL's moderation mode.
(int) sape.project_bl_add( (int) project_id, (array) domains [, (bool) auto_remove_placements = true ] )
Advertiser
Extended
Projects
White and black lists

Domain adding to the project's blacklist. It returns the number of successfully added domains.

Name Type Obligatorily Default value Description
project_id int Yes - Project ID
domains array Yes - Domains
auto_remove_placements bool No true Remove the links with this domain after domain placement to GBL
Type Description
int It returns the number of domains successfully added to the project's black list.
(int) sape.project_bl_del( (int) project_id, (array) domains )
Advertiser
Extended

Domain removal from the project's blacklist.

Name Type Obligatorily Description
project_id int Yes Project ID
domains array Yes Domains
Type Description
int It returns the number of successfully removed domains.
(array) sape.get_project_bl_domains( (int) project_id [, (int) pn = 0 [, (int) ps = 100 ]] )
Advertiser
Extended
Projects
White and black lists

Domains receiving from the project's blacklist.

Name Type Obligatorily Default value Description
project_id int Yes - Project ID
pn int нет 0 The page number (for pagination).
ps int нет 100 The number of elements to display on the page (for pagination).
Type Description
array The array returns, each element contains:
  • "id" is a domain's ID;
  • "domain" is a domain.
(int) sape.projects_gbl_add( (array) domains [, (bool) auto_remove_placements = true ] )
Advertiser
Projects
White and black lists
Extended

Domains adding to the global black list.

Name Type Obligatorily Default value Description
domains array Yes - Domains
auto_remove_placements bool No true Remove the links with this domain after domain placement to GBL
Type Description
int It returns the number of successfully added domains.
(int) sape.projects_gbl_del( (array) domains )
Advertiser
Extended
Projects
White and black lists

Domains removal from the global blacklist.

Name Type Obligatorily Description
domains array Yes Domains
Type Description
int It returns the number of successfully removed domains.
(array) sape.get_projects_gbl_domains( [ (int) pn = 0 [, (int) ps = 100 ]] )
Advertiser
Extended
Projects
White and black lists

Domain receiving from the global blacklist.

Name Type Obligatorily Default value Description
pn int No 0 The page number (for pagination).
ps int No 100 The number of elements to display on the page (for pagination).
Type Description
array The array returns, each element contains:
  • "id" is a domain's ID;
  • "domain" is a domain.
(int) sape.wl_add( (array) domains, (int/array) wl_ids )
Advertiser
Publisher
Extended
White and black lists

Domains adding to the section/sections of favorites.

Name Type Obligatorily Description
domains array Yes Domains
wl_ids int/array Yes section's ID /sections of favorites ID
Type Description
int It returns the number of successfully added domains.
(bool) sape.wl_del( (array) domain_ids, (int/array) wl_ids )
Advertiser
Publisher
Extended
White and black lists

Domains removal from the section/sections of favorites.

Name Type Obligatorily Description
domain_ids array Yes Domains ID
wl_ids int/array Yes section's ID /sections of favorites ID
Type Description
bool Domains removal from the section/sections of favorites.
(array) sape.get_wl_domains( (int) wl_id [, (int) pn = 0 [, (int) ps = 100 ]] )
Advertiser
Publisher
Extended
White and black lists

Domains receiving from the section of favorites.

Name Type Obligatorily Default value Description
wl_id int Yes - Section favorites ID
pn int No 0 The page number (for pagination).
ps int No 100 The number of elements to display on the page (for pagination).
Type Description
array The array returns, each element contains:
  • "id" is a domain's ID;
  • "domain" is a domain.
(int) sape.whitelist_create( (string) domain )
Advertiser
Publisher
Extended
White and black lists

The adding of the section of favorites.

Name Type Obligatorily Description
domain string Yes Domain
Type Description
int In case of success, it returns a new section of favorites ID.
(bool) sape.whitelist_delete( (int) wl_id )
Advertiser
Publisher
Extended
White and black lists

Section of favorites removal.

Name Type Obligatorily Description
wl_id int Yes List of favorites ID.
Type Description
bool Section of favorites removal.
(array) sape.get_urls_money_stats( (array) url_ids, (int) year [, (int) month = null [, (int) day = null ]] )
Advertiser
Extended
URLs
Financial statistics

The receipt of expense statistics of the URLs over a period of time. Constraints:

  • the statistics sampling for the period not more than one year (i.e. the "year" parameter must be specified);
  • not more than 500 URL's ID.

Name Type Obligatorily Default value Description
url_ids array Yes - URLs' ID
year int Yes - Year
month int No null Month
day int No null Month
Type Description
array It returns an array of the expense statistics that has the following structure:
  • "total" is a total expense;
  • "items" is an array of statistics data:
    • "id" is an URL's ID;
    • "date_logged" is a date;
    • "sum" is an expense.
(int) sape.filter_create( (string) filter_name, (hash) filter )
Advertiser
Publisher
Extended
Filters and autofilters

Filter addition with the parameters specified in the associated filter array.

Name Type Obligatorily Description
filter_name string Yes Filter's title
filter hash Yes Possible filters are:
  • "ext_links" is a maximum number of outbound links.
  • "ext_links_forecast" is a maximum projected number of outbound links.
  • "cy_from" is a minimal TCI value,
  • "cy_2" is a maximum TIC value,
  • "pr_from " is a minimal PR value,
  • "pr_2" is a maximum PR value,
  • "price_from" is a minimal page price,
  • "price_2" is a maximum page price,
  • "level_from" is a minimal page level,
  • "level_2" is a maximum page level,
  • "in_yaca" are sites in YACA: no parameter - all, 0 - not in YACA, 1- only in YACA,
  • "in_dmoz" are sites in DMOZ: no parameter - all, 0 - not in DMOZ, 1- only in DMOZ,
  • "domain_level" is a domain level,
  • "categories" is an array with categories ID,
  • "categories_v2" is an array with categories ID (v2),
  • "no_double_in_project" means not to display the sites, already purchased as part of URLs of the current project,
  • "flag_blocked_in_yandex" means to show the sites that are not in Yandex (0-not to show|1- to show|2 -it's not important),
  • "flag_blocked_in_google" means not to show the sites that are not in Google (0-not to show|1- to show|2 -it's not important),
  • "words" are keywords with minimum 4 symbols,
  • "whitelists" is an array with whitelists ID,
  • "nogood" is a search scope: 0 - all sites, 1 - main base, 2 - sites with dubious content,
  • "date_added" is the number of days since the site registration in the system,
  • "domain_zones" is a domain zones array, for example ('ru', 'com', 'org'),
  • "days_old_whois" is a minimal domain age in days,
  • "links_display_mode " is a links output format (-1 - any|0-standard|1-block|2-mixed).
  • page_languages — массив идентификаторов языков страниц сайта (sape.get_languages — список допустимых значений)
  • site_languages — массив идентификаторов преобладающих языков сайта (sape.get_languages — список допустимых значений)
  • schemas_access — схемы сайта: если не указано - не важно, 1 - только http, 2 - только https, 3 - http и https
Type Description
int If it is successfully added, then it returns the filter's ID.
(bool) sape.filter_update( (int) filter_id, (hash) new_filter )
Advertiser
Publisher
Extended
Filters and autofilters

Change of the filter parameters.

Name Type Obligatorily Description
filter_id int Yes Filter's ID
new_filter hash Yes see above + filter_name;
Type Description
bool Change of the filter parameters.
(bool) sape.filter_delete( (int) filter_id [, (bool) force_delete = false ] )
Advertiser
Publisher
Extended
Filters and autofilters

Filter's removal.

Name Type Obligatorily Default value Description
filter_id int Yes - Filter's ID
filter_id bool No false If the parameter force_delete == true, then it removes all auto filters that are tied to the filter. Otherwise it checks whether there are auto filters. If there are, then it won't remove the filter.
Type Description
bool Filter's removal.
(int) sape.filter_auto_create( (int) filter_id, (int) url_id, (int) quant, (int) price, (int) daily_quota )
Advertiser
Publisher
Extended
Filters and autofilters

Autofilter creation for URL.

Name Type Obligatorily Description
filter_id int Yes Filter's ID
url_id int Yes URL ID,
quant int Yes Number
price int Yes Price
daily_quota int Yes Daily quota
Type Description
int If it is successfully added, then it returns the filter's ID.
(bool) sape.filter_auto_update( (int) filter_auto_id, (int) quant, (int) price, (int) daily_quota )
Advertiser
Publisher
Extended
Filters and autofilters

Autofilter change for URL.

Name Type Obligatorily Description
filter_auto_id int Yes Autofilter ID
quant int Yes Number
price int Yes Price
daily_quota int Yes Daily quota
Type Description
bool Autofilter change for URL.
(bool) sape.filter_auto_delete( (int) filter_auto_id )
Advertiser
Publisher
Extended
Filters and autofilters

Autofilter removal.

Name Type Obligatorily Description
filter_auto_id int Yes Autofilter ID
Type Description
bool Autofilter removal.
(array) sape.get_filters( [ (bool)  show_params = false ] )
Advertiser
Publisher
Extended
Filters and autofilters

Receipt of filter's list.

Name Type Obligatorily Default value Description
show_params bool No false Display the value of the filters in the hash form
Type Description
array The filters list. If the "show_params" parameter is specified, then it returns the filter parameters in the hash form.
(array) sape.get_filters_auto( (int)/(array) url_id [, (bool) show_budget = false ] )
Advertiser
Publisher
Extended
Filters and autofilters

Receipt of the autofilters list for the URL or URLs list.

Name Type Obligatorily Default value Description
url_id int/array Yes - URL's ID / URLs' ID
show_budget bool No false If the "show_budget" is "true", the following margins are added:
  • "current_quant" is a number of purchased links
  • "current_price" is a price of purchased links
Type Description
array The array returns, each element contains:
  • "filter_auto_id" is the autofilter ID
  • "filter_id" is the filter ID
  • "url_id" is the URL ID
  • "quant" is a total quota of the links
  • "price " is the autofilter budget
  • "daily_quota" is a daily quota of the links
(int) sape.site_bl_add( (array) $domains [, (int) site_id = 0 ] )
Publisher
Extended
Sites
White and black lists

Adding of domains list to the BL or GBL.

Name Type Obligatorily Default value Description
$domains array Yes - Domains array containing no more than 100 elements.
site_id int No 0 Adding of domains list to the BL or GBL (if site_id == 0).
Type Description
int It returns a number of added domains.
(int) sape.site_bl_del( (array) $domains [, (int) site_id = 0 ] )
Publisher
Extended
Sites
White and black lists

The removal of domains list from the BL or GBL.

Name Type Obligatorily Default value Description
$domains array Yes - Domains array containing no more than 100 elements.
site_id int No 0 The removal of domains list from the GBL (if site_id == 0).
Type Description
int It returns a number of removed domains.
(bool) sape.site_set_max_per_page( (int) site_id, (hash) params )
Publisher
Extended
Sites

Installation of the maximum number of links. You can increase the maximum number of links no more than 1 time in 2 weeks.

Name Type Obligatorily Description
site_id int Yes Site's ID
params hash Yes Possible parameters:
  • "mpp_1" is a maximum number of links for the homepage,
  • "mpp_2" is a maximum number of links for the second level pages,
  • "mpp_3" is a maximum number of links for the third level pages
Type Description
bool It returns "false", if this number for all levels had not changed. Otherwise it returns "true".
(bool) sape.page_update_price( (int) site_id, (int) page_id, (float) price [, (bool) force = false ] )
Publisher
Extended
Pages

Price changing of the page.

Name Type Obligatorily Default value Description
site_id int Yes - Site's ID
page_id int Yes - Page's ID
price float Yes - Price
force float No false If " force = true", prices of purchased links will be updated.
Type Description
bool Price changing of the page.
(bool) sape.pages_update_price( (int) site_id,(int) level, (int) pr, (int) page_id, (float) price [, (bool) force = false ] )
Publisher
Extended
Pages

Price changing of the page.

Name Type Obligatorily Default value Description
site_id int Yes - Site's ID
level int Yes - Page level
pr int Yes - May accept the "all" value, if the price for the particular page level should be set.
price float Yes - Price
force float No false If " force = true", prices of purchased links will be updated.
Type Description
bool Price changing of the page.
(string) sape.placements_delete_delayed( (array) pl_ids )
Advertiser
Publisher
Extended
Links
Pending tasks

Background links removal.

Name Type Obligatorily Description
pl_ids array Yes Links ID
Type Description
string It returns a task pointer (handler).
(struct) sape.get_task_status( (string) handler )
Advertiser
Publisher
Extended
Pending tasks

Receiving of the task status by the index.

Name Type Obligatorily Description
handler string Yes Task pointer.
Type Description
struct A returned array contains the following margins:
  • "status" is the execution status:
    • 0 - is waiting for execution;
    • 1 is in execution progress;
    • 2 - is executed.
  • "result" is a result;
  • "sofar" is a number of the executed task's operations;
  • "totalwork" is a total number of the task's operations.
the "result", "sofar", "totalwork" margins can be empty (it depends on the executed task and status).
(int) sape.site_delete( (int) site_id )
Extended
Sites
Publisher

A site's removal from the system.

Name Type Obligatorily Description
site_id int Yes Site's ID
Type Description
int A site removed from the system.
(array) sape.get_stopwords()
Advertiser
Publisher
Extended
Censored words

Receiving of the user's censored words list.

Type Description
array It returns an array of hashes, containing the following margins:
  • "id" is a list ID,
  • "name" is a list name,
  • "words" is a censored words list.
(array) sape.get_stopwords_site( (int) site_id )
Advertiser
Publisher
Extended
Sites
Censored words

Receiving of the ID array with site's list of censored words.

Name Type Obligatorily Description
site_id int Yes Site's ID
Type Description
array The ID array with site's list of censored words.
(int) sape.stopwords_list_add((string) name, (string) words)
Advertiser
Publisher
Extended

Censored words list addition.

Name Type Obligatorily Description
name string Yes Name
words string Yes Censored words
Type Description
int It returns the ID of the created list.
(void) sape.stopwords_list_update( (id) list_id, (string) name, (string) words )
Advertiser
Publisher
Extended
Censored words

Change of censored words list.

Name Type Obligatorily Description
list_id id Yes List ID
name string Yes List title
words string Yes Censored words
Type Description
void Change of censored words list.
(bool) sape.stopwords_list_delete( (id) list_id )
Advertiser
Publisher
Extended
Censored words

Censored words list removal.

Name Type Obligatorily Description
list_id id Yes List ID
Type Description
bool Censored words list removal.
(void) sape.stopwords_words_add( (id) list_id, (string) words )
Advertiser
Publisher
Extended
Sites
Censored words

Censored words addition to the list.

Name Type Obligatorily Description
list_id id Yes List ID
words string Yes Censored words
Type Description
void Censored words addition to the list.
(void) sape.stopwords_words_delete( (id) list_id, (string) words )
Advertiser
Publisher
Extended
Censored words

Censored words removal from the list.

Name Type Obligatorily Description
list_id id Yes List ID
words string Yes Censored words
Type Description
void Censored words removal from the list.
(int) sape.stopwords_site_add( (array) list_ids, (int) site_id )
Advertiser
Publisher
Extended
Sites
Censored words

Censored words binding to the site.

Name Type Obligatorily Description
list_ids array Yes Invalid ID of censored words list
site_id int Yes Site's ID
Type Description
int It returns the number of bound lists.
(int) sape.stopwords_site_delete( (array) list_ids, (int) site_id )
Advertiser
Publisher
Extended
Sites
Censored words

Removal of the censored words list and site's connections.

Name Type Obligatorily Description
list_ids array Yes Invalid ID of censored words list
site_id int Yes Site's ID
Type Description
int It returns the number of the removed connections.
(array) sape.get_languages( (string) $lang = 'ru')
Advertiser
Categories and lists of transfers

Languages lists.

Type Description
array It returns an array of languages, containing the following margins:
  • "id" is a language ID,
  • "name" is a language name
Code
Message
Description
100
SAPE.RU: Not enough params :o(
Not enough parameters
101
SAPE.RU: Internal error :o(
Internal error
102
SAPE.RU: Bad or unknown ID :o(
Invalid ID
110
SAPE.RU: User registration failed :o(
The user is not registered
111
SAPE.RU: Bad login :o(
Invalid login or password
112
SAPE.RU: Login already in use :o(
This login is already in the system
113
SAPE.RU: Email already in use :o(
This e-mail is already in the system
114
SAPE.RU: Password too short :o(
The password is too short
115
SAPE.RU: Bad email :o(
Invalid e-mail
116
SAPE.RU: Bad username :o(
Invalid username
117
SAPE.RU: Bad refid :o(
Invalid referral ID
118
SAPE.RU: Bad user id :o(
Invalid user ID
119
SAPE.RU: User not auth :o(
The user is not authorized
120
SAPE.RU: Bad external system ID :o(
Invalid external system ID
121
SAPE.RU: Method is restricted for current user :o(
The method is not allowed to be called for this user
122
SAPE.RU: User does not exist :o(
User dos not exist
123
SAPE.RU: User does not have a phone :o(
The user has no phone number
140
SAPE.RU: Billing in progress :o(
Billing is in process
141
SAPE.RU: Afterbilling aggregations building in progress :o(
There is a postbilling creation of aggregations
150
SAPE.RU: Bad subscribe type :o(
Invalid subscription type
151
SAPE.RU: Bad template id :o(
Invalid template ID
210
SAPE.RU: Anchor add failed :o(
Anchor is not added
211
SAPE.RU: Anchor delete failed :o(
Anchor is not removed
310
SAPE.RU: Project create failed :o(
Project is not created
311
SAPE.RU: Project bad name :o(
Invalid project's title
320
SAPE.RU: URL Add failed :o(
URL is not added
321
SAPE.RU: URL is banned :o(
URL is banned
322
SAPE.RU: Bad URL length :o(
Invalid URL length
323
SAPE.RU: URL is malformed :o(
Malformed URL
324
SAPE.RU: Bad URL domain :o(
Invalid URL domain
325
SAPE.RU: Url contains quote :o(
URL contains the quotation marks
330
SAPE.RU: Site add failed :o(
Site is not added
331
SAPE.RU: Bad url :o(
Invalid URL
332
SAPE.RU: Site already exists :o(
Site is already in the system
333
SAPE.RU: No code on front page :o(
There is no system code on the homepage
334
SAPE.RU: No code on page :o(
There is no system code on the page
335
SAPE.RU: No connection to site :o(
Server communication error
336
SAPE.RU: Site cannot be reindexed now :o(
The site recrawling is currently prohibited
337
SAPE.RU: Site is already bought out :o(
Site is already purchased
338
SAPE.RU: Site reindex is already started :o(
Task is in the queue or is being executed.
410
SAPE.RU: Placement create failed :o(
Link is not created
420
SAPE.RU: Placement delete failed :o(
Link is not removed
430
SAPE.RU: Placement update text failed :o(
Link text is not changed
432
SAPE.RU: Placement update price failed :o(
Link price is not changed
435
SAPE.RU: Placement update url failed :o(
Link URL is not changed
440
SAPE.RU: Placement accept SEO failed :o(
Link is not confirmed by the advertiser
450
SAPE.RU: Placement unsleep failed :o(
Link is not restored
460
SAPE.RU: Placement accept WM failed :o(
Link is not confirmed by the publisher
465
SAPE.RU: Placement new price accept failed :o(
Error of new prices confirmation
466
SAPE.RU: Placement new price reject failed :o(
Error of new prices rejection
470
SAPE.RU: Autofilter create failed, no texts on url
Autofilter is not created. There is no texts for URL
471
SAPE.RU: Autofilter create failed, already exist
Autofilter is not created. It already exists
500
SAPE.RU: Bad Project ID
Invalid project ID
501
SAPE.RU: Bad Site ID
Invalid site ID
502
SAPE.RU: Bad URL ID
Invalid URL ID
503
SAPE.RU: Bad Placement ID
Invalid link ID
504
SAPE.RU: Bad Placement Text
Invalid link text
505
SAPE.RU: Bad date in params
Invalid date format in the parameters
506
SAPE.RU: Bad Page ID
Invalid page ID
507
SAPE.RU: Bad Project ID - No URLs
Invalid project ID: there are no URLs
508
SAPE.RU: Bad category id
Invalid category ID
509
SAPE.RU: Bad filter id
Invalid filter ID
510
SAPE.RU: Bad whitelist id
Invalid section ID in favorites
511
SAPE.RU: Bad keyword
Invalid keyword
512
SAPE.RU: Bad stop-words list ID
Invalid ID of censored words list
513
SAPE.RU: Bad Project blacklist ID
Project blacklist is not created
514
SAPE.RU: Bad date interval
Invalid date range
515
SAPE.RU: Bad domain id
Invalid domain ID
521
SAPE.RU: Bad placement anchor ID
Invalid anchor ID
522
SAPE.RU: Empty placement anchor
Empty anchor
523
SAPE.RU: Malformed placement anchor
Incorrect anchor
524
SAPE.RU: Spammed placement anchor
Spammed anchor
525
SAPE.RU: Anchor too long
Anchor is too long
526
SAPE.RU: Anchor exist
Anchor already exists
650
SAPE.RU: Empty login :o(
Empty login
651
SAPE.RU: User is not activated :o(
User is not activated
652
SAPE.RU: Quantity of attempts of authentication for current IP is exceeded :o(
Number of the authorization attemps for the current IP is exhausted
653
SAPE.RU: Login does not exist :o(
User dos not exist
654
SAPE.RU: Invalid authorization cookie :o(
Invalid authorisation cookie
655
SAPE.RU: User is banned :o(
User is banned
656
SAPE.RU: User is blocked - need to change password :o(
User is blocked. Change the password
657
SAPE.RU: Invalid authorization ticket :o(
Invalid authorisation ticket
660
SAPE.RU: Access restricted for current IP :o(
Access from the current IP is forbidden
661
SAPE.RU: No partner contract :o(
There is no affiliate program's contract
662
SAPE.RU: No WM contract :o(
There is no publisher's contract
663
SAPE.RU: No SEO contract :o(
There is no advertiser's contract
664
SAPE.RU: Extended mode denied :o(
Access to the additional functions is closed
665
SAPE.RU: Not wizard account
This is not a Wizard account
666
SAPE.RU: Invalid login or password :o(
Invalid login or password
667
SAPE.RU: Please, login
Log in the system, please
668
SAPE.RU: Quantity of attempts of authentication is exceeded
Number of the authorization attempts is exhausted
669
SAPE.RU: TEMPORARY UNAVAILABLE
Temporarily is not available
670
SAPE.RU: Empty array!
Empty array
671
SAPE.RU: Input array empty!
Input data array is empty
672
SAPE.RU: Return array empty!
Output data array is empty
673
SAPE.RU: Search result empty!
Search returned the empty result
680
SAPE.RU: Request processing error!
Error during the request processing
681
SAPE.RU: Request already exist!
Request already exists
711
SAPE.RU: Bill amount too small :o(
Invoice amount is too small
800
SAPE.RU: Bad handle :o(
Invalid index
801
SAPE.RU: Get task status failed :o(
Status receiving error by the transfered index
802
SAPE.RU: Cannot get factor status :o(
It is impossible to receive the factor status
900
SAPE.RU: OAuth error :o(
"OAuth" error
1000
SAPE.RU: Elama error :o(
"Elama" error
1100
SAPE.RU: RT error :o(
"RT" error
1200
SAPE.RU: RTB error :o(
"RTB" error
1300
SAPE.RU: Letero error :o(
"Letero" error
1400
SAPE.RU: Wizard error :o(
"Wizard" error
1500
SAPE.RU: Archiving in PR failed :o(
Project archiving in PR failed
2101
SAPE.RU: Anchor add_failed, bad name :o(
Anchor is not added, invalid title
2201
SAPE.RU: Teaser upload failed, maximum allowed size for file 1.95MB :o(
The image file should be less than 1.95 MB
2202
SAPE.RU: Teaser upload failed, file must be jpg, gif or png :o(
The image file should be in jpg, gif or png format
2203
SAPE.RU: Teaser upload failed, file broken:o(
The image file is not readable
4101
SAPE.RU: Placement create failed, undefined page
Link is not created, page is not defined
4102
SAPE.RU: Placement create failed, big price
Link is not created, price is too high
4103
SAPE.RU: Placement create failed, undefined site
Link is not created, site is not defined
4104
SAPE.RU: Placement create failed, links limit reached
Link is not created, placement limit is reached
4105
SAPE.RU: Placement create failed, page is not active
Link is not created, page is not activated
4106
SAPE.RU: Placement create failed, site is not active
Link is not created, site is not activated
4107
SAPE.RU: Placement create failed, self link (anchor_url==site_url)
Link is not created, it is outbound
4108
SAPE.RU: Placement create failed, link already exists
Link is not created, this links already exists
4109
SAPE.RU: Placement create failed, IN WM BL
Link is not created, URL is in the publisher's blacklist
4110
SAPE.RU: Placement create failed, IN SEO BL
Link is not created, URL is in the advertiser's blacklist
4111
SAPE.RU: Placement create failed, text error
Link is not created, text error
4112
SAPE.RU: Placement create failed, not enough money for 2 days
Link is not created, not enough funds for 2 days placement
4113
SAPE.RU: Placement context create failed, anchor text error
Contextual link is not created, anchor text's error
4114
SAPE.RU: Placement context create failed, sql error
Contextual link is not created, SQL error
4116
SAPE.RU: Placement context create failed, no snippet
Contextual link is not created, there is no snippet
4117
SAPE.RU: Placement get good text failed, there are stop words
Text is not selected, there are censored words
4118
SAPE.RU: Placement get good text failed, there are russian chars
Text is not selected, there are Russian letters
4119
SAPE.RU: Placement get good text failed
Text is not selected
4120
SAPE.RU: Placement get good text failed, no active anchor texts
Text is not selected, there are no active texts
4510
SAPE.RU: URL unsleep failed :o(
URL is no restored
4511
SAPE.RU: URL unsleep failed, no money :o(
URL is no restored, not enough money
4512
SAPE.RU: URL unsleep failed, no links to unsleep :o(
URL is no restored, there are no links to be restored
6651
SAPE.RU: Not wizard user account
This account doesn't use Wizard
6661
SAPE.RU: Authorization by password or md5 is prohibited. Please use token instead (Details: https://help.sape.ru/sape/faq/1685). To generate token visit https://passport.sape.ru/security/token/.
Authorization by password or md5 is prohibited. Use token, please (More info at: https://help.sape.ru/sape/faq/1685). You may generate token in your account: https://passport.sape.ru/security/token/
7000
SAPE.RU: Too deep :o(
Specify search conditions
7001
SAPE.RU: Too short word :o(
Too short word
7002
SAPE.RU: Quantity of calls to a method is exceeded
Number of the calls to the method is exhausted
7003
SAPE.RU: Search result is too big :o(
Too much data in SERP, specify search conditions
41021
SAPE.RU: Placement create failed, zero price
Link is not created, zero price
41031
SAPE.RU: Placement create failed, site is not saling
Link is not created, links selling is off on the site
41181
SAPE.RU: Placement get good text failed, there are not russian chars
Text is not selected, there are no Russian letters
41301
SAPE.RU: Placement create failed, undefined teaser page
Link is not created, teaser page is not defined
41302
SAPE.RU: Placement create failed, not enough traffic
Link is not created, not enough traffic on the page
41304
SAPE.RU: Placement create failed, not enough traffic on site
Link is not created, not enough traffic on the site