Capital Gains Tax API for property sales in India
Yes. The LandLens capital gains API works out the gain and tax on the sale of land or a building in India: the holding period, whether the gain is short or long term (over two years), the purchase price indexed with the Cost Inflation Index, improvement costs indexed by their own years, and for a long-term gain both regimes side by side (20% with indexation, and 12.5% without it for sales from 23 July 2024), with which one the seller may choose. Property bought before 1 April 2001 uses its fair market value on that date. It costs nothing.
https://verified.realestate/api/v1/tools/capital_gains- Price
- Free
- Source
- Income Tax Act, CII table to 2026-27
- Coverage
- Land and buildings anywhere in India
- Answers in
- Instant
Example
curl -X POST https://verified.realestate/api/v1/tools/capital_gains \
-H "Authorization: Bearer $LANDLENS_KEY" \
-H "Content-Type: application/json" \
-d '{"purchase_date":"2012-06-15","purchase_amount":3500000,"sale_date":"2026-09-30","sale_amount":12000000}'
{
"ok": true,
"status": "ok",
"data": {
"ok": true,
"found": true,
"holding_years": 14.3,
"type": "Long-Term Capital Gains",
"sale_amount": 12000000,
"cost_basis": 3500000,
"used_fmv_2001": false,
"cii_purchase": 200,
"cii_sale": 384,
"indexed_purchase_price": 6720000,
"development_costs": [],
"indexed_development_costs": 0,
"capital_gain_indexed": 5280000,
"indexation_applies": true,
"regime": "choice",
"resident": true,
"regime_note": "Bought before and sold on or after 23 July 2024, so the lower of 20% with indexation and 12.5% without it can be chosen.",
"capital_gain_taxed": 5280000,
"tax_indexed": 1056000,
"tax_rate_indexed": "20% with indexation",
"capital_gain_new": 8500000,
"tax_new": 1062500,
"tax_rate_new": "12.5% without indexation (sales from 23 July 2024)",
"is_loss": null,
"loss_note": null,
"basis": "Verified.RealEstate Capital Gains Calculator (CII table to 2026-27). Indicative; exemptions (54, 54EC, 54F), surcharge and cess are not applied. Confirm with a chartered accountant before filing."
},
"credits_charged": 0
}
A real answer from the API, as returned.
What it returns
One call, one working. found is false (status not_found) when the dates or amounts do not make a sale, with the reason in error.
| Field | What it holds |
|---|---|
type, holding_years | Long-Term or Short-Term Capital Gains, and how long the property was held. |
cost_basis, used_fmv_2001 | The cost used, and whether it is the 1 April 2001 value. |
cii_purchase, cii_sale, indexed_purchase_price | The two index figures and the indexed cost. |
development_costs[], indexed_development_costs | Each improvement cost with its year and indexed amount, and their total. |
regime, regime_note | indexed_only, new_only or choice, and in words which rate applies and why. |
capital_gain_indexed, tax_indexed, tax_rate_indexed | The indexed gain and its tax at 20% (or the short-term gain at the assumed slab). |
capital_gain_new, tax_new, tax_rate_new | The plain gain and its tax at 12.5%, where that regime applies. |
capital_gain_taxed | The gain the tax is taken on. |
is_loss, loss_note | Set when the sale is a loss, with how it can be set off and carried forward. |
basis | What the figure leaves out: exemptions under sections 54, 54EC and 54F, surcharge and cess. |
Inputs
The JSON body of the POST is the arguments. Dates are YYYY-MM-DD. For a purchase before 1 April 2001, fmv_2001 is required and replaces the purchase price.
| Argument | Type | What to send |
|---|---|---|
purchase_daterequired |
string | YYYY-MM-DD |
purchase_amountrequired |
number | |
sale_daterequired |
string | YYYY-MM-DD |
sale_amountrequired |
number | |
resident |
boolean | Whether the seller is a resident individual or HUF (default true). Only they may choose 20% with indexation on land or a building bought before 23 July 2024 and sold after it; anyone else pays 12.5% without indexation. |
fmv_2001 |
number | Fair market value as on 1 April 2001; used INSTEAD of purchase_amount when the purchase is before that date |
development_costs |
array | Improvement costs, each with its date |
Code
Set LANDLENS_KEY to your key. In an AI app, connect https://verified.realestate/mcp once and ask in plain words instead. In Postman, download this API's collection, import it (File, Import) and set apiKey.
curl -X POST https://verified.realestate/api/v1/tools/capital_gains \
-H "Authorization: Bearer $LANDLENS_KEY" \
-H "Content-Type: application/json" \
-d '{"purchase_date":"2012-06-15","purchase_amount":3500000,"sale_date":"2026-09-30","sale_amount":12000000}'
import os, requests
r = requests.post(
"https://verified.realestate/api/v1/tools/capital_gains",
headers={"Authorization": f"Bearer {os.environ['LANDLENS_KEY']}"},
json={
"purchase_date": "2012-06-15",
"purchase_amount": 3500000,
"sale_date": "2026-09-30",
"sale_amount": 12000000
},
timeout=20,
)
body = r.json()
print(body["status"], body["credits_charged"], body["data"])
const res = await fetch("https://verified.realestate/api/v1/tools/capital_gains", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LANDLENS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"purchase_date": "2012-06-15",
"purchase_amount": 3500000,
"sale_date": "2026-09-30",
"sale_amount": 12000000
}),
});
const body = await res.json();
console.log(body.status, body.credits_charged, body.data);
I bought a plot in June 2012 for 35 lakh and sold it in September 2026 for 1.2 crore. How much capital gains tax do I pay, and should I take indexation?
Your AI works out both regimes and tells you which is lower. It is free.
Responses
Every answer has the same envelope. What status can say for this call:
| status | What it means |
|---|---|
ok | The gain and tax were worked out. |
not_found | The sale date is not after the purchase, a price is missing or zero, or a pre-2001 purchase has no fmv_2001. The reason is in error. |
invalid_args | A required input (purchase_date, purchase_amount, sale_date or sale_amount) is missing. |
free_limit_reached | The account has used its free calls for the hour or the day. retry_after says how many seconds to wait; paid calls keep working. |
Where the data comes from
The Cost Inflation Index notified under the Income Tax Act, up to 2026-27, and the long-term capital gains rates for land and buildings as changed from 23 July 2024.
Any sale of land or a building in India by an individual, HUF or other seller. Purchases from before 1 April 2001 are handled through the fair market value on that date.
The CII table runs to 2026-27; basis in the answer names it.
Held over two years is long term. The cost (or the 1 April 2001 value) is multiplied by the sale year's index over the purchase year's, and each improvement cost by the sale year's index over its own. A purchase before 23 July 2024 and a sale on or after it gives a resident individual or HUF the choice of 20% with indexation or 12.5% without; anyone else pays 12.5%. A purchase after that date has no indexation. Short-term gains are shown at an assumed 30% slab.
Who uses it
Chartered accountants and tax platforms
Run both long-term regimes on every property sale and show the client the lower one.
Sellers and brokers
Know the tax on a sale before agreeing the price, and what an improvement bill is worth after indexation.
AI assistants
Answer "how much tax on my plot sale" with the index figures, not a guess.
Limits and good practice
- Exemptions under sections 54, 54EC and 54F, surcharge and cess are not applied.
- A short-term gain is shown at an assumed 30% slab; the real rate is the seller's own slab.
- The 20% option is open only to a resident individual or HUF. Set resident to false for anyone else.
- An indicative working, not tax advice. Confirm with a chartered accountant before filing.
Pricing
The capital gains calculation costs nothing. Free calls have their own allowance per hour and per day, counted across every key and connected app on the account, and it is larger once the account has bought credits. Credits come from the same LandLens wallet as the chat and the minis. How billing works.
Free calls have an hourly and daily allowance. For more than that, or a platform built on these registers, we set up limits and a plan to match.
Questions
Is there an API for capital gains tax on property in India?
Yes, this one. It indexes the cost with the CII, decides short or long term, and compares 20% with indexation against 12.5% without.
Can I still claim indexation after July 2024?
For land or a building bought before 23 July 2024, a resident individual or HUF may choose the lower of 20% with indexation and 12.5% without. The answer works out both and says when the choice applies.
What if I bought the property before 2001?
Send fmv_2001, the fair market value on 1 April 2001. It replaces the purchase price and is indexed from 2001-02.
Are improvement costs included?
Yes. Send each in development_costs with its date; each is indexed from its own year.
Where do I get the 2001 value?
Usually a registered valuer's report. The guideline rate in force then is a common reference; guideline_history gives a street's rates from 2002.
Updated 22 Oct 2026 · OpenAPI description