# Company Lookup Query

### Query Overview

The Company From Hash query allows a company to be looked up by it's hash and returns the following information:

* Company ID
* Company Name
* Company City State Zip (as one field)
* Country
* Whether or not the company is a leader (takes an input of a month range in the following format `{ start: "YYYY-MM", end: "YYYY-MM" }`&#x20;
* Primary Image Source

<details>

<summary>Example query</summary>

{% code title="GraphQL query" %}

```graphql
query { 
  companyFromHash(input: {
    hash: "COMPANY_HASH_GOES_HERE"
  }) { 
    id 
    name 
    cityStateZip 
    country
    isLeader(input: { start: "2022-01", end: "2022-12" })
    primaryImageSrc
  } 
}
```

{% endcode %}

{% code title="JSON response" %}

```json
{
  "data": {
    "companyFromHash": {
      "id": 13320794,
      "name": "Generic Company",
      "cityStateZip": "Hartland, WI 53029-0020",
      "country": "United States",
      "isLeader": true,
      "primaryImageSrc": "https://p1-cms-assets.imgix.net/files/base/p1/all/image/2020/12/example.png"
    }
  }
}
```

{% endcode %}

</details>
