Skip to content
BestAstroAPI

Migration & utility

Migration compare

POST/v1/migrate/compare

Replays your logged vendor requests in our compatible format and compares every field with the response that vendor gave you.

  • Returns match rates per field and a recommendation.
  • Each case counts as one call.
  • The example vendor response is our own AstrologyAPI-format answer with one field edited.

Request

FieldTypeDescription
vendorstringrequiredastrologyapi | vedicastroapi | prokerala
casesarrayrequired1-1000 items: {endpoint, request, vendor_response}
tolerancenumberAbsolute tolerance for numbers (default 0.01; angles modulo 360)
ignorearrayField paths to skip, e.g. .remaining_api_calls

Example

curl -X POST "https://api.bestastroapi.in/v1/migrate/compare" \
  -H "x-api-key: $BESTASTRO_KEY" \
  -H "content-type: application/json" \
  -d '{"vendor":"astrologyapi","cases":[{"endpoint":"astro_details","request":{"day":18,"month":5,"year":2004,"hour":10,"min":30,"lat":28.6139,"lon":77.209,"tzone":5.5},"vendor_response":{"Charan":3,"Gan":"Manushya","Karan":"Chatushpada","Nadi":"Madhya","Naksahtra":"Krittika","NaksahtraLord":"Venus","SignLord":"Mars","Tithi":"Krishna Amavasya","Varna":"Kshatriya","Vashya":"Chatushpada","Yog":"Shobhana","Yoni":"Elephant","ascendant":"Cancer","name_alphabet":"Le","paya":"Copper","sign":"Aries","tatva":"Fire","yunja":"Poorva"}}]}'

Try it live

Sends a real request from your browser.

Response

  • [] is a list. {key} is a key that varies.
  • An optional field can be missing. That means it does not apply.
FieldTypeMeaning
vendorstringVendor you sentastrologyapi | vedicastroapi | prokerala
casesintegerCases you sent
errorsobject[]Cases we could not answer. Empty when all worked
errors[].caseintegerPosition of the case, from 0 optional
errors[].responseanyOur answer in the vendor's error format optional
fields_comparedintegerValues compared
fields_matchedintegerValues that match
fields_missing_in_oursintegerValues the vendor has and we do not
match_ratenumberpercentMatched share of all values
match_rate_excluding_missingnumberpercentMatched share of the values we have
elapsed_msnumbermillisecondsTime the comparison took
recommendationstringSuggested next step
fieldsobject[]One row per field, worst match first
fields[].fieldstringPath in the vendor's response
fields[].comparedintegerValues compared
fields[].matchedintegerValues that match
fields[].missingintegerValues we do not have
fields[].match_ratenumberpercentMatch rate
fields[].examplesobject[]Up to 3 differences. Can be empty
fields[].examples[].pathstringExact path
fields[].examples[].vendoranyThe vendor's value
fields[].examples[].oursanyOur value
Raw sample
200 application/json
{
  "cases": 1,
  "elapsed_ms": 0.29,
  "errors": [],
  "fields": [
    {
      "compared": 1,
      "examples": [
        {
          "ours": "Bharani",
          "path": ".Naksahtra",
          "vendor": "Krittika"
        }
      ],
      "field": ".Naksahtra",
      "match_rate": 0,
      "matched": 0,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Charan",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Gan",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Karan",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Nadi",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".NaksahtraLord",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".SignLord",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Tithi",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Varna",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Vashya",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Yog",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".Yoni",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".ascendant",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".name_alphabet",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".paya",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".sign",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".tatva",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    },
    {
      "compared": 1,
      "examples": [],
      "field": ".yunja",
      "match_rate": 100,
      "matched": 1,
      "missing": 0
    }
  ],
  "fields_compared": 18,
  "fields_matched": 17,
  "fields_missing_in_ours": 0,
  "match_rate": 94.4,
  "match_rate_excluding_missing": 94.4,
  "place_calls_skipped": 0,
  "recommendation": "review field differences before routing live traffic",
  "vendor": "astrologyapi"
}

Real output for the example request above.

Errors use one format. See error codes. Also in openapi.json.

Welcome! How will you use it?

We'll show you what matters to you. You can switch any time at the top.