Documente Academic
Documente Profesional
Documente Cultură
GENERAL
Introduction
API Brand24 was created to let Brand24 customers download to their database mentions found by
Brand24
API Domain
All API actions are available on following domains:
Basic definitions
Account – set of projects. Each account has unique ID and secret access key
Project - set of mentions found in the process of monitoring the keywords which are defined
in project
Keyword - phrase monitored by Brand24 in the Internet. Each keyword may also include
additional words – required and excluded
Terms of use
API Brand24 was created to let Brand24 customers download to their database mentions found by
Brand24. API was not created to expose mentions directly from Brand24 to all kinds of client’s
widgets (e.g. Flash controls), mobile devices etc.
You should use API Brand24 only to download mentions from Brand24 to your database. If you
want to pass mentions to your clients, widgets, mobile devices etc you should pass mentions from
your database.
Security
To access API it is required to pass in action’s parameters access key. Access key is attached to the
account and is available in Brand24 customer service.
Errors description
If an error occurs during executing API action, XML will be returned in the following form:
Each action may return different kinds of error codes, however there are some global codes, which
can appear during processing any action:
API ACTIONS
Description
It is basic and most important action. Use this action to download mentions from Brand24 to your
database.
Actions returns mentions found by Brand24 for a chosen project. Mentions are ordered by
mention’s ID asceding (from the latest to the newest).
Repeat steps 1-5 every time you want to download new mentions. The whole process shouldn’t be
executed more frequent that every 15 minutes.
URI
/api/results-
download/?key=ACCESS_KEY&sid=PROJECT_ID&rid=ID_RESULT&count=MAX_RESULTS&created_dat
e_from=RESULT_MIN_CREATED_DATE &sentiment=SENTIMENT
Parameters:
sid – project’s id
rid (optional)– mentions with ID greater than “rid” will be returned. You should pass here
the highest mention’s id of choosen project you already have in your database. See Steps 1-5
above to understand better the conecpt
count (optional) – the maximum number of results which will be returned. Default 500.
Maximum 1000
created_date_from – the minimum result created date – required date format YYYY-MM-DD
(2015-02-01).
sentiment (optional) – it filters results by the sentiment. Possible values:
o empty (default) – all
o 1 – only positive
o 2 – only negative
Response format
Description
It returns the list of account’s projects ordered by project’s ID asceding
URI
/api/projects/?aid=ACCOUNTS_ID&key=ACCESS_KEY
Parameters
aid – account’s id, given by Brand24 client service
phrases – if 1, it will also show a set of monitored phrases for each project
Response format
<projects>
<project>
<id>PROJECT’S ID</id>
<name>PROJECT’S NAME</name>
<queries>
<query>… //description of a tag „query”, see in a description of a
method/api/project-info
</project>
<project>….</project>
<project>....</project>
</projects>
Description
It returns a list of monitored keywords in a specified project. There is also given a list of required and
excluded words (if specified in project configuration). Every keyword appears as an individual tag
<query>, which can include tags <and> and <or>, which may contain required word (in tag
<contains>) or excluded word (in tag <not_contains>). There is also added attribute id to every
keyword – value necessary in project edition.
URI
/api/project-info/?sid=PROJECT_ID&key=ACCESS_KEY
Parameter
sid - id of a project defined in brand24
Response format
<project>
<id>PROJECT_ID </id>
<queries>
<query keywword="MONITORED_KEYWORD" id=”KEYWORD_ID”>
<and>
<contains>REQUIRED WORD </contains>
<not_contains>EXCLUDED WORD </not_contains>
</and>
</query>
<query keyword=”SECOND_MONITORED_KEYWORD” id=”SECOND_KEYWORD_ID”>
<!—this keyword does not include any required or excluded word, so it has no tag <and> and
<or> -->
</query>
<query>….</query> <!—next monitored keyword -->
</queries>
</project>
Description
It creates a new project to a certain account
URI
/api/project-add/
Parameter
Parameters should be sent with POST method.
key – API_KEY
phrases_relevant [ 0 ] = keyword 1
phrases_relevant [ 1 ] = keyword 2
…
phrases_relevant [ N ] = keyword N
Each position MUST refer to the table phrases_relevant and phrases_required. If you want to
attach many required words to a keyword, you should separate them with comas.
Each position MUST refer to the table phrases_relevant and phrases_excluded. If you want to
attach many excluded words to a keyword, you should separate them with comas.
Response format
<result>PROJECT_ID</result>
Description
It edits specified project (saves/correct project’s value – name, keywords, required and excluded
words). Cognately to the first step of a new project edition in a dashboard.
URI
/api/project-edit/
Parameters
Parameters should be sent by a POST method.
sid - id of a project defined in brand24
key – API_KEY
Each position MUST refer to the table phrases_relevant and phrases_required. If you want to
attach many required words to a keyword, you should separate them with comas.
Each position MUST refer to the table phrases_relevant and phrases_excluded. If you want to
attach many excluded words to a keyword, you should separate them with comas.
Response format
<result>PROJECT_ID</result>
Description
It deletes specified project, which belongs to a certain account.
URI
/api/project-delete/?sid=PROJECT_ID&aid=ACCOUNTS_ID&key= ACCESS_KEY
Parameters
sid - id of a project defined in brand24
Response format
<result>1</result>
Description
It brings out the number of mentions in a certain period for a certain project with a sentiment and
category division. The number of mentions may be given as a sum for the whole period or with a
division for days.
URI
/api/results-count/?key=ACCESS_KEY &sid=PROJECT_ID&d1=START_DAY&d2=END_DAY&group=
Parameters
sid - id of a project defined in brand24
group(optional) –if ”day” there are also numbers for particular days
Response format
<results>
<id>PROJECT_ID</id>
<date1>BEGINNING_DATE_OF_A_PERIOD_WHICH_REFERS_TO_A_REPORT</date1>
<date2> CLOSING_DATE_OF_A_PERIOD_WHICH_REFERS_TO_A_REPORT </daate2>
<result>
<day> DAY_WHICH_THE_RESULTS_REFER_TO</day>
<count>NUMBER_OF_ALL_ENTRIES </count>
<positive>NUMBER_OF_POSITIVE ENTRIES</pisitive>
<negative> NUMBER_OF_NEGATIVE ENTRIES </negative>
<neutral> NUMBER_OF_NEUTRAL ENTRIES </neutral>
<categories>
<category>
<id>CATEGORY_ID </id>
<name>CATEGORY_NAME</name>
<count>NUMBER_OF_MENTIONS_IN_A_CATEGORY</count>
<positive> NUMBER_OF_POSITIVE_MENTIONS_IN_A_CATEGORY </pisitive>
<negative> NUMBER_OF_NEGATIVE_MENTIONS_IN_A_CATEGORY </negative>
<neutral> NUMBER_OF_NEUTRAL_MENTIONS_IN_A_CATEGORY </neutral>
</category>
<category>
<id>SECOND_CATEGORY_ID</id>
<name> SECOND_CATEGORY_NAME</name>
<count>NUMBER_OF_MENTIONS_IN_A_SECOND_CATEGORY</count>
<positive> NUMBER_OF_POSITIVE_MENTIONS_IN_A_SECOND_CATEGORY </pisitive>
<negative>
NUMBER_OF_NEGATIVE_MENTIONS_IN_A_SECOND_CATEGORY</negative>
<neutral> NUMBER_OF_NEUTRAL_MENTIONS_IN_A_SECOND_CATEGORY </neutral>
</category>
</categories>
</result>
<result>
<day> SECOND_DAY_WHICH_THE_RESULTS_REFER_TO</day>
<count>NUMBER_OF_ALL_ENTRIES </count>
<positive>NUMBER_OF_POSITIVE ENTRIES</pisitive>
<negative> NUMBER_OF_NEGATIVE ENTRIES </negative>
<neutral> NUMBER_OF_NEUTRAL ENTRIES </neutral>
<categories>
<category>
<id>CATEGORY_ID </id>
<name>CATEGORY_NAME</name>
<count>NUMBER_OF_MENTIONS_IN_A_CATEGORY</count>
<positive> NUMBER_OF_POSITIVE_MENTIONS_IN_A_CATEGORY </pisitive>
<negative> NUMBER_OF_NEGATIVE_MENTIONS_IN_A_CATEGORY </negative>
<neutral> NUMBER_OF_NEUTRAL_MENTIONS_IN_A_CATEGORY </neutral>
</category>
<category>
<id>SECOND_CATEGORY_ID</id>
<name> SECOND_CATEGORY_NAME</name>
<count>NUMBER_OF_MENTIONS_IN_A_SECOND_CATEGORY</count>
<positive> NUMBER_OF_POSITIVE_MENTIONS_IN_A_SECOND_CATEGORY </pisitive>
<negative>
NUMBER_OF_NEGATIVE_MENTIONS_IN_A_SECOND_CATEGORY</negative>
<neutral> NUMBER_OF_NEUTRAL_MENTIONS_IN_A_SECOND_CATEGORY </neutral>
</category>
</categories>
</result>
</results>