Frequently Asked Questions


This page has the objective of clearing out questions you may have about using the API. All of them are technical - if you have business questions regarding subscription etc, please reach your representative in YouGov.

Analyses

Why can't I export an analysis by UUID?

This is because exporting an analysis requires more than just the analysis itself - it also requires, for example, defining whether the export should follow the moving average or replace by single-day scores.

But using this endpoint is quite easy: your API client just needs to get the analysis definition by UUID, then build a request to the export endpoint based on that definition.

Why are there "analyses" and "rankings" endpoints?

This is because the data we use was designed in such a way that regular analyses and rankings are very different in structure, so we historically have been using separate endpoints for them. We do merge them as "Analyses" in the UI however to make things simple for UI users.

Filters

Can I mix different filters in an analysis query?

Yes, you can! The filters field is a list of filters where each item can be any of the possible filters defined in the schema.

How do filters get used together? What is the logic there?

The filters list is used with an "AND" logic - which means, when the data is being fetched, the responses must match all of the filters in the list.

Inside each filter, however, the logic is that one of the values defined must match, but any of them will do. This means the logic for values inside a filter follows the "OR" logic.

I see a "FilterExpression" schema there, how do I build expressions?

Unless you really know what you're doing, we recommend you use the other filters instead. Those expressions follow a Python-like syntax, and are a bit complex to build.

However, this syntax is the same used when BrandIndex builds responses for composite filters, so if you want to experiment with filter expressions you can start by using the "Filter Builder" feature in the UI, build some composite filters there, and then use the /filters/composite/{UUID} GET endpoint to get the composite filter you want, and then you'll be able to see the expressions used in the responses to understand how they're built.

If your client passes along an invalid filter expression when running an analysis, it will simply get an HTTP 400 Bad Request error response back.

Taxonomies

Can I have a custom sector that is composed by sectors instead of brands?

No. Custom sectors can only be composed by brands, via the UI custom sector builder.