Content Professor API

Introduction

The Content Professor API provides a way to integrate the article spinner, Content Professor, with your existing web application using the API code.

In this guide, you will find various methods along with examples that describe how to integrate and manage the Content Professor within your web applications. This guide assumes that you are well versed with a programming language.

Note: This API code can be used with any programming language.

The Content Professor API is written in PHP. To access it, use the HTTP GET or POST requests.

For example, you can type (or paste) the following URL in your browser: http://www.contentprofessor.com/member_free/api/test_api?format=xml&text=API

This action will perform an HTTP GET request to the API method using an application. The application itself can be written in any language that can make these requests to Content Professor API. The actions use HTTP protocol as an interface to communicate with Content Professor functionality via its API.

Code Examples

To access Content Professor API, you need to perform an HTTP GET or POST request to the URL http://www.contentprofessor.com/member_free/api/some_method_name, where some_method_name is a name of the API method you want to call.

If execution of the method is successful, the result is returned in data container with sub-containers values according to the invoked method, otherwise error container will return error code and description in code and description containers.

Note: next is a global parameter used in all methods.

ParameterDescription
version
DescriptionAPI version you want to use. If not provided the default value i.e. 1 will be used.
Default value1
Allowed values
  • 1
format
DescriptionUse this parameter to specify the format in which you want to retrieve method's result.
Default valuejson
Allowed values
  • json
  • xml

Methods



test_api

Description

Use this method to ensure API is working.

Parameters

ParameterDescription
text
DescriptionUse this value to check if the method works dynamically.
Default valueAll is working

Result

ContainerDescription
textThe same value is passed with text parameter.

Example

http://www.contentprofessor.com/member_free/api/test_api?format=xml&text=API works perfect.


get_session

Description

Use this method to get/update session id. Session id is used as a parameter in methods with authorized access.

Parameters

ParameterDescription
login
DescriptionMember login from CP account.
Required
  • Yes
password
DescriptionMember password from CP account.
Required
  • Yes

Result

ContainerDescription
sessionNew session id value.

Example

http://www.contentprofessor.com/member_free/api/get_session?format=xml&login=user_login&password=user_password


clear_session

Description

Use this method to clear the session id. After calling this function you will need to get a new session id using get_session method to invoke methods with authorized access.

Parameters

ParameterDescription
session
DescriptionCurrent session id fetched by get_session method.
Required
  • Yes

Result

This method does not return any values.

Example

http://www.contentprofessor.com/member_free/api/clear_session?format=xml&session=76c2d90b252fc2cf0474f6aaab028a44


get_limit

Description

Use this method to get the limit values of method.

Parameters

ParameterDescription
session
DescriptionCurrent session id fetched by get_session method.
Required
  • Yes
method
DescriptionMethod name to fetch limit values.
Required
  • Yes
Allowed values
  • include_synonyms
  • get_synonyms

Result

ContainerDescription
limitTotal request limit per day for a given method in the current product scope.
restThe rest from total request count for today.

Example

http://www.contentprofessor.com/member_free/api/get_limit?format=xml&session=76c2d90b252fc2cf0474f6aaab028a44&method=get_synonyms


include_synonyms

Description

Use this method to fetch text with spin format.

Parameters

ParameterDescription
session
DescriptionCurrent session id fetched by get_session method.
Required
  • Yes
text
DescriptionCustom text for inserting spin format {}.
Required
  • Yes
language
DescriptionLanguage for method operations.
Required
  • Yes
Allowed values
  • en
  • es
  • fr
  • de
  • it
limit
DescriptionMaximum count of synonyms in spin format {}.
Default value5
quality
DescriptionQuality of synonyms for method operations.
Default valueok
Allowed values
  • ok
  • better
  • ideal
removal_on
DescriptionUse current member account removal in method operations.
Default value1
Allowed values
  • 0
  • 1
synonym_set
DescriptionWhat synonyms set should be used in method operations.
Default valueglobal
Allowed values
  • my
  • global
min_words_count
DescriptionMinimum word count in a synonym phrase.
Default value1
max_words_count
DescriptionMaximum word count in a synonym phrase.
Default value7
excludes_on
DescriptionExclude member excludes from spin operations.
Default value1
exclude_stop_words
DescriptionExclude stop words from spin operations.
Default value1
protected_terms
DescriptionExclude comma separated list of stop words from spin operations.
Default value

Result

ContainerDescription
textGenerated text with spin format.

Example

http://www.contentprofessor.com/member_free/api/include_synonyms?format=xml&session=76c2d90b252fc2cf0474f6aaab028a44&language=en&text=API works perfect!


get_synonyms

Description

Use this method to fetch synonyms for custom word/phrase.

Parameters

ParameterDescription
session
DescriptionCurrent session id fetched by get_session method.
Required
  • Yes
phrase
DescriptionSearch synonyms by word/phrase.
Required
  • Yes
language
DescriptionLanguage for method operations.
Required
  • Yes
Allowed values
  • en
  • es
  • fr
  • de
  • it
limit
DescriptionMaximum count of returned synonyms.
Default value5
quality
DescriptionQuality of synonyms for method operations.
Default valueok
Allowed values
  • ok
  • better
  • ideal
removal_on
DescriptionUse current member account removal in method operations.
Default value1
Allowed values
  • 0
  • 1
synonym_set
DescriptionWhat synonyms set should be used in method operations.
Default valueglobal
Allowed values
  • my
  • global

Result

ContainerDescription
synonymsContainer with synonym subcontainers in which found synonyms are stored.

Example

http://www.contentprofessor.com/member_free/api/get_synonyms?format=xml&session=76c2d90b252fc2cf0474f6aaab028a44&language=en&phrase=hello


get_projects_ids

Description

Use this method to fetch projects ids of authorized user.

Parameters

ParameterDescription
session
DescriptionCurrent session id fetched by get_session method.
Required
  • Yes

Result

ContainerDescription
idsContainer with id subcontainers in which found ids are stored.

Example

http://www.contentprofessor.com/member_free/api/get_projects_ids?format=xml&session=76c2d90b252fc2cf0474f6aaab028a44


get_project

Description

Use this method to fetch project of authorized user.

Parameters

ParameterDescription
session
DescriptionCurrent session id fetched by get_session method.
Required
  • Yes
id
DescriptionProject id.
Required
  • Yes

Result

ContainerDescription
idid
member_idOwner id
autosavedIs a draft copy
categoryCategory
createdCreation time
modifiedLast modification time
nameName
titleTitle
bodyBody
resourceResource
keywordsKeywords
languageLanguage

Example

http://www.contentprofessor.com/member_free/api/get_project?format=xml&id=1&session=76c2d90b252fc2cf0474f6aaab028a44