How can we help you?

Content Activation API - Request Types (Site, Page level, Mobile app)

 

Comscore's Activation API supports the following request types:

URL Data

To request page-level data for a URL, the encoded string of the URL should passed as value to the "url" parameter. https://contextual-api.comscore.com/content/segment.json?dkey=<KEY_PROVIDED_BY_COMSCORE>&url=<ENCODED_URL>

Responses are returned as a JSON object with the following attributes:

  • "scope":  page or site. The scope indicates if the segments correspond to the web page or the web site.
  • "segments": A 0+ length array of unique alphanumeric IDs of applicable contextual segments, including both predefined segment IDs and custom Agent IDs

 

If the URL has not yet been crawled, the API returns segments based on the sum profile of the domain of the passed URL. This is indicated as "site" in the attribute "scope" of the response.

The request for uncrawled page is asynchronously forwarded to a processing layer which initiates the crawling and processing of the URL's content. Subsequent requests for this URL will return page-level results once it has been downloaded and processed.

The URL string should be encoded and always start with the proper protocol like "http://" or "https://".

The average processing time for uncached URLs is 2-3 seconds mostly depending on

  • the performance of the publishing host (actual download of the page's content), and
  • potential spider rate limitations (robots.txt).

The back-end process to generate the segments takes a couple of milliseconds.

Response Format - Page-Level

 

Responses are returned as a JSON object with the following attributes:

  • "scope": "page"
  • "segments": A 0+ length array of unique alphanumeric IDs of applicable contextual segments for the page, including both predefined segment IDs and custom Agent IDs

Response Format - Site-Level

Responses are returned as a JSON object with the following attributes:

  • "scope":  site.
  • "segments": A 0+ length array of unique alphanumeric IDs of applicable contextual predefined segments for the site

 

 

 

Error Segments

There are two segment IDs returned by the API that indicate an error:

Transient errors have an expiration date of x + 30 seconds while permanent errors have an expiration date of x + 3 days.

 

Mobile App Data

To request data for mobile apps, pass the application ID to the API using the "app_id" parameter:

The application IDs for iOS are numeric strings like "123456789" while Android apps follow the pattern "com.domain.appname".

 

For yet unknown apps the API will return an error response. Asynchronous requests will then be forwarded to our processing layer to retrieve and process the app’s content. Subsequent requests for this app will return page-level results once it has been processed.

Response format for mobile apps is same as the response for URL except there is no site level response.

Was this article helpful?
0 out of 0 found this helpful

 

0 Comments

Article is closed for comments.

 

Powered by Zendesk