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

# /companies

Search for a company

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1",
    "title": "CoCredo RESTful API",
    "description": "The API allows users to automate CoCredo's services by providing access to credit reference data via a web service in JSON format.",
    "contact": {
      "name": "CoCredo Limited",
      "url": "https://www.cocredo.co.uk/contact"
    },
    "termsOfService": "https://www.cocredo.co.uk/about/terms-and-conditions"
  },
  "servers": [
    {
      "url": "https://apigw.cocredo.com/v1"
    }
  ],
  "paths": {
    "/companies": {
      "get": {
        "tags": [
          "Company search"
        ],
        "description": "Search for a company",
        "parameters": [
          {
            "name": "companyName",
            "in": "query",
            "description": "Company name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "countryCode",
            "in": "query",
            "description": "2-character country code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regNumber",
            "in": "query",
            "description": "Registration number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vatNumber",
            "in": "query",
            "description": "VAT number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "description": "Postcode",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "town",
            "in": "query",
            "description": "Town",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Telephone number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "officeType",
            "in": "query",
            "description": "Office type (US only)",
            "schema": {
              "type": "string",
              "enum": [
                "HeadOffice"
              ]
            }
          },
          {
            "name": "cocredoId",
            "in": "query",
            "description": "Company ID",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "description": "Customer reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "$ref": "#/components/schemas/page"
            }
          },
          {
            "name": "items",
            "in": "query",
            "description": "Items per page",
            "schema": {
              "$ref": "#/components/schemas/items"
            }
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "metadata": {
                      "$ref": "#/components/schemas/metadata"
                    },
                    "request": {
                      "$ref": "#/components/schemas/request"
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "integer",
                              "description": "records in the current page"
                            },
                            "totalCount": {
                              "type": "integer",
                              "description": "total records in all pages"
                            },
                            "list": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cocredoId": {
                                    "type": "integer",
                                    "format": "int62"
                                  },
                                  "companyName": {
                                    "type": "string"
                                  },
                                  "previousNameMatch": {
                                    "type": "string"
                                  },
                                  "companyRegNum": {
                                    "type": "string"
                                  },
                                  "primaryAddress": {
                                    "$ref": "#/components/schemas/address"
                                  },
                                  "website": {
                                    "type": "string"
                                  },
                                  "entityType": {
                                    "type": "string"
                                  },
                                  "outOfBusiness": {
                                    "type": "string",
                                    "enum": [
                                      "Y"
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "metadata": {
        "type": "object",
        "properties": {
          "datetime": {
            "type": "string",
            "format": "date-time"
          },
          "api": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "userid": {
            "type": "string"
          },
          "companyid": {
            "type": "string"
          }
        }
      },
      "request": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "PUT",
              "DELETE"
            ]
          },
          "arguments": {
            "type": "object"
          }
        }
      },
      "address": {
        "type": "object",
        "properties": {
          "addressType": {
            "type": "string"
          },
          "addressString": {
            "type": "string"
          },
          "address1": {
            "type": "string"
          },
          "address2": {
            "type": "string"
          },
          "address3": {
            "type": "string"
          },
          "town": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "postcode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          }
        }
      },
      "page": {
        "type": "integer",
        "minimum": 1,
        "default": 1
      },
      "items": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "default": 20
      }
    },
    "responses": {
      "error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/metadata"
                },
                "request": {
                  "$ref": "#/components/schemas/request"
                },
                "response": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "accessToken": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "To sign into the API call the /token endpoint to exchange your permanent API key and secret into a temporary security token. Put that token into the Authorization header when making any data requests. No need to prepend the token with words like Basic, Bearer, etc. The token expires after an hour."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 169,
      "2": 250,
      "3": 193,
      "4": 175,
      "5": 166,
      "6": 115,
      "7": 0,
      "8": 68,
      "9": 165,
      "10": 135,
      "11": 47
    }
  }
}
```