GET /autocomplete/location

Autocomplete Locations

Search and autocomplete Crunchbase location entities by city, region, or country for use in search filters.

Crunchbase Data API

Search for location entities on Crunchbase using fuzzy matching. Use this endpoint to resolve location names to their Crunchbase slugs, which you can then pass as filters to search endpoints like company-search, person-search, or location-search.

HTTP Request

1
GET /autocomplete/location

Parameters

ParameterTypeRequiredDefaultDescription
qstringYesLocation search query (partial or full name)
typestringNoFilter by location type: city, region, or country
limitintegerNoMaximum number of results to return

Response

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
  "status": true,
  "request_id": "a27a842f-e40e-f30e-98b9-d318d72c",
  "data": {
    "q": "san franc",
    "results": [
      {
        "name": "San Francisco",
        "slug": "san-francisco-california",
        "uuid": "528f5e3c-90d1-1111-5d1c-2e4ff979d58e",
        "location_type": "city"
      },
      {
        "name": "San Francisco",
        "slug": "san-francisco-islas-baleares",
        "uuid": "d23efed4-d10e-2de4-0f2f-c5f04e9ec091",
        "location_type": "city"
      }
      // ... more items
    ],
    "total": 25
  },
  "request_params": {
    "q": "san franc",
    "type": "city",
    "limit": "3"
  }
}

Response Fields

FieldTypeDescription
statusbooleanWhether the request was successful
request_idstringUnique identifier for the request
data.qstringEcho of the search query
data.resultsarrayList of matching location entities
data.results[].namestringDisplay name of the location
data.results[].slugstringLocation slug — use this as a filter value in search endpoints
data.results[].uuidstringCrunchbase UUID of the location
data.results[].location_typestringType of location: city, region, or country
data.totalintegerTotal number of matching locations
request_paramsobjectEcho of the parameters sent in the request
request_params.qstringThe search query that was used
request_params.typestringThe type filter that was applied
request_params.limitstringThe limit that was applied

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import requests

url = "https://crunchbase-extractor-full-api3.p.rapidapi.com/autocomplete/location"

params = {
    "q": "san francisco",
    "type": "city",
    "limit": "5"
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "crunchbase-extractor-full-api3.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()["data"]

print(f"Found {data['total']} locations matching '{data['q']}':\n")

for location in data["results"]:
    print(f"{location['name']} ({location['location_type']})")
    print(f"  Slug: {location['slug']}\n")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const url = "https://crunchbase-extractor-full-api3.p.rapidapi.com/autocomplete/location";

const params = new URLSearchParams({
  q: "san francisco",
  type: "city",
  limit: "5",
});

const response = await fetch(`${url}?${params}`, {
  method: "GET",
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "crunchbase-extractor-full-api3.p.rapidapi.com",
  },
});

const { data } = await response.json();

console.log(`Found ${data.total} locations matching '${data.q}':\n`);

data.results.forEach((location) => {
  console.log(`${location.name} (${location.location_type})`);
  console.log(`  Slug: ${location.slug}\n`);
});
1
2
3
4
5
6
curl -G "https://crunchbase-extractor-full-api3.p.rapidapi.com/autocomplete/location" \
  --data-urlencode "q=san francisco" \
  --data-urlencode "type=city" \
  --data-urlencode "limit=5" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: crunchbase-extractor-full-api3.p.rapidapi.com"
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI