---
agentTools:
  projectIndex: https://leadforensics-api.readme.io/llms.txt
---

# Countries

Returns the number of visits made by country for the date range supplied

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API Settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://interact.leadforensics.com/WebApi_v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "ClientID",
        "x-default": "45656"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization-Token",
        "x-default": "Zax4qjY5w3tmAlqJUajROgW"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/KPI/Countries": {
      "get": {
        "summary": "Countries",
        "description": "",
        "operationId": "countries",
        "parameters": [
          {
            "name": "dateid",
            "in": "query",
            "description": "The date range to return the results for (detailed in the GetDateList reference call)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"Description\": \"The number of visits made by country for the date range supplied\",\n  \"CountryList\": [\n    {\n      \"Visits\": 5,\n      \"Percentage\": 100,\n      \"CountryName\": \"United Kingdom\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Description": {
                      "type": "string",
                      "example": "The number of visits made by country for the date range supplied"
                    },
                    "CountryList": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Visits": {
                            "type": "integer",
                            "example": 5,
                            "default": 0
                          },
                          "Percentage": {
                            "type": "integer",
                            "example": 100,
                            "default": 0
                          },
                          "CountryName": {
                            "type": "string",
                            "example": "United Kingdom"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "javascript",
              "code": "$.ajax({ \n  type: 'GET', \n  dataType: 'json', \n  url: 'https://interact.leadforensics.com/WebApi_v2/KPI/countries?dateid=14', \n  headers: {\n    'Authorization-Token': 'Zax4qjY5w3tmAlqJUajROgW',\n    'ClientID':'45656'\n  },\n  success: function (data) {  \n    if (data.CountryList.length > 0) {\n      //we have a country record \n    }\n    else {\n      //we do not have a country record \n    }\n  },  \n  error: function (err) {  \n    //ajax error trap  \n  }  \n});"
            }
          ],
          "samples-languages": [
            "javascript"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "59970b303013510019572b1e:57724aaeda551f0e00be5972"
}
```