> ## Documentation Index
> Fetch the complete documentation index at: https://docs.import.kopagari.com/llms.txt
> Use this file to discover all available pages before exploring further.

# introduction

The **TRA Import Tax Calculator API** turns a used-car listing URL into a complete Tanzania Revenue Authority (TRA) import-duty estimate. Give it a link to a vehicle on a supported auction site and it scrapes the vehicle, matches it against the official TRA vehicle database, calls the TRA calculator, and returns the full tax breakdown — import duty, excise, VAT, levies, and registration fees.

## Base URL

```text theme={null}
https://import.kopagari.com
```

<Note>
  The upstream TRA calculator only answers requests from **Tanzanian IP addresses**, so the API is deployed on Tanzanian infrastructure — call it through this host, not the TRA portal directly.
</Note>

## How it works

<Steps>
  <Step title="Send a listing URL">
    `POST /v1/estimate` with the listing URL from a supported auction site (BeForward, SBT Japan, SBI / Enhance Auto, or any site exposing schema.org listing data).
  </Step>

  <Step title="We scrape and match">
    The API extracts make, model, chassis code, year, engine capacity, fuel, and price, then resolves the vehicle against the TRA database (by chassis code, or via AI when no exact code match exists).
  </Step>

  <Step title="You get the tax breakdown">
    The response includes the scraped `car`, the `matched` TRA classification with a confidence score, and the full `tax` breakdown in USD and TZS.
  </Step>
</Steps>

## What you can build

<CardGroup cols={2}>
  <Card title="Instant valuations" icon="calculator">
    Show landed-cost estimates on a dealer site or marketplace the moment a buyer pastes a link.
  </Card>

  <Card title="Condition insights" icon="clipboard-check">
    Summarise Japanese auction inspection sheets into structured, readable reports.
  </Card>

  <Card title="Side-by-side comparison" icon="scale-balanced">
    Compare two vehicles on total cost and condition, with a recommendation.
  </Card>

  <Card title="Import-cost tooling" icon="ship">
    Embed accurate TRA duty figures into financing, insurance, or logistics workflows.
  </Card>
</CardGroup>

## Endpoints

| Method | Path                   | Purpose                                           |
| ------ | ---------------------- | ------------------------------------------------- |
| `POST` | `/v1/estimate`         | Listing URL → full TRA tax + drive-away breakdown |
| `POST` | `/v1/condition-report` | Summarise an auction inspection sheet             |
| `POST` | `/v1/compare`          | Compare two listings with a recommendation        |
| `GET`  | `/v1/tra-status`       | Check whether the TRA portal is reachable         |

Every endpoint requires an API key — see [Authentication](/authentication).
