Contile API Specification

Firefox Instant Find (Contile) is a service to deliver sponsored tiles to customers on the New Browser Tab page. It's a simple service with one endpoint. It uses the User Agent's IP address (exposed via the X-Forwarded-For header) and some platform information from the User-Agent header.

Servers

Calls

Fetch Tiles

Return candidate tiles. The following user information is captured and shared with our advertising partners:

itemdescriptionderived fromnormalization method
country_codeUnicode Common Locale Data Repository (CLDR) code for the country (e.g. "US", "CA", "GB", etc.)IP addressresolved from IP address lookup database
region_codeCLDR for the major region, if available. (e.g. "VA", "BC", "KW", etc.)IP addressresolved from IP address lookup database
dmaUS based Designated Market Area (DMA) code for areas above 15K populationIP addressa configuration specified list of DMAs to ignore. If a DMA matches that list, it's not reported.
form_factorDevice form factorUserAgent stringrough form factor of the user's device normalized to "Desktop", "Phone", "Tablet" (Currently, only iPad), and "Other"
os_familyUser Operating SystemUserAgent stringrough operating system name normalized to "Windows", "MacOS", "Linux", "IOs", "Android", "ChromeOS", "BlackBerry", "Other"

Call

GET /v1/tiles

Parameters

None

Response

Returns a JSON structure containing the tile information. For example:

{"tiles":[
    {
        "id":74301,
        "name":"Amazon",
        "url":"https://...",
        "click_url":"https://...",
        "image_url":"https://...",
        "image_size":200,
        "impression_url":"...",
    },
    {
        "id":74161,
        "name":"eBay",
        "url":"https://...",
        "click_url":"https://...",
        "image_url":"https://...",
        "image_size":200,
        "impression_url":"https://...",
    }
]}

Docker Flow endpoints

As with most Mozilla Services, Contile supports Dockerflow endpoints

GET /___heartbeat__

return if the service is operational

GET /__lbheartbeat__

return if the service is available for load balancers

GET /__version__

get installed version information

In addition, the following extended Dockerflow endpoints are enabled:

GET /__error__

Force an error, used to test Sentry reporting. This has an optional parameter of with_location=true which will include detected IP location information in the Sentry error message.