> ## Documentation Index
> Fetch the complete documentation index at: https://lava.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Geocodio

> Address geocoding and reverse geocoding API focused on U.S. and Canadian addresses with census data appends.

Address geocoding and reverse geocoding API focused on U.S. and Canadian addresses with census data appends. Best for North American address resolution workflows — converting addresses to coordinates and enriching locations with congressional districts, census tracts, and timezone data. Unlike Google Maps (global, broad), Geocodio specializes in U.S./Canada with deeper census-level data appends.

4 endpoints available through Lava's AI Gateway. See the [Geocodio API docs](https://www.geocod.io/docs/) for full documentation.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Endpoints

### Geocode an address to coordinates

**GET** `https://api.geocod.io/v1.7/geocode?q=1109+N+Highland+St+Arlington+VA` — \$0.002 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.geocod.io/v1.7/geocode?q=1109+N+Highland+St+Arlington+VA', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.geocod.io%2Fv1.7%2Fgeocode%3Fq%3D1109%2BN%2BHighland%2BSt%2BArlington%2BVA" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Batch geocode addresses

**POST** `https://api.geocod.io/v1.7/geocode` — \$0.002 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.geocod.io/v1.7/geocode', { body: {"addresses":["1109 N Highland St, Arlington, VA"]} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.geocod.io%2Fv1.7%2Fgeocode" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"addresses":["1109 N Highland St, Arlington, VA"]}'
    ```
  </Tab>
</Tabs>

### Reverse geocode coordinates to an address

**GET** `https://api.geocod.io/v1.7/reverse?q=38.886672,-77.094735` — \$0.002 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.geocod.io/v1.7/reverse?q=38.886672,-77.094735', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.geocod.io%2Fv1.7%2Freverse%3Fq%3D38.886672%2C-77.094735" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Batch reverse geocode coordinates

**POST** `https://api.geocod.io/v1.7/reverse` — \$0.002 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.geocod.io/v1.7/reverse', { body: {"locations":["38.886672,-77.094735"]} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.geocod.io%2Fv1.7%2Freverse" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"locations":["38.886672,-77.094735"]}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
