# Company Data API Introduction

The Craft Company Data API is a [GraphQL](https://docs.craft.co/about-graphql) API build over HTTP and SSL.

GraphQL makes it possible to make a single API call to fetch all of the information on a particular company you need.

In order to make an API call, you need to send a `POST` request to the Company Data API endpoint:

```http
POST https://api.craft.co/v1/query
```

In order to receive the GraphQL schema, you would do a `POST` request:

```http
POST https://api.craft.co/v1/schema
```

A GraphQL POST request should use the `application/json` content type, have the `x-craft-api-key` header with your API Key in the value , and include a JSON-encoded body of the following form:

```javascript
{
  "query": "...",
  "variables": { "myVariable": "someValue", ... }
}
```

{% hint style="info" %}
In order to receive an API key please reach out to <sales@craft.co>
{% endhint %}

Query parameters should be sent as a **JSON-encoded string** in an additional query parameter called `variables`.

`query` is a required **String** parameter of the JSON body. An example would be:

```graphql
query getCompany($domain: String!) {
    company(domain: $domain) {
        locations {
            city
            country
        }
    }
}
```

`variables` is a required **JSON object** parameter for most of the cases. An example would be:

```javascript
{ "domain": "meta.com" }
```

### Response

Regardless of the method by which the query and variables were sent, the response should be returned in the body of the request in JSON format.

A query might result in some data and some errors, and those should be returned in a JSON object of the form:

```javascript
{
  "data": { ... },
  "errors": [ ... ]
}
```

If there were no errors returned, the `"errors"` field will not present on the response. [Check out more details on errors](https://docs.craft.co/error-handling).

{% content-ref url="getting-started/data-api-python" %}
[data-api-python](https://docs.craft.co/company-data-api/getting-started/data-api-python)
{% endcontent-ref %}

{% content-ref url="getting-started/data-api-curl" %}
[data-api-curl](https://docs.craft.co/company-data-api/getting-started/data-api-curl)
{% endcontent-ref %}
