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

# GetBusinessesByCategory

Returns the businesses who have been assigned to the provided category identifier within the specified date range.

# 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": {
    "/Business/GetBusinessesByCategory": {
      "get": {
        "summary": "GetBusinessesByCategory",
        "description": "",
        "operationId": "getbusinessesbycategory",
        "parameters": [
          {
            "name": "categoryid",
            "in": "query",
            "description": "The unique identifier for the category that the businesses are assigned to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "datefrom",
            "in": "query",
            "description": "The date from which the businesses have visited",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateto",
            "in": "query",
            "description": "The date to which the businesses have visited",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagesize",
            "in": "query",
            "description": "Number of records to return in a page of results",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageno",
            "in": "query",
            "description": "The particular page of results to return",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"BusinessList\": [\n    {\n      \"BusinessID\": 1101281,\n      \"Name\": \"Bonafide Bones The Butcher\",\n      \"AddressLine1\": \"Landsdown Road\",\n      \"AddressLine2\": \"Willesborough\",\n      \"AddressLine3\": \"\",\n      \"Locality\": \"\",\n      \"Town\": \"Ashford\",\n      \"County\": \"Kent\",\n      \"PostCode\": \"TN7 0PZ\",\n      \"Country\": \"United Kingdom\",\n      \"Telephone\": \"01233 2349 234\",\n      \"Website\": \"http://www.bonafide-bones-the-butcher.co.uk\",\n      \"Industry\": \"Butcher\",\n      \"SICCode\": \"1123\",\n      \"Turnover\": \"12231\",\n      \"RegistrationNumber\": \"1341\",\n      \"EmployeeNumber\": \"1-20\"\n    }\n  ],\n  \"PageSize\": 5,\n  \"PageCount\": 1,\n  \"RecordCount\": 1,\n  \"CurrentPage\": 1\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "BusinessList": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "BusinessID": {
                            "type": "integer",
                            "example": 1101281,
                            "default": 0
                          },
                          "Name": {
                            "type": "string",
                            "example": "Bonafide Bones The Butcher"
                          },
                          "AddressLine1": {
                            "type": "string",
                            "example": "Landsdown Road"
                          },
                          "AddressLine2": {
                            "type": "string",
                            "example": "Willesborough"
                          },
                          "AddressLine3": {
                            "type": "string",
                            "example": ""
                          },
                          "Locality": {
                            "type": "string",
                            "example": ""
                          },
                          "Town": {
                            "type": "string",
                            "example": "Ashford"
                          },
                          "County": {
                            "type": "string",
                            "example": "Kent"
                          },
                          "PostCode": {
                            "type": "string",
                            "example": "TN7 0PZ"
                          },
                          "Country": {
                            "type": "string",
                            "example": "United Kingdom"
                          },
                          "Telephone": {
                            "type": "string",
                            "example": "01233 2349 234"
                          },
                          "Website": {
                            "type": "string",
                            "example": "http://www.bonafide-bones-the-butcher.co.uk"
                          },
                          "Industry": {
                            "type": "string",
                            "example": "Butcher"
                          },
                          "SICCode": {
                            "type": "string",
                            "example": "1123"
                          },
                          "Turnover": {
                            "type": "string",
                            "example": "12231"
                          },
                          "RegistrationNumber": {
                            "type": "string",
                            "example": "1341"
                          },
                          "EmployeeNumber": {
                            "type": "string",
                            "example": "1-20"
                          }
                        }
                      }
                    },
                    "PageSize": {
                      "type": "integer",
                      "example": 5,
                      "default": 0
                    },
                    "PageCount": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "RecordCount": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "CurrentPage": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "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/Business/GetBusinessesByCategory?categoryid=173863&datefrom=18-11-2015 00:00:00&dateto=19/11/2016 23:59:59&pagesize=5&pageno=1', \n  headers: {\n    'Authorization-Token': 'Zax4qjY5w3tmAlqJUajROgW',\n    'ClientID':'45656'\n  },\n  success: function (data) {  \n    if (data.BusinessList.length > 0) {\n      //we have a business record \n    }\n    else {\n      //we do not have a business 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:573f0fdeedc85919005a8802"
}
```