---
updatedAt: 2025-12-16T15:30:45.000Z
agentTools:
  projectIndex: https://docs.getfastah.com/llms.txt
---

# Quick Start on AWS

Getting started with the Fastah IP Geolocation & Security API on AWS Marketplace

### Signup

First off, subscribe to the [Fastah API on AWS Marketplace](https://aws.amazon.com/marketplace/pp/B084VR96P3?trk=8d276e92-b310-40ce-908f-23a198ca7ffc\&sc_channel=el\&source=fastah). Once you pick a subscription plan and billing term, you will be redirected to the [Fastah Developer Console](https://console.api.getfastah.com) to create an account and obtain an API key.

You can make your first API call once you've obtained your API key.

### Make an API call

There are two ways of building a request URL. The first style below requests information about the specified IP address and is *recommended*.  The second style lets the Fastah API backend auto-detect the client's public IP address and is helpful for client-side browser deployments that will make CORS requests.

```curl

# Requests information on a specific IP address - RECOMMENDED
curl \
        -X GET "https://ep.api.getfastah.com/whereis/v1/json/98.97.16.1" \
        -H "Fastah-Key: 638eec4613e64929aa0a4d7505b6d8cb" 
        
        
# Auto-detect caller IP, useful for client-side JavaScript in the browser
curl \
        -X GET "https://ep.api.getfastah.com/whereis/v1/json/auto" \
        -H "Fastah-Key: 638eec4613e64929aa0a4d7505b6d8cb"
```

> 📘 Get your key
>
> Make sure to configure `Fastah-Key` with your API key from the [Fastah Developer Console](https://console.api.getfastah.com/profile).

Assuming a valid API key was used and authorization went smoothly, you should see a JSON response that looks as follows.

### A sample HTTP 200 OK response

```json Response JSON
{
  "ip": "98.97.16.1",
  "isEuropeanUnion": false,
  "l10n": {
    "currencyName": "Dollar",
    "currencyCode": "USD",
    "currencySymbol": "$",
    "langCodes": [
      "en-US",
      "es-US",
      "haw",
      "fr"
    ]
  },
  "locationData": {
    "countryName": "United States",
    "countryCode": "US",
    "stateName": "New York",
    "stateCode": "NY",
    "cityName": "New York City, NY",
    "cityGeonamesId": 5128581,
    "lat": 40.71,
    "lng": -74.01,
    "tz": "America/New_York",
    "continentCode": "NA"
  },
  "satellite": {
    "provider": "SpaceX Starlink"
  }
}
```

<br />

> 📘 Understanding the response
>
> The data definitions for the JSON response are explained on the [Understanding the Response](https://docs.getfastah.com/docs/understanding-the-api-response) page

### Integration with a front-end (JavaScript) - Not recommended

If you wish to make the browser call the API using [XHR](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) or [`fetch`](https://developer.mozilla.org/en-us/docs/Web/API/Fetch_API/Using_Fetch) via JavaScript, use the examples below.

The URL path ending with `auto` tells the Fastah API backend to auto-detect the client's IP address. This works well when the API call is made from the end user's browser (XHR/fetch) or app (iOS/Android/WebView), i.e., where the clients are expected to have a public, globally-routable IP address that the Fastah API backend can infer.

```html JavaScript-with-Fetch
<script>
  // Fetch is the modern web-standard alternative to XHR
  // API path ends with 'auto' - auto-detect the client's public IP
  fetch('https://ep.api.getfastah.com/whereis/v1/json/auto', 
        { mode: 'cors',
          headers: {'Fastah-Key': '638eec4613e64929aa0a4d7505b6d8cb'}
        })
  .then(response => response.json())
  .then(data => console.log(data));
</script>
```
```html JavaScript-with-XHR
<script>
  const xhr = new XMLHttpRequest();
  // API path ends with 'auto' - auto-detect the client's public IP
  const url = 'https://ep.api.getfastah.com/whereis/v1/json/auto';
  xhr.open('GET', url);
  xhr.setRequestHeader("Fastah-Key", '<<fastah-iplocation-demo-key>>')
  xhr.onreadystatechange = someHandler;
  xhr.send();
</script>
```

#### Performance tips - browser

Consider adding `dns-prefetch`  in the HTML's `head` to make the API latency extra snappy. If you expect the API call to be made most of the time the page is loaded by the user, add  `preconnect` too to initiate a network connection pre-emptively.

For more information, see the [explanation on Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch).

```html Prefetch
<head>
    <!-- Recommended link tags to turbo-charge Fastah API latency -->
    <link rel="dns-prefetch" href="https://ep.api.getfastah.com/">
    <link rel="preconnect" href="https://ep.api.getfastah.com" crossorigin>
    <!-- and all other head elements -->
</head>
```

### Need More Help?

Drop us a line at <support@getfastah.com> with any questions, bug reports, or training requests, or if you want to chat!

### For Postman users

If you use the Postman API development tool, use the button below to open the collection in your workspace.

[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/fastah?tab=collections)