Using Zencity's API, you can stream your data from Zencity into another software or dashboard, letting you consolidate the systems you use and get the full picture in one place.
This is useful if your city, county or department has its own custom dashboard, or if you’re using a CRM software or BI platform and want to enhance your view with additional data from Zencity.
How to get started
Below, you’ll find a concise reference manual working with the Zencity API and extracting the data or widgets you want.
Zencity data
Every API call needs one header / param added to the HTTP request named token.
To receive your Zencity API token please contact your Customer Success Manager.
Projects
Returns the names and IDs for your list of active projects.
GET https://api.zencity.io/api/project/v1/getProjectsNames
Headers / Params
key |
value |
token |
#{{token}} |
Locations
Returns the list of neighborhoods or designated areas in your community.
Note: When value = ‘other,’ it refers to data without a specific location.
GET https://api.zencity.io/api/geo/v1/getSubTerritories
Headers / Params
key |
value |
token |
#{{token}} |
Topics
Returns the list of topics or sub-topics.
GET https://api.zencity.io/api/category/v1/getCategories
GET https://api.zencity.io/api/category/v1/getCategoryGroups
Headers / Params
key |
value |
token |
#{{token}} |
Zencity dashboard widgets
Popular words

Returns the number of times each word was used.
Note: Fields “dateFrom” and “dateTo” are obligatory.
GET https://api.zencity.io/api/dataItem/presets/v1/getWordCount
Headers (token can be passed as a param)
key |
value |
token |
#{{token}} |
Params
key |
value |
required |
dateFrom |
yyyy-mm-dd |
yes |
dateTo |
yyyy-mm-dd |
yes |
project |
an Id of a project |
no |
official |
true / false |
no |
categoryGroup |
A key of a category group |
no |
Sentiment analysis: Overview

Returns the data as classified by positive or negative sentiment.
Note 1: Fields “dateFrom” and “dateTo” are obligatory.
Note 2: You will get the interaction counter itself, not the percentage.
GET https://api.zencity.io/api/categoryScore/presets/v1/getSentimentOverview
Headers (token can be passed as a param)
key |
value |
token |
#{{token}} |
Params
key |
value |
required |
dateFrom |
yyyy-mm-dd |
yes |
dateTo |
yyyy-mm-dd |
yes |
dateRange |
day / week / month |
no |
project |
An Id of a project |
no |
sentiment |
positive / negative / neutral |
no |
dataSourceOfficial |
true / false |
no |
locationSubTerritory |
An Id of a subTerritory |
no |
category |
A key of a category |
no |
categoryGroup |
A key of a category group |
no |
Sentiment analysis: Segment breakdown
Returns filtered sentiment analysis data, e.g. by project.
Note 1: Fields "dateFrom" and "dateTo" are obligatory.
Note 2: You will get the interaction counter itself, not the percentage.
GET https://api.zencity.io/api/categoryScore/presets/v1/#{{preset}}
Preset options:
For each project: Get number of positive, neutral and negative interactions
getSentimentOverviewPerProject
For each category: Get number of positive, neutral and negative interactions
getSentimentOverviewPerCategory
For each category group: Get number of positive, neutral and negative interactions
getSentimentOverviewPerCategoryGroup
For each channel: Get number of positive, neutral and negative interactions
getSentimentOverviewOfficialUnofficialChannels
For each defined geographic area: Get number of positive, neutral and negative interactions
getSentimentOverviewPerLocationSubTerritory
Headers (token can be passed as a param)
key |
value |
token |
#{{token}} |
Params
key |
value |
required |
dateFrom |
yyyy-mm-dd |
yes |
dateTo |
yyyy-mm-dd |
yes |
dateRange |
day / week / month |
no |
sentiment |
positive / negative / neutral |
no |
dataSourceOfficial |
true / false |
no |
locationSubTerritory |
an Id of a subTerritory |
no |
category |
A key of a category |
no |
categoryGroup |
A key of a category group |
no |
Volume of interactions over time: Overview

Returns the number of interactions collected over the defined time period.
Note 1: Fields “dateFrom” and “dateTo” are obligatory.
Note 2: You will get the interaction counter itself, not the sentiment percentage.
GET https://api.zencity.io/api/categoryScore/presets/v1/getScoreOverTime
Headers (token can be passed as a param)
key |
value |
token |
#{{token}} |
Params
key |
value |
required |
dateFrom |
yyyy-mm-dd |
yes |
dateTo |
yyyy-mm-dd |
yes |
dateRange |
day / week / month |
no |
project |
an Id of a project |
no |
timeResolution |
day / week |
no |
dataSourceOfficial |
true / false |
no |
locationSubTerritory |
An Id of a subTerritory |
no |
category |
A key of a category |
no |
categoryGroup |
A key of a category group |
no |
Volume of interactions over time: Segment breakdown
Returns the data divided by score over time for each topic or sub-topic.
Note 1: Fields “dateFrom” and “dateTo” are obligatory.
Note 2: You will get the interaction counter itself, not the sentiment percentage.
GET https://api.zencity.io/api/categoryScore/presets/v1/#{{preset}}
Preset options:
For each category: Get number of positive, neutral and negative interactions in selected time period
getScoreOverTimePerCategory
For each category group: Get number of positive, neutral and negative interactions in selected time period
getScoreOverTimePerCategoryGroup
Headers (token can be passed as a param)
key |
value |
token |
#{{token}} |
Params
key |
value |
required |
dateFrom |
yyyy-mm-dd |
yes |
dateTo |
yyyy-mm-dd |
yes |
dateRange |
day / week / month |
no |
timeResolution |
day / week |
no |
dataSourceOfficial |
true / false |
no |
locationSubTerritory |
An Id of a subTerritory |
no |
categoryGroup |
A key of a category group |
no |
Questions? In case you need any help, please contact your Customer Success Manager or send us a message in the chat below. We'd be happy to help you set it up so you can receive your Zencity data in the way that works best for you.
Comments
0 comments
Article is closed for comments.