> ## 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](/docs/v1/reference/job-search). Resolve country, region, state, and city candidates into canonical IDs for exact geo filtering.

## Endpoint Details

<Tabs>
  <Tab title="Pricing" icon="coins">
    | Metric   | Value                            |
    | -------- | -------------------------------- |
    | **Cost** | **FREE** — 0 credits per request |

    <Tip>
      Location autocomplete is free across all four location types (country, region, state, city).
    </Tip>
  </Tab>

  <Tab title="Rate Limits" icon="gauge">
    | Metric              | Value               |
    | ------------------- | ------------------- |
    | **Requests/Minute** | 300                 |
    | **Burst Capacity**  | \~5 requests/second |

    <Info>
      Rate limits are subject to change. Contact us for enterprise plans — [support@leadmagic.io](mailto:support@leadmagic.io).
    </Info>
  </Tab>
</Tabs>

***

## Quick Example

<CodeGroup>
  ```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'])
  ```
</CodeGroup>

***

## Request Parameters

<ParamField query="q" type="string">
  Free-text location query (e.g. `United`, `Berlin`, `California`).
</ParamField>

<ParamField query="type" type="string">
  Location type to search. One of `country`, `region`, `state`, or `city`.
</ParamField>

<ParamField query="limit" type="integer" default="10">
  Number of location candidates to return.
</ParamField>

***

## Response

<ResponseField name="locations" type="object[]">
  Matching locations with `id`, `name`, and `type`.
</ResponseField>

### 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

<CardGroup cols={2}>
  <Card title="Job Search" icon="briefcase" href="/docs/v1/reference/job-search">
    Pass resolved `location.countries / regions / states / cities` into search.
  </Card>

  <Card title="Job Country (Legacy)" icon="globe" href="/docs/v1/reference/job-country">
    Legacy v1 country list — prefer this v3 helper for new integrations.
  </Card>

  <Card title="Job Regions (Legacy)" icon="map" href="/docs/v1/reference/job-regions">
    Legacy v1 region list.
  </Card>

  <Card title="Job Search Helpers" icon="wand-magic-sparkles" href="/docs/v1/reference/job-search-helpers">
    Index of all filter helpers.
  </Card>
</CardGroup>


## 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).

````