EN

Access the API

1,371,405 cities · 246 countries and territories · 109 API properties, including 4 aliases (105 distinct export fields)

A free API covering a fixed dataset of 2,000 cities, with extended access by subscription.

Free: 60 requests/minute and 1,000/day/IP. Subscriptions: €3, €8 or €12/month, including CAPIT benefits. Filters and pagination never expand the fixed free worldwide dataset.

Choose my API subscriptionOpenAPI documentation

API · https://api.capit.net

  • GET /v1/cities
  • GET /v1/cities/schema
  • GET /v1/geography
  • GET /v1/cities/export
  • POST /v1/widget-token

No key for public access. Extended access uses a Bearer key created in your member area and kept on your server. For a browser, your server issues an origin-bound temporary token using POST /v1/widget-token (5 minutes).

q searches names; country uses an ISO code; bbox selects an area. Supported operators appear in /v1/cities/schema: eq, ne, in, isnull, contains, startswith, gt, gte, lt, lte, between depending on type.

fields selects comma-separated properties; sort accepts up to four fields, with - for descending order.

page starts at 1; pageSize defaults to 10 (maximum 100). Subscriber exports allow up to 1,000; nextCursor requires -population sorting and replaces page.

curl 'https://api.capit.net/v1/cities?fields=id,name,country,population&pageSize=1&lang=fr'
Actual response example
{
  "data": [
    {
      "id": "778910398",
      "name": "Shanghai",
      "country": "CN",
      "population": 24870895
    }
  ],
  "meta": {
    "total": 2000,
    "page": 1,
    "pageSize": 1,
    "totalPages": 2000,
    "hasMore": true,
    "version": "f1b40a9e97ac9c9af7d2ef6dea6b7b7bce529a4f42236ac881641768a76737d1",
    "tier": "public",
    "publicLimit": 2000
  }
}

400: invalid parameters; 401: invalid authentication; 403: insufficient rights; 429: quota reached; 503: unavailable service or expensive query.

OpenAPI · Widget · Copy HTML code

<div id="capit-villes"></div>
<script src="https://api.capit.net/assets/cities/affection-cities.js?v=mobile-filters-20261107"></script>
<script>AffectionCities.create({container:'#capit-villes',lang:'en',pageSize:10,map:true});</script>

CAPIT · API & DATA

Plans and pricing

Every subscription includes CAPIT benefits, API keys and batch exports within the plan quotas. The complete ZIP is sold separately for €5.

1,371,405 cities · 246 countries and territories

Subscription changes take effect at the next renewal. Your current plan stays available until then.

Discovery

€0

2 000 results

1 000 / day / IP · 60 / minute

Fixed worldwide selection: filtering by country does not expand it. No API key needed.

Essential

€3 / month

Tax included, monthly renewal

10,000 / dayAPI requests per account

120 / minute

Full database, advanced filters, field selection and integration on your websites.

Exports per account : 50 batches / day · 5 / minute

Choose Essential

Pro

€12 / month

Tax included, monthly renewal

100,000 / dayAPI requests per account

360 / minute

Full database, advanced filters, field selection and integration on your websites.

Exports per account : 200 batches / day · 15 / minute

Choose Pro

Confirm change

Subscription changes take effect at the next renewal. Your current plan stays available until then.

Delete your shared account?

This deletion is permanent and affects your account on all group websites: CAPIT.NET, its services, Affection.org and AffectionPlus.com. Your access and API keys will be revoked. Your Chat and Chatbot workspaces will be suspended. Service data cleanup then continues in the background.

Cancel your ongoing subscriptions before deleting your account. Deleting an account does not cancel subscriptions.