# Company Data API Introduction

The Craft Company Data API is a [GraphQL](/about-graphql.md) 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](/error-handling.md).

{% content-ref url="/pages/-LsX\_6M-Hp0Cc254nTce" %}
[Getting started with Python](/company-data-api/getting-started/data-api-python.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LtOrhv61wU13E2FcJFW" %}
[Getting started with cURL](/company-data-api/getting-started/data-api-curl.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.craft.co/company-data-api/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
