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

# Job Search Locations

> Autocomplete countries, regions, states, and cities for Job Search.

# Job Search Locations

Location autocomplete for [Job Search](https://leadmagic.io/docs/v1/reference/job-search.md). Resolve country, region, state, and city candidates into canonical IDs for exact geo filtering.

## Endpoint Details

> [tab] Pricing
>
> | Metric | Value |
> | - | - |
> | **Cost** | **FREE** — 0 credits per request |
>
> > [!TIP]
> >
> > Location autocomplete is free across all four location types (country, region, state, city).

> [tab] Rate Limits
>
> | Metric | Value |
> | - | - |
> | **Requests/Minute** | 300 |
> | **Burst Capacity** | \~5 requests/second |
>
> > [!NOTE]
> >
> > Rate limits are subject to change. Contact us for enterprise plans — [support@leadmagic.io](mailto:support@leadmagic.io).

***

## Quick Example

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl 'https://api.leadmagic.io/v3/jobs/search/locations?type=country&q=United&limit=10' \
  -H 'X-API-Key: YOUR_API_KEY'
```

```javascript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
const url = new URL('https://api.leadmagic.io/v3/jobs/search/locations');
url.searchParams.set('type', 'country');
url.searchParams.set('q', 'United');
url.searchParams.set('limit', '10');

const response = await fetch(url, {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data.locations);
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import requests

response = requests.get(
    'https://api.leadmagic.io/v3/jobs/search/locations',
    headers={'X-API-Key': 'YOUR_API_KEY'},
    params={'type': 'country', 'q': 'United', 'limit': 10}
)
data = response.json()
print(data['locations'])
```

***

## Request Parameters

**q** `string`

Free-text location query (e.g. `United`, `Berlin`, `California`).

**type** `string`

Location type to search. One of `country`, `region`, `state`, or `city`.

**limit** `integer` (default: 10)

Number of location candidates to return.

***

## Response

**locations** `object[]`

Matching locations with `id`, `name`, and `type`.

### Example Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "locations": [
    { "id": 840, "name": "United States", "type": "country" },
    { "id": 826, "name": "United Kingdom", "type": "country" }
  ]
}
```

***

## Related endpoints

> [card] [Job Search](https://leadmagic.io/docs/v1/reference/job-search.md)
>
> Pass resolved `location.countries / regions / states / cities` into search.

> [card] [Job Country (Legacy)](https://leadmagic.io/docs/v1/reference/job-country.md)
>
> Legacy v1 country list — prefer this v3 helper for new integrations.

> [card] [Job Regions (Legacy)](https://leadmagic.io/docs/v1/reference/job-regions.md)
>
> Legacy v1 region list.

> [card] [Job Search Helpers](https://leadmagic.io/docs/v1/reference/job-search-helpers.md)
>
> Index of all filter helpers.


## OpenAPI

````yaml get /v3/jobs/search/locations
openapi: 3.1.0
info:
  title: LeadMagic API
  version: 1.4.34
  description: >
    # LeadMagic API Documentation


    The LeadMagic API provides comprehensive B2B data enrichment services
    including email validation, email finding, profile search, company
    intelligence, and more.


    ## Quick Start


    1. Get your API key from the [LeadMagic Dashboard](https://app.leadmagic.io)

    2. Add the `X-API-Key` header to all requests

    3. Start enriching your data!


    ## Base URL


    All API requests should be made to: `https://api.leadmagic.io`


    ## Rate Limits


    Each endpoint has specific rate limits (requests per minute). Exceeding
    limits returns a `429 Too Many Requests` response.


    ## Credits


    API calls consume credits based on the endpoint used. Check your balance
    with the `/v1/credits` endpoint.


    ## Support


    Contact us at support@leadmagic.io for assistance.
  contact:
    name: LeadMagic Support
    email: support@leadmagic.io
    url: https://leadmagic.io
  termsOfService: https://leadmagic.io/legal/terms
servers:
  - url: https://api.leadmagic.io
    description: Production API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Credits
    description: Manage and check your credit balance
  - name: Analytics
    description: >-
      Monitor your API usage with comprehensive analytics endpoints (FREE - no
      credits consumed)
  - name: People Enrichment
    description: Find and validate contact information for individuals
  - name: Company Data
    description: Discover company information and intelligence
  - name: Jobs Data
    description: Search job listings and detect career changes
  - name: Ads Data
    description: Search advertising data across platforms
paths:
  /v3/jobs/search/locations:
    get:
      tags:
        - Jobs Data
      summary: Job Search Locations Helper
      description: Country, region, state, and city autocomplete for exact geo filters.
      operationId: job-search-locations
      parameters:
        - name: q
          in: query
          example: United
          schema:
            type: string
        - name: type
          in: query
          example: country
          schema:
            type: string
            enum:
              - country
              - region
              - state
              - city
        - name: limit
          in: query
          example: 10
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: Location helper results
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your LeadMagic API key. Header name is case-insensitive (X-API-Key,
        X-API-KEY, x-api-key all work).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.