prona

OpenAPI 3.1.0 · v0.1.0

API për zhvilluesit

I gjithë tregu i pronave në Shqipëri, i normalizuar, me çmim për m² dhe koordinata. E njëjta bazë që shërben faqen - e lexueshme, vetëm për lexim.

Bazë

https://pronatirana.com

HTTPS, vetëm GET (përveç njoftimeve). Përgjigjet janë JSON.

Çelësi

X-API-Key: YOUR_KEY

Çdo pikë kërkon çelës. Pa të marrni 401. Çelësat jepen për partner - shkruajini dhe thoni kush jeni dhe çfarë ndërtoni.

Kufijtë

429 + Retry-After

Çdo çelës ka buxhetin e vet. Kur mbaron, prisni sa thotë Retry-After.

Një kërkesë

pesë prona në shitje në Tiranë
curl -s 'https://pronatirana.com/api/search?deal=sale&city=tirane&per_page=5' \
  -H 'X-API-Key: YOUR_KEY'

Çfarë mund të bëni me të dhënat

Të dhënat e nxjerra janë tonat - konvertimi në euro, çmimi për m², grupimi i dublikatave, medianat e lagjeve. Përdorini lirisht, me atribuim.

Teksti dhe fotot jo - titullin, përshkrimin dhe fotografitë i zotëron portali që i publikoi. Citoni dhe lidhni te shpallja origjinale; mos i ribotoni të plota.

Kontakti shkon te burimi - çdo rresht mban source dhe url. Përdoruesi duhet të përfundojë te portali që e publikoi.

Pa ndërmjetësim - nuk marrim komision dhe nuk ndërmjetësojmë. Asgjë e ndërtuar mbi këtë API nuk duhet të lërë të kuptohet e kundërta.

Kërkimi

Pika kryesore. Një pronë është një rresht, edhe kur e kanë shpallur tre portale.

GeoJSON for the map. Lighter than /api/search: no descriptions, no facets, and a higher cap, because a map viewport wants many pins rather than one page of cards.

21 parametra ▾
ParametriTipiÇfarë bën
dealstringsale · rent

sale or rent. Omit for both.

citystring

City slug, as /api/locations lists it - tirane, durres, vlore. Administrative units are folded into their city, so a flat in Kashar is returned for tirane.

qstringmax 120 chars

Free text over the title, address, city and neighbourhood. Accent-insensitive: Sarande and Sarandë match the same listings, as do Durres and Durrës.

property_typestring

One of the ids from /api/types - apartment, house, villa, land, office, shop, and so on.

rooms_mininteger

Bedrooms, inclusive. A garsoniere (studio) is recorded as 0 by some sources and 1 by others, so rooms_min=1 can exclude studios the advertiser would call one-room.

rooms_maxinteger

Bedrooms, inclusive.

area_minnumber

Floor area in m², inclusive.

area_maxnumber

Floor area in m², inclusive.

price_minnumber

Price in EUR, inclusive. Monthly for rentals. Everything is converted to EUR on ingest at one rate across the whole index, so a lek-priced listing is comparable with a euro-priced one.

price_maxnumber

Price in EUR, inclusive.

ppm_maxnumber

Maximum price per m² in EUR. Our own figure, not the portal's.

bboxstring

west,south,east,north in degrees - the visible map rectangle.

nearstring

lat,lon,radius_km - everything within a radius of a point. Measured on the spheroid, not in degrees.

updated_sincestring

ISO-8601 timestamp. Only listings changed since then, which is how to poll for new stock without walking the whole index. A trailing Z is accepted.

neighbourhoodinteger

Neighbourhood id from /api/locations. An id rather than a name because four cities have a Qendra and three have a Blloku.

featuresstring

Comma-separated amenity ids from /api/features, combined with AND: features=lift,parking means both. Read out of the advertiser's own words, so absence means unstated, not absent.

agencyinteger

Agency id, from /api/agencies. Everything one firm has live.

has_geobooleandefault false

Only listings we have placed on the map.

sortstringnewest · price_asc · price_desc · ppm_asc · ppm_desc · area_descdefault newest

One of: newest, price_asc, price_desc, ppm_asc, ppm_desc, area_desc.

pageinteger1–500default 1

1-based.

per_pageinteger1–100default 24

Up to 100. The default is 24.

  • 200
  • 401
  • 422
  • 429

Një pronë

Shpallja e plotë: fotot, përshkrimi, tiparet dhe historiku i çmimit.

One listing in full: every photograph, the complete description, the amenities we read out of it, any recorded price changes, and the other portals advertising the same property.

id is ours, not the portal's - it is stable, and external_id plus source is the pair that identifies the listing at its origin. No personal data of an owner is ever returned: contact details belong to the agency and are reached through url.

ParametriTipiÇfarë bën
listing_idpathinteger

Our id, from the id field of a search result - not the portal's.

nearbybooleandefault false

Include nearby: the six closest active listings of the same deal, ranked by distance alone. Off by default - similar is the better answer to the same question and costs the caller nothing.

  • 200
  • 401
  • 422
  • 429

Lista referencë

Vlerat e lejuara për filtrat. Merrini nga këtu, jo me hamendje.

Every place a caller may filter on, with the names people actually say.

A conversational client cannot turn "diku te Bllok" into a filter without a list to match against, so this exists to be matched against: cities and neighbourhoods, each with its id, slug, display name and current count.

aliases carries the forms that are not the canonical name - "Bllok" for "Blloku", "Tirana" for "Tiranë" - because that is what a person types or says.

ParametriTipiÇfarë bën
min_listingsinteger0–500default 1

Hide places with less stock than this. 1 returns everything we hold a listing for.

  • 200
  • 401
  • 422
  • 429

Property types actually present, with counts. Names in all three site languages.

  • 200
  • 401
  • 429

Amenities a caller may filter on, with how many listings currently have each.

These are derived from the advertiser's prose, not published by any source. A listing lacking a feature here means nobody wrote it down, which is not the same as the property not having it - worth saying to anyone building a filter on top.

  • 200
  • 401
  • 429

Statistika €/m²

Të nxjerra nga indeksi jonë. Nuk i publikon asnjë portal shqiptar.

Median €/m² per city. Built from our own index, exists on no source site, and is the non-duplicate content the SEO plan rests on.

ParametriTipiÇfarë bën
dealstringsale · rentdefault sale

Which market to measure. Sale and rent medians are never mixed.

property_typestringmax 32 chars

Narrow to one type from /api/types.

  • 200
  • 401
  • 422
  • 429

Median €/m² per neighbourhood - the page nobody else in this market publishes.

ParametriTipiÇfarë bën
dealstringsale · rentdefault sale

Which market to measure. Sale and rent medians are never mixed.

citystring

Restrict to one city's neighbourhoods. Omit for every city we publish neighbourhood medians for.

min_listingsinteger3–100default 8

Neighbourhoods with fewer listings than this are left out: a median drawn from three flats is noise wearing a number's clothes.

property_typestringmax 32 chars

Narrow to one type from /api/types. Mixing land with apartments makes a €/m² median meaningless.

  • 200
  • 401
  • 422
  • 429

How much history we actually hold.

The frontend asks before drawing anything time-based: we began collecting on a known date, and a trend line over one day of data would be a fabrication.

  • 200
  • 401
  • 429

Lagjet

Çmimet sipas lagjes, me medianën e qytetit për krahasim.

One neighbourhood: what it costs, for sale and to let, against its city.

The city is part of the key, not decoration. There are four places called "Mali i Robit" and three called "Blloku" in different cities, so the slug alone identifies nothing.

ParametriTipiÇfarë bën
citypathstring

City slug - tirane, durres.

slugpathstring

Neighbourhood slug, from /api/neighbourhoods.

  • 200
  • 401
  • 422
  • 429

Every neighbourhood with enough stock to publish a page for.

ParametriTipiÇfarë bën
min_listingsinteger3–100default 8

Only neighbourhoods holding at least this many listings.

  • 200
  • 401
  • 422
  • 429

Arkiva

Prona që kanë dalë nga tregu. Nuk kthehen në kërkim.

Recently departed listings, newest first by when we last saw them live.

ParametriTipiÇfarë bën
pageinteger1–500default 1

1-based.

per_pageinteger1–100default 24

Up to 100.

citystring

City slug, as /api/locations lists it.

dealstringsale · rent

sale or rent. Omit for both.

  • 200
  • 401
  • 422
  • 429

A property that has left the market.

We almost never know a property sold - only what the source's page showed before it stopped being listed. state is carried through unchanged so the page can say what we observed rather than asserting a sale.

ParametriTipiÇfarë bën
listing_idpathinteger

Our id. An archived listing keeps the id it had while it was live.

  • 200
  • 401
  • 422
  • 429

Të tjera

Pika të vogla: njoftimet me email, sitemap-et dhe kontrolli i shëndetit.

Liveness, and how much is in the index. Open: a monitor should not need a key to ask whether the process is alive.

  • 200

Save a search so its owner can be told when something new matches it.

Stored unconfirmed. Nothing is ever sent to an address until the person holding it has clicked a confirmation link, because an address typed into a public form is not evidence that its owner wants mail from us. Every message that does go out will carry the unsubscribe token generated here.

  • 201
  • 401
  • 422
  • 429

Record a message from the contact form and tell the operator about it.

Recorded FIRST, then emailed. The form is the only route an agency has for "take my listing out of your index" and the terms promise removal within five working days, so a request must not be able to vanish because SMTP was unreachable for a minute. The row is the record; the email is a notification about it.

No captcha. The form carries a honeypot and the site throttles, and at this volume a per-address daily cap is the proportionate answer - a captcha would be a third-party tracker on the one page someone reaches when they are already annoyed with us.

  • 201
  • 401
  • 422
  • 429

Count a click through to the source, and answer with where to send them.

One call rather than two: the caller needs the destination anyway, and asking for the whole listing just to read its url would make counting cost more than the page. Returns the source URL so the redirect comes from our own domain and cannot be pointed anywhere else - the id is the only thing a visitor can influence.

No IP, no user agent, no cookie. The row says a listing was clicked, when, and in which language, which answers every question worth asking of it and holds no personal data at all.

ParametriTipiÇfarë bën
listing_idpathinteger

Our id for the listing being clicked, from the id field of a search result.

localestringdefault sq

Which language the page was in: sq, en or it. Recorded so the count can be read per language; nothing else about the visitor is.

countintegerdefault 1

0 to resolve the destination WITHOUT counting it. The outbound hop sets this when the caller is a crawler: robots.txt asks them not to come here, but that is an ask, and this number means 'a person chose to go to the source'. 273 of one day's 1,217 clicks were Googlebot.

  • 201
  • 401
  • 422
  • 429

Where the clicks went, for the last days.

The operator's view of the only conversion the site has: by source, by agency, and a daily total. Behind the same key as everything else.

ParametriTipiÇfarë bën
daysinteger1–365default 30

How far back to count, in days. Up to 365.

  • 200
  • 401
  • 422
  • 429

Minimal id + lastmod rows for sitemap shards.

Separate from /api/search because a sitemap needs 10 000 ids at a time and none of the other fields; serving it through the search endpoint would ship megabytes of descriptions and facet counts nobody reads.

ParametriTipiÇfarë bën
offsetinteger≥ 0default 0

Where the shard starts. Walk it with offset += limit.

limitinteger1–50000default 10000

Rows per shard. 10,000 is the sitemap convention.

  • 200
  • 401
  • 422
  • 429

Send a sign-in link to an address.

The answer is the same whether or not an account exists. "No account with that address" is a probe anybody can run against a public form, and answering it turns this endpoint into a way to find out who has one.

Returns 202, not 200: the message has been accepted for delivery, which is genuinely all we know at this point.

  • 202
  • 401
  • 422
  • 429

Spend a sign-in link and open a session.

One failure for every reason it can fail - unknown, already used, expired, blocked. Telling the person which it was tells an attacker the same thing.

  • 200
  • 401
  • 422
  • 429

End this one session. Other browsers the account is signed in on are untouched.

  • 200
  • 401
  • 429

The signed-in account and everything it has saved.

  • 200
  • 401
  • 429
delete/api/me

Delete the account and everything hanging off it.

Sessions, sign-in links and saved searches all cascade: somebody who asks to be forgotten should not have to trust that we remembered every table.

  • 200
  • 401
  • 429

Save a search to this account.

The high-water mark starts at the top of the index, so the first notification is about something that arrived after the search was saved rather than a dump of the back catalogue.

  • 201
  • 401
  • 422
  • 429

Change how often a saved search may write to the inbox: daily, weekly or off.

off keeps the search - it is still there to look at and turn back on - and only stops the mail.

ParametriTipiÇfarë bën
alert_idpathinteger

The saved search's id, from /api/me.

  • 200
  • 401
  • 422
  • 429

Delete a saved search outright. Use PATCH with off to keep it but stop the mail.

ParametriTipiÇfarë bën
alert_idpathinteger

The saved search's id, from /api/me.

  • 200
  • 401
  • 422
  • 429

Stop one saved search's messages. No sign-in required, by design.

Asking somebody to log in before they can stop the mail is how a sender ends up reported as spam rather than unsubscribed from.

ParametriTipiÇfarë bën
tokenpathstring

The token from the unsubscribe link at the foot of every message.

  • 200
  • 401
  • 422
  • 429

Agencies we hold listings for, largest first.

Counts and medians are ours - derived from the index, not published by any portal - so they are free to reuse with attribution. The agency's own name is theirs.

ParametriTipiÇfarë bën
min_listingsinteger1–500default 3

Only agencies with at least this many live listings.

limitinteger1–500default 200

How many to return.

  • 200
  • 401
  • 422
  • 429

One agency: who they are, what they have live, and where.

The listings themselves are not returned here - call /api/search?agency=… for those, so one endpoint does not quietly become two.

ParametriTipiÇfarë bën
sourcepathstring

Source slug, as /api/agencies returns it.

slugpathstring

Agency slug, as /api/agencies returns it.

  • 200
  • 401
  • 422
  • 429

Saved listings, newest save first.

Includes ones that have left the market, with state untouched: a property going is exactly what somebody who saved it wants to know, so the row is kept and labelled rather than quietly dropped.

  • 200
  • 401
  • 429

Save a listing. PUT, not POST, because it is idempotent - clicking the heart twice is not an error and must not create two rows.

ParametriTipiÇfarë bën
listing_idpathinteger

Our listing id.

  • 201
  • 401
  • 422
  • 429

Unsave a listing. Idempotent in the same way: removing one that is not there is a no-op, not a 404, because the heart the person clicked already looked empty.

ParametriTipiÇfarë bën
listing_idpathinteger

Our listing id.

  • 200
  • 401
  • 422
  • 429

Mos e humbni pronën e radhës.

Ruani një kërkim dhe ju njoftojmë sapo del një shpallje e re ose ulet një çmim. Falas, pa llogari.