{
  "openapi": "3.1.0",
  "info": {
    "title": "Dash stats",
    "version": "1.2"
  },
  "servers": [
    {
      "url": "https://api.decodo.com/api/v2/statistics"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/targets": {
      "post": {
        "summary": "Get targets",
        "description": "",
        "operationId": "get-targets",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startDate": {
                    "type": "string",
                    "description": "Timezone is UTC. Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS",
                    "default": "2024-09-01 00:00:00"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "Timezone is UTC. Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS",
                    "default": "2024-10-01 00:00:00"
                  },
                  "proxyUsers": {
                    "type": "array",
                    "description": "A list of proxy user IDs retrieved [from here](https://help.decodo.com/api-reference/sub-users/get-sub-users) (only available for residential_proxies). Not applicable to RTC proxies (Scraping APIs)",
                    "items": {
                      "type": "string"
                    }
                  },
                  "search": {
                    "type": "string",
                    "description": "Search for specific string in targets. Minimum 3 characters. If left empty will return all targets"
                  },
                  "proxyType": {
                    "type": "string",
                    "description": "RTC proxies are Scraping APIs",
                    "default": "residential_proxies",
                    "enum": [
                      "residential_proxies",
                      "mobile_proxies",
                      "rtc_universal_proxies",
                      "rtc_universal_core_proxies",
                      "modular_scraper"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Targets"
        ]
      }
    },
    "/traffic": {
      "post": {
        "summary": "Get traffic",
        "description": "",
        "operationId": "get-traffic",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "proxyType": {
                    "type": "string",
                    "default": "residential_proxies",
                    "x-readme-id": "0.0",
                    "description": "RTC proxies are Scraping APIs",
                    "enum": [
                      "residential_proxies",
                      "mobile_proxies",
                      "rtc_universal_proxies",
                      "rtc_universal_core_proxies",
                      "modular_scraper"
                    ]
                  },
                  "startDate": {
                    "type": "string",
                    "description": "Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS",
                    "default": "2024-09-01 00:00:00",
                    "x-readme-id": "0.1"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS",
                    "default": "2024-10-01 00:00:00",
                    "x-readme-id": "0.2"
                  },
                  "proxyUsers": {
                    "type": "array",
                    "description": "A list of proxy user IDs retrieved [from here](https://help.decodo.com/api-reference/sub-users/get-sub-users) (only available for residential_proxies). Not applicable to RTC proxies (Scraping APIs)",
                    "items": {
                      "type": "string"
                    },
                    "x-readme-id": "0.3"
                  },
                  "groupBy": {
                    "type": "string",
                    "description": "Group results by. hour shows last day usage every hour, but you must have used traffic within last 2 weeks for it to show.",
                    "default": "target",
                    "enum": [
                      "day",
                      "target",
                      "country",
                      "protocol",
                      "proxy_user",
                      "hour",
                      "week",
                      "month"
                    ],
                    "x-readme-id": "0.4"
                  },
                  "targets": {
                    "type": "array",
                    "description": "A list (array) of target URLs",
                    "items": {
                      "type": "string"
                    },
                    "x-readme-id": "0.5"
                  },
                  "locations": {
                    "type": "array",
                    "description": "A list of locations to filter the results by in ISO-2 format (IT, US, ES..). Not applicable to RTC proxies (Scraping APIs)",
                    "items": {
                      "type": "string"
                    },
                    "x-readme-id": "0.6"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "How many items to return",
                    "default": 500,
                    "format": "int32",
                    "x-readme-id": "0.7"
                  },
                  "page": {
                    "type": "integer",
                    "description": "Page number to return",
                    "default": 1,
                    "format": "int32",
                    "x-readme-id": "0.8"
                  },
                  "sortBy": {
                    "type": "string",
                    "description": "Desired way to group the response by",
                    "default": "grouping_key",
                    "enum": [
                      "grouping_key",
                      "requests",
                      "totals"
                    ],
                    "x-readme-id": "0.9"
                  },
                  "sortOrder": {
                    "type": "string",
                    "description": "Sort order: ascending or descending",
                    "default": "asc",
                    "enum": [
                      "asc",
                      "desc"
                    ],
                    "x-readme-id": "0.10"
                  },
                  "protocols": {
                    "type": "array",
                    "description": "Valid protocols: http, https, socks5. Empty will return all protocols. Not applicable to RTC proxies (Scraping APIs)",
                    "items": {
                      "type": "string"
                    },
                    "x-readme-id": "0.11"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Traffic"
        ]
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "tags": [
    {
      "name": "Dash Stats",
      "description": "Dashboard statistics endpoints"
    }
  ]
}
