ramSeraph / indiapost-tracker

India Post tracker API

Home Page:https://india-post-tracker-api.captnemo.in/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

India Post Tracking API

License: MIT PRs Welcome

NOTE: The main API does not currently work. There is some WIP fixes at #17, but there is no functional API as of now. If you'd like to help, please reach out.

Simple no-captcha required API for tracking packages on the India Post website.

  • JSON API
  • No CAPTCHA
  • Returns all events and available data for the given Item
  • Unofficial API. No liabilities

How to use

Make a request to

/track/:ITEM_ID

If you know that a package is international, you can force a different "international-only" response by using /track/:ITEM_ID?international=true. This gives you a few extra details about the country

Sample Response (/track/:ITEM_ID)

{
  "booking_date": "2018-06-15T00:00:00",
  "category": "SPA",
  "delivered": true,
  "delivery_date": "19/06/2018",
  "destination": "Faridabad Sector 7 S.O",
  "events": [
    {
      "date": "2018-06-19T16:42:55+05:30",
      "description": "Item delivered",
      "office": "Faridabad Sector 7 S.O"
    },
    {
      "date": "2018-06-16T08:42:18+05:30",
      "description": "Bag Despatched to ICH FARIDABAD",
      "office": "DELHI RMS"
    },
    {
      "date": "2018-06-16T07:05:40+05:30",
      "description": "Bag Received",
      "office": "DELHI RMS"
    },
    {
      "date": "2018-06-16T03:24:33+05:30",
      "description": "Bag Despatched to DELHI RMS",
      "office": "BNPL SP Hub NEW DELHI"
    },
    {
      "date": "2018-06-16T02:06:10+05:30",
      "description": "Item Bagged for ICH FARIDABAD",
      "office": "BNPL SP Hub NEW DELHI"
    },
    {
      "date": "2018-06-15T20:41:03+05:30",
      "description": "Item Booked",
      "office": "BNPL SP Hub NEW DELHI"
    }
  ],
  "id": "PP116215523IN",
  "origin": "BNPL SP Hub NEW DELHI",
  "pincode": "121006",
  "tariff": "35.00"
}

Sample API Response (/track:ITEM_ID?international=true)

{
  "booking_date": "9/27/2014 4:22:00 PM",
  "delivered": true,
  "delivery_date": "9/29/2014 7:57:00 AM",
  "destination": "2150",
  "destination_country": "Australia",
  "events": [
    {
      "country": "Australia",
      "location": "SYDNEY EMS",
      "mail_category": "A",
      "next_office": "ISC NEW YORK NY (USPS)",
      "time": "9/27/2014 4:22:00 PM",
      "type": "Receive item at office of exchange (Inb)"
    },
    {
      "country": "Australia",
      "location": "AUMXBT",
      "mail_category": "A",
      "next_office": "-",
      "time": "9/29/2014 7:57:00 AM",
      "type": "Receive item at delivery office (Inb)"
    },
    {
      "country": "Australia",
      "location": "2150",
      "mail_category": "A",
      "next_office": "-",
      "time": "9/29/2014 7:57:00 AM",
      "type": "Deliver item (Inb)"
    }
  ],
  "id": "ED123456789IN",
  "origin": "SYDNEY EMS",
  "origin_country": "Australia"
}

The API root url is https://india-post-tracker-api.captnemo.in/.

Docker

You can run this as a docker container as well:

docker run --detach --publish 3000:3000 captn3m0/indiapost-tracker and access the service locally using http://localhost:3000

Changelog

  • May 2019: General fixes, nightly regression tests added to detect breakage.
  • June 2018: International support added using ipsweb.ptcmysore.gov.in suggestion from @troysk704
  • Oct-2015: API Shifted from Heroku-US to Heroku-EU region because India Post was blocking requests for the us-east region, it seems.

Credits

License

Licensed under the MIT License

About

India Post tracker API

https://india-post-tracker-api.captnemo.in/


Languages

Language:Python 92.1%Language:HTML 3.8%Language:Shell 2.4%Language:Dockerfile 1.6%Language:Procfile 0.1%