Bien'ici API workflow: search a town, then follow one listing
A search finds the candidates, and a listing call follows one of them over time.
- Call
bienici-searchwithbody.transaction, the town inbody.cityand the filters you need. - Keep the
ad_idof each row worth following, together with itspriceandupdated_at. - Call
bienici-listinglater with thatad_idasbody.ad_id. - Compare the new
priceandupdated_atwith the stored ones, and readprice_has_decreasedto see whether the price has dropped.
The listing call needs no search, so an ad URL copied from a browser works in body.ad_id just like a stored id. Rows and single listings carry the same fields, so one parser reads both.
Watch a town for newly published listings
To follow what a town publishes:
- Search with
body.sortset tonewest, the town inbody.cityand the transaction you follow. - Store the
ad_idof every row you have read. - Repeat the search later and open only the rows whose
ad_idis new. - Read
published_atto date each new row.
Adding body.zipcode narrows the watch to one postcode. In a town with several postcodes, continue a postcode search through body.page_token, which takes the next_page_token of the previous page.
Keyword scans with a continuation token
To find listings that mention a word such as terrasse:
- Set
body.queryto the keywords, and addbody.transactionand the town. - Read
listingsandtext_match, wherescannedandmatchedshow how many results were examined and how many matched. - While
has_moreshows more results, send thenext_page_tokenasbody.page_tokenin the next call. - Stop when
has_moreshows no more results or when you hold enough rows.
A keyword search leaves total null, so a loop cannot size the job from it and follows has_more instead. All the keywords must appear in a title or description, so adding a word narrows the matches.
Compare price per m² across postcodes
To compare the neighbourhoods of one city:
- Run one
bienici-searchper postcode, withbody.zipcode,body.transactionset tosaleand the samebody.property_typeeach time. - Add
body.surface_minandbody.surface_maxso that the rows of every postcode share one size window. - Collect
price_per_m2insidepropertyfor each row of a postcode and compare the postcodes on that figure. - Set aside the rows whose
price_is_fromshows a from-price, because a from-price is a starting figure rather than a fixed one.
Each postcode is paged on its own, within the first 2,500 results of its search, so read pages until has_more shows no more results.
Read the rent breakdown of a rental search
For rentals set body.transaction to rent, and body.price_min and body.price_max then bound the monthly rent with service costs included. To read the breakdown of a row:
- Read
rent_excluding_chargesfor the rent andmonthly_chargesfor the service costs. - Read
charges_includedto learn whether the rent figure already contains the service costs. - Read
security_depositandrental_feesfor the deposit and the fees of the lease. - Read
rent_controlfor the rent control details of the home.
Fees paid to the agency show in agency_fees_paid_by and agency_fees_pct, and price_excluding_fees gives the price without them.
Show a listing on a map with its photos
To place a listing on a map and show its pictures:
- Read
latitudeandlongitudeinsidelocationfor the map position. - Read
coordinates_precisionandcoordinates_radius_mto learn how precise that position is before drawing a pin. - Show
thumbnailin result lists and theimagesarray on a detail view, whereimage_counttells how many photos exist. - Read
descriptionfor the text of the advertisement andvirtual_tour_urlfor a virtual tour link.
Rows from bienici-search carry the same fields, so a map of search results needs no extra call per row.
Bien'ici explained
French property ads describe energy performance and size with a few fixed terms. The DPE, short for diagnostic de performance énergétique, rates a dwelling from A, the most efficient, to G, the least efficient, from its estimated annual energy use per m², and a separate GES class rates greenhouse gas emissions on the same A to G scale. Size is counted in pièces, the main rooms: a T3, also written F3, has a living room and two bedrooms, and kitchens, bathrooms and toilets are not counted.
[
{
"body": {
"transaction": "sale",
"city": "Lyon",
"property_type": ["apartment"],
"price_max": 450000,
"surface_min": 40,
"rooms_min": 2,
"sort": "newest",
"limit": 24
}
},
{
"body": {
"ad_id": "ag691943-549827780"
}
}
]{
"body": {
"transaction": "rent",
"city": "Lyon",
"query": "terrasse",
"price_max": 1500,
"limit": 50
}
}{
"body": {
"transaction": "sale",
"zipcode": "69003",
"property_type": ["apartment", "house"],
"surface_min": 50,
"surface_max": 120,
"new_build": false,
"sort": "price_asc",
"page": 1,
"limit": 50
}
}Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/bienici/bienici-listing' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"ad_id":"ag691943-549827780"}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
Bien'ici API overview and prices · Read the API reference · Try it in the playground