Skip to content
Documentation menu

Count companies

How many companies match the filters, with no rows returned and no budget spent. Exact up to 100 000; above that an estimate, and exact is false.

GEThttps://findbytown.com/api/v1/businesses/countNo quota

Parameters

NameTypeDescription
countrystringTwo-letter country code, such as FR. See GET /countries.
zonestringZone slug, such as fr_idf. See GET /zones.
citystringTown name in any language: Cologne also finds Köln.
nearstringRadius search as lon,lat,km, up to 200 km. Only companies with a real location match.
nearNamestringName of the place in near: companies with no exact location match when their own address names it.
postcodestringStart of a postcode: 75011, or just 75 for all of them. Up to 4, separated by commas.
deptstringFrench department code, such as 69 for the Rhône.
polystringPolygon as "lon lat" vertices separated by semicolons, 3 to 60 vertices.
qstringKeywords, up to 6 words, matched across name, description, address and categories. A domain matches only when typed whole.
categorystringBroad category slug. See GET /categories.
tradestringTrade key, a family of related categories. See GET /categories.
gcatstringOne exact listed category, ignoring case.
providerown_smtp | google | microsoft | yahoo | invalid | unknownMail provider family of the company.
providerDetailstringExact mail provider name, ignoring case.
hasPhonebooleantrue: only companies with a phone number on file.
noPhonebooleantrue: only companies with no phone number on file.
hasContactsbooleantrue: only companies with named contacts.
noContactsbooleantrue: only companies with no named contacts.
hasOtherEmailsbooleantrue: only companies with more than one email address.
qminintegerLowest quality score, 0 to 100.
qmaxintegerHighest quality score, 0 to 100.
precisionstringComma list of location precisions: exact, city, region, country.
approxbooleanfalse: only companies with an exact location. Default true.
minRatingnumberLowest rating, 0 to 5.
minReviewsintegerLowest number of reviews.
sizeClassPME | ETI | GERegistry size class. Registry facts are only known for some French companies.
headcountstringOne registry headcount band as stored, such as 20-49.
minHeadcountintegerLowest registry headcount: a company counts from the bottom of its band.
minRevenuenumberLowest registry revenue, in euros.
legalFormstringRegistry legal form, ignoring case.
sortquality | distance | rating | reviewsOrder of results. distance needs near.

Examples

curl "https://findbytown.com/api/v1/businesses/count?country=FR&trade=plumber" \
  -H "Authorization: Bearer fbt_EXAMPLE_not_a_real_key_0000"

Response

Example with fake values:

{
  "data": {
    "count": 128,
    "exact": true,
    "withEmail": 96,
    "withPhone": 110,
    "withContacts": 12,
    "wellRated": 40
  }
}

Errors

CodeHTTP statusMeaning
validation_error400A parameter is missing or has the wrong form. details names it.
unknown_parameter400A query parameter is not one this endpoint knows, usually a typing mistake. details names it.
use_reveal_endpoint400You sent reveal= on a read. Reads never spend quota: use the reveal endpoint.
missing_api_key401No Authorization header, or an empty one.
invalid_api_key401The key does not exist or has been revoked.
plan_without_api403The account's current plan does not include the API. Applies from the moment a plan ends.
suspended403The account is suspended. Its keys start working again if the suspension is lifted.
rate_limited429Too many requests this minute. Wait for the number of seconds in Retry-After.
blocked429Access to company data is temporarily paused because of automated use, such as walking through ids. Retry-After gives the time left. Write to support if this is a mistake.
internal_error500Something went wrong on our side. Quote requestId when writing to support.

Back to findbytown