Developers » API methods » Ads API » ads.getSuggestions
Ads APIads.getSuggestions
Returns a set of auto-suggestions for various targeting parameters.
This method can be called with a user token. Access rights required: ads.
Parameters
sectionSection, suggestions are retrieved in. Available values:
  • countries — request of a list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full list of countries is shown.
  • regions — requested list of regions. country parameter is required.
  • cities — requested list of cities. country parameter is required.
  • districts — requested list of districts. cities parameter is required.
  • stations — requested list of subway stations. cities parameter is required.
  • streets — requested list of cities. cities parameter is required.
  • schools — requested list of educational organizations. cities parameter is required.
  • interests — requested list of interests.
  • positions — requested list of positions (professions).
  • group_types — requested list of group types.
  • religions — requested list of religious commitments.
  • browsers — requested list of browsers and mobile devices.
required parameter, string
idsObjects IDs separated by commas. If the parameter is passed, q, country, cities should not be passed.
string
qFilter-line of the request (for countries, regions, cities, streets, schools, interests, positions).
string
countryID of the country objects are searched in.
int (number)
citiesIDs of cities where objects are searched in, separated with a comma.
string
langLanguage of the returned string values. Supported languages:
  • ru — Russian;
  • ua — Ukrainian;
  • en — English.
string
Result
Returns a list of objects (suggestions) that match the request.

For countries, positions, group_types, religions, browsers sections the response is returned as an array of objects with fields
  • id — object ID;
  • name — object name.

For cities, districts, streets, schools sections the response is returned as an array of objects with fields
  • id — object ID;
  • name — object name;
  • parent — city/country name where the object is located.

Also, for schools, desc field is returned with full name of educational organization.

For regions section the response is returned as an array of objects with fields
  • id — region ID;
  • name — region name;
  • type (optional) — name of region type (region, autonomous area, territory).

For interests section the response is returned as an array of strings.

Errors
Global errors can occur while running. See their descriptions on this page.