Child pages
  • API Interface
Skip to end of metadata
Go to start of metadata

Summary

RTC consists of a request to contextualize a page and a corresponding response.  RTC exposes contextual resources through an interface located at the host cx.contextweb.com.   The output of the response comes in the form of JSON .  

A client can use this interface to categorize/value their inventory or to determine the appropriate ad to serve or for any other reasons when it is important to determine page-level content.  In all cases, RTC response is in real-time.  ContextWeb contextual technology and RTC has been specifically designed to minimize the impact of contextualization on the user experience.  As a result, the overall processing time is on the order of milliseconds.

RTC Request

Request Attributes

RTC Requests are made via HTTP. Here is a brief description of the HTTP call.

Attribute

Description

Host Name

cx.contextweb.com

HTTP Verb

GET

Query String

cwurl for the input url to categorize

Authentication

HTTP Basic Auth

Icon

Credentials are given during registration

Encoding

It is preferred that the URL is encoded to ensure accuracy

Example

Here is an example of a RTC request.

RTC Response

Data type

Both positive and negative responses have JSON data format.

All RTC responses have the same format and they are returned as mime-type "application/json" as JSON.

Response Types

The response to the request can be either

  • Positive (successful contextualization)
  • Negative (page cannot be contextualized or a request cannot be processed within the timeout  period). See Appendix C for error codes.
Response keys

Key

Value

URL

The URL sent in the request from the request key 'cwurl'

ContentLength

The size of the source document retrieved in bytes

FetchDuration

The amount of time in milliseconds required to retrieve the source document

Channels

An array containing up to 5 contextual channels, from highest to lowest (see notes in Positive Response section)

Id

The contextual category numerical ID (see Appendix A )

PathIds

The hierarchy of contextual categories, pipe delimited, from least to most granular (see Appendix A )

LanguageId

The numerical language ID determined by the contextualizer (see Appendix B )

UnconStatus

The numerical status code providing the reason why a page was not contextualized (see Appendix C
Note: This key will only appear if a page is uncontextualized.

Example

Anatomy of a positive and negative response in the links below.

  • No labels