# Graph

## POST /graph

> Returns time series data restricted by query parameters passed in POST arguments.

```json
{"openapi":"3.0.0","info":{"title":"Reporting-Studio","version":"1.0.0"},"servers":[{"url":"https://api.reporting-studio.ads.sportradar.com","description":"Reporting Studio production"},{"url":"https://api.reporting-studio.staging.ads-dev.sportradar.com","description":"Reporting Studio staging"},{"url":"https://api.reporting-studio.dev.ads-dev.sportradar.com","description":"Reporting Studio development"},{"url":"http://localhost:3000/dev","description":"Local environment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"GraphRequest":{"type":"object","properties":{"granularity":{"$ref":"#/components/schemas/Dimension"},"split_by":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"}},"chart_lines":{"type":"array","items":{"type":"string","description":"An array of key field values for which Chart plots are required. Can contain the special value of 'total' to draw the Total plot. These key fields should be specified in the split_by POST argument. If the split_by POST argument contains several key fields, the values of these key fields should be separated by the START OF TEXT character with code 2, which has different representations in different systems, like '\\x02' or '\\u0002'."}},"data_field":{"$ref":"#/components/schemas/Metric"},"start_date":{"type":"string","format":"date","description":"example: 2017-07-21"},"end_date":{"type":"string","format":"date","description":"example: 2017-07-21"},"timezone":{"type":"number"},"filters":{"type":"array","items":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/Dimension"},"case_insensitive":{"type":"number","description":"1 - case-insensitive\n\n 0 - case-sensitive\n\nDefault is 0"},"search_mappings":{"type":"number","description":"Defines whether search should be performed in mappings.<br>\n0 - search should be performed in key field values only.<br>\n1 - search should be performed in both key field values and their mappings.<br>\n2 - search should be performed in key field mappings only.<br>\nThe default value is 0.\n"},"value":{"type":"array","items":{"type":"string"}},"match":{"type":"string","enum":["equals","not equals","contains","not contains","beginswith","endswith"]}},"required":["name","value","match"]}},"data_filters":{"type":"array","items":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/Metric"},"value":{"type":"string"},"match":{"type":"string","enum":["<",">","<=",">="]}},"required":["name","value","match"]}},"filter_template":{"type":"string","description":"A string template defining priorities for filters specified in the filters POST argument. <br>\nCan contain the following elements:<br>\nopening/closing parentheses<br>\nOR/AND operators<br>\nx character as a placeholder for filters<br>\nExample: x OR (x AND x).\n"},"data_filter_template":{"type":"string","description":"A string template defining priorities for filters specified in the data_filters POST argument. <br>\nCan contain the following elements:<br>\nopening/closing parentheses<br>\nOR/AND operators<br>\nx character as a placeholder for filters<br>\nExample: x OR (x AND x).\n"},"order_by":{"type":"array","items":{"type":"object","properties":{"name":{"oneOf":[{"$ref":"#/components/schemas/Dimension"},{"$ref":"#/components/schemas/Metric"}]},"direction":{"type":"string","enum":["asc","desc"]}},"required":["name","direction"]}},"limit":{"type":"number","description":"The maximum number of returned rows. The maximum number is 10,000, the default number is 30. Used only, if granularity is not a time related key field."}},"required":["granularity","split_by","chart_lines","data_field","start_date","end_date"]},"Dimension":{"type":"string","enum":["demand.advertiser_id","demand.campaign_id","demand.line_item_id","demand.holding_id","supply.page_domain","user.geo.country","user.geo.country_region","user.geo.city","demand.creative_id","demand.creative_size","supply.seller_network","user.agent.browser.name","user.agent.os.name","user.agent.device.type","supply.app_name","supply.app_id","inventory_type","demand.alternative_currency","granularity_year","granularity_quarter","granularity_month","granularity_week","granularity_day","granularity_hour","conversion_id","supply.content_type","is_fingerprinted_conv","demand.is_dco","mmp","supply.video_plcmt","supply.video_instream_position","supply.video_playback_methods","supply.video_player_skippable"],"description":"| Key                              | Description                    |\n|-----------------------------------|-------------------------------|\n| demand.advertiser_id              | Advertiser                    |\n| demand.campaign_id                | Campaign                      |\n| demand.line_item_id               | Line Item                     |\n| demand.holding_id                 | Holding                       |\n| supply.page_domain                | Page Domain                   |\n| user.geo.country                  | Country                       |\n| user.geo.country_region           | Region                        |\n| user.geo.city                     | City                          |\n| demand.creative_id                | Creative                      |\n| demand.creative_size              | Creative Size                 |\n| supply.seller_network             | SSP                           |\n| user.agent.browser.name           | Browser                       |\n| user.agent.os.name                | OS                            |\n| user.agent.device.type            | Device Type                   |\n| supply.app_name                   | App Name                      |\n| supply.app_id                     | App ID                        |\n| inventory_type                    | Inventory Type                |\n| demand.alternative_currency       | Alternative Currency          |\n| granularity_year                  | Year                          |\n| granularity_quarter               | Quarter                       |\n| granularity_month                 | Month                         |\n| granularity_week                  | Week                          |\n| granularity_day                   | Day                           |\n| granularity_hour                  | Hour                          |\n| conversion_id                     | Conversion                    |\n| supply.content_type               | Content Type                  |\n| is_fingerprinted_conv             | Fingerprint Conversion Flag   |\n| demand.is_dco                     | DCO Flag                      |\n| mmp                               | MMP                           |\n| supply.video_plcmt                | Video Placement               |\n| supply.video_instream_position    | Video In Stream Position      |\n| supply.video_playback_methods     | Video Playback Methods        |\n| supply.video_player_skippable     | Video Player Skippable        |\n"},"Metric":{"type":"string","enum":["payout.actual_adv_usd","payout.actual_adv_alternative_currency","imps","clicks","ctr","adv_ecpm","adv_ecpm_alt_currency","custom_column_20793","custom_column_20789","custom_column_20121","custom_column_25985","custom_column_44771","custom_column_58119","custom_column_20123","custom_column_25987","pixel.type.ftd","pixel.type.reg_started","pixel.type.reg_finished","pixel.type.ros","pixel.type.login","pixel.type.deposit","pixel.type.event","pixel.type.bet_placed","pixel.type.install","pixel.type.other","custom_column_25823","audience","calculated_puuid","bids","nobids","vast_starts","vast_25","vast_50","vast_7","vast_completes","pcc_amount","pvc_amount","custom_column_38427","custom_column_56314","custom_column_56318","custom_column_56368","custom_column_56446","custom_column_56447","custom_column_56448","custom_column_56449","custom_column_56450","custom_column_56451","custom_column_56452","custom_column_56453","custom_column_68919","custom_column_78339","adv_ecpc","pub_ecpc","viewable_imps","measurable_imps"],"description":"| Metric                              | Description                        |\n|--------------------------------------|------------------------------------|\n| payout.actual_adv_usd                | Media Spend (USD)                  |\n| payout.actual_adv_alternative_currency | Media Spend (Local)              |\n| imps                                | Impressions                        |\n| clicks                              | Clicks                             |\n| ctr                                 | CTR (%)                            |\n| adv_ecpm                            | eCPM (USD)                         |\n| adv_ecpm_alt_currency               | eCPM (Local)                       |\n| custom_column_20793                  | eCPA Deposit (USD)                |\n| custom_column_20789                  | eCPA Deposit (Local)              |\n| custom_column_20121                  | eCPA FTD (USD)                    |\n| custom_column_25985                  | eCPA FTD (Local)                  |\n| custom_column_44771                  | eCPA Reg started (USD)            |\n| custom_column_58119                  | eCPA Reg started (Local)          |\n| custom_column_20123                  | eCPA Reg finished (USD)           |\n| custom_column_25987                  | eCPA Reg finished (Local)         |\n| pixel.type.ftd                      | FTDs                               |\n| pixel.type.reg_started              | Reg started                        |\n| pixel.type.reg_finished             | Reg finished                       |\n| pixel.type.ros                      | Page Views                         |\n| pixel.type.login                    | Logins                             |\n| pixel.type.deposit                  | Deposits                           |\n| pixel.type.event                    | Matches                            |\n| pixel.type.bet_placed               | Conversion Amount Bet placed       |\n| pixel.type.install                  | App Installs                       |\n| pixel.type.other                    | Other Conversions                  |\n| custom_column_25823                  | Viewability (%)                   |\n| audience                            | Unique User (Cookie-based)         |\n| calculated_puuid                    | Unique User (Cookie-less)          |\n| bids                                | Bids                               |\n| nobids                              | Nobids                             |\n| vast_starts                         | Vast Start                         |\n| vast_25                             | Vast Viewed (25%)                  |\n| vast_50                             | Vast Viewed (50%)                  |\n| vast_75                             | Vast Viewed (75%)                  |\n| vast_completes                      | Vast Complete View                 |\n| pcc_amount                          | Post Click Conversions             |\n| pvc_amount                          | Post View Conversions              |\n| custom_column_38427                  | Third Party FTD                   |\n| custom_column_56314                  | Third Party Reg Start              |\n| custom_column_56318                  | Third Party Reg Finish             |\n| custom_column_56368                  | Third Party Bet Placed             |\n| custom_column_56446                  | eCPA (Third Party FTD) (Local)    |\n| custom_column_56447                  | eCPA (Third Party FTD) (USD)      |\n| custom_column_56448                  | eCPA (Third Party Reg Fin) (Local)|\n| custom_column_56449                  | eCPA (Third Party Reg Fin) (USD)  |\n| custom_column_56450                  | eCPA (Third Party Reg Start) (Local)|\n| custom_column_56451                  | eCPA (Third Party Reg Start) (USD)|\n| custom_column_56452                  | eCPA (Third Party Bet Placed) (Local)|\n| custom_column_56453                  | eCPA (Third Party Bet Placed) (USD)|\n| custom_column_68919                  | Frequency                         |\n| custom_column_78339                  | Reach                             |\n| adv_ecpc                            | eCPC (USD)                         |\n| custom_column_23353                  | eCPC (Local)                      |\n| win_rate                            | Win Rate (%)                       |\n| viewable_imps                       | Viewable Impressions               |\n| measurable_imps                     | Measurable Impressions             |\n"},"GraphResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","bad_request","timeout","access_error","internal_error"]},"mappings":{"type":"object","additionalProperties":true,"description":"This section contains optional mappings for requested chart lines."},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["status","rows","mappings"]}}},"paths":{"/graph":{"post":{"tags":["graph"],"summary":"Returns time series data restricted by query parameters passed in POST arguments.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/ads/ad-s-marketing-cloud-api/reporting-studio-api/graph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
