# Find a Company Headquarters Address via API: Easy Guide

By [Florian Martens](https://pipe0.com/authors/florian-martens) · Published Apr 8, 2025

Source: https://pipe0.com/blog/find-company-hq-with-pipe0

> Learn how to fetch a company headquarters address using an API with pipe0



In this blog post, we explore how you can generate a company headquarters address via an API endpoint.
For this, we use [pipe0](https://pipe0.com).

Pipe0 is a framework for data enrichment. To enrich data with pipe0 you use enrichment pipes.
There are several pipes available to generate a company headquarters address via API. For this blog post, we're
using the pipe [CompanyGetHQAddressGoogleMaps@1](https://www.pipe0.com/docs/pipe-catalog/company-get-hq-address-google-maps/version-1).

This pipe relies on fetching location data from Google Maps and summarizing this data with the help of an LLM.

The cost per invocation is \~1ct. per company headquarters address.

## Prerequisites [#prerequisites]

🙆🏼‍♂️ Go to [pipe0](https://pipe0.com) and create an account <br />
🔑 Create an API Key

## Request object [#request-object]

<CodeBlockTabs defaultValue="Typescript">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="Typescript">
      Typescript
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="cURL">
      cURL
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="Typescript">
    ```typescript
    const id = 1;
    const result = await fetch("https://api.pipe0.com/v1/pipes/run", {
      method: "POST",
      headers: {
        "Authorization": `Bearer <API_KEY>`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        pipes: [{ pipe_id: "company:hqaddress:googlemaps@1" }],
        input: [{id, company_website_url: "<COMPANY_URL>"}]
      })
    });

    const response = await result.json();

    // [NOT SHOWN] Poll the "/check" endpoint until the task status is "completed"
    // Learn more: https://www.pipe0.com/docs/pipeline#async-processing

    // Print description
    console.log(response.records[id].fields["hqAddress"].value);
    ```
  </CodeBlockTab>

  <CodeBlockTab value="cURL">
    ```shell
    curl -X POST "https://api.pipe0.com/v1/pipes/run" \
    -H "Authorization: Bearer API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
        "pipes": [{ "pipe_id": "company:hqaddress:googlemaps@1" }],
        "input": [{"id": 1, "company_website_url": <COMPANY_URL>}]
    }'
    ```
  </CodeBlockTab>
</CodeBlockTabs>
