preface

I believe that my friends should know that HALF a year ago I began to maintain a set of free universal API interface, the original intention is for their own use, incidentally put out for friends who need to use together! It has been maintained for half a year, and now the number of interfaces is gradually increasing. Some friends send me a message, hoping that I can continue to maintain, but also hope that I can separate each interface to make it more clear, so I have this [free Api series] sorting document.

Also, to see all interfaces, go to GitHub: RollToolsApi! If this project is helpful to you, I hope you don’t spare the hands of the mouse, help to point a star, and recommend to the people around you, thank you here!

Api Interface Introduction

Special instructions

HOST address: HTTPS interface is recommended for more security: www.mxnzp.com/api before www.mxnzp.com/api can be used without impact! All hosts in the following paragraphs must be replaced with the HTTP or HTTPS domain names above

Holidays and calendar information of specified dates

  • This interface is used to obtain information about holidays and calendars of specified dates

  • Interface address: [HOST]/holiday/single/{date} for example: [HOST]/holiday/single/20181121

  • Parameter description: date Indicates the date format yyyyMMdd

  • Return data:

    • Date: indicates the current date
    • WeekDay: day of the current week 1-Monday 2-Tuesday… 7 – on Sunday
    • YearTips: Heavenly stem and terrestrial branch chronology method description, such as: Wuxu
    • Type: Type 0 Working day 1 Holiday 2 Holiday
    • TypeDes: Type description, such as National Day, rest day, and working day
    • For example, dogs
    • For example: light snow
    • LunarCalendar: lunarCalendar date
    • -Leonard: It’s a good suit
    • DayOfYear: the day of the year
    • WeekOfYear: the week of the year
    • Constellation constellation:
  • Example data:

    {
        "code": 1."msg": "Data returned successfully"."data": {
            "date": "2018-11-21"."weekDay": 3."yearTips": "The reform"."type": 0."typeDes": "Working day"."chineseZodiac": "Dog"."solarTerms": "After the start of Winter"."avoid": "Marry. Bury."."lunarCalendar": "The 14th of October"."suit": "Broken house. Broken wall. Sacrifice. Do not take the rest."."dayOfYear": 325."weekOfYear": 47."constellation": "Scorpio"}}Copy the code

Two, specify more than the date of holidays and calendar information

  • This interface is used to obtain information about holidays and calendars of specified dates

  • Interface address: [HOST] / holiday/multi / {dates} [example: [HOST] / holiday/multi / 20180101201101 0201101 1 】

  • Parameters: dates set date format yyyyMMdd, yyyyMMdd, yyyyMMdd commas in English (middle)

  • Return data:

    • Date: indicates the current date
    • WeekDay: day of the current week 1-Monday 2-Tuesday… 7 – on Sunday
    • YearTips: Heavenly stem and terrestrial branch chronology method description, such as: Wuxu
    • Type: Type 0 Working day 1 Holiday 2 Holiday
    • TypeDes: Type description, such as National Day, rest day, and working day
    • For example, dogs
    • For example: light snow
    • LunarCalendar: lunarCalendar date
    • -Leonard: It’s a good suit
    • DayOfYear: the day of the year
    • WeekOfYear: the week of the year
    • Constellation constellation:
  • Example data:

    {
        "code": 1."msg": "Data returned successfully"."data": [{"date": "2018-01-01"."weekDay": 1."yearTips": "Ding You"."type": 2."chineseZodiac": "Chicken"."solarTerms": "After the winter solstice"."avoid": "Travel. Burial. Grave repair. The bell"."lunarCalendar": "11-15"."typeDes" : "New Year's day"."suit": "Sacrifice. Plastic painting. Light. Cut clothes. Crown plan. marry. Adopt. Disassemble. Repair. Earth moving. Vertical column. Upper beam. Bedding. Migration. House entry. Anxiang. Net. Capture. To hunt, to cut wood, to enter the population. Water"."dayOfYear": 1."weekOfYear": 1."constellation": "Scorpio"
            },
            {
                "date": "2018-10-10"."weekDay": 3."yearTips": "The reform"."type": 0."chineseZodiac": "Dog"."solarTerms": "After the cold dew"."typeDes" : "Working day"."avoid": "Build temples. Marry. Dig Wells. Plant. Build Bridges. Cook stoves. In"."lunarCalendar": "9-2"."suit": "Sacrifice. Light. Travel. Lift. Cut wood. Make beams. Out of the fire. Disassemble. In the house. Migration. Bedding. Repair. 9. The mechanism of framing livestock.."dayOfYear": 283."weekOfYear": 41."constellation": "Scorpio"
            },
            {
                "date": "2018-10-11"."weekDay": 4."yearTips": "The reform"."type": 0."typeDes" : "Working day"."chineseZodiac": "Dog"."solarTerms": "After the cold dew"."avoid": "Into the house. Upper beam. Give fire. Thank earth."."lunarCalendar": "9-3"."suit": "Nature. alliance. Open. Trading. Vouchers. Meeting friends and relatives. Pay livestock. Shepherd. Ask name. Emigrate. Remove. Make toilet. School. Up. Bed. Open warehouse. Shipping goods. Burial. Qi Save. Encoffination. Removal. ChengFu"."dayOfYear": 284."weekOfYear": 41."constellation": "Scorpio"}}]Copy the code

All holidays and calendar information of the specified month

  • This interface is used to obtain holidays and calendar information of a specified month

  • Interface address: [HOST] / holiday/list/month / {date} [[HOST], for example, / holiday/list/month / 201802 】

  • Parameter Description Date Month format yyyyMM (month only)

  • Return data:

    • Date: indicates the current date
    • WeekDay: day of the current week 1-Monday 2-Tuesday… 7 – on Sunday
    • YearTips: Heavenly stem and terrestrial branch chronology method description, such as: Wuxu
    • Type: Type 0 Working day 1 Holiday 2 Holiday
    • TypeDes: Type description, such as National Day, rest day, and working day
    • For example, dogs
    • For example: light snow
    • LunarCalendar: lunarCalendar date
    • -Leonard: It’s a good suit
    • DayOfYear: the day of the year
    • WeekOfYear: the week of the year
    • Constellation constellation:
  • Example data:

    {
        "code": 1."msg": "Data returned successfully"."data": [{"date": "2018-02-01"."weekDay": 4."yearTips": "Ding You"."type": 0."chineseZodiac": "Chicken"."typeDes" : "Working day"."solarTerms": "After Major Cold"."avoid": "Open a barn. Marry. Migrate. Into the house. ""."lunarCalendar": "12-16"."suit": "Sacrifice. Bath. Blessing. Jiao festival. Alliance. Mining. Cut clothes. Disassemble. Base. Vertical column. Upper beam. Bed. Encoffination. Removal. Finishing. Move the coffin. Qi Save. Hang the plaque. Seek heir. Travel. Close the account. Livestock farming"."dayOfYear": 32."weekOfYear": 5."constellation": "Scorpio"},... Hidden in the middle"2018-02-02"~"2018-02-27"The data of {"date": "2018-02-28"."weekDay": 3."yearTips": "The reform"."type": 0."chineseZodiac": "Dog"."typeDes" : "Working day"."solarTerms": "After the rain"."avoid": "Dig Wells"."lunarCalendar": "1-13"."suit": "Sacrifice. Pray. Cut your clothes. Heiji. Crown. Pin. Meet. Marry. Go into the house. Anxiang. Xie Soil. Encoffined. Moving a coffin. Breaking ground. Erecting a monument. Anxiang. Meet friends and relatives. Travel. Pray. Beg for an heir. Erect a monument. Upper beam. Drain water."."dayOfYear": 59."weekOfYear": 9."constellation": "Scorpio"}}]Copy the code

All holidays and calendar information of the specified type in the specified month

  • This interface is used to obtain holidays and calendar information of a specified month

  • Interface address: [HOST] / holiday/list/month / {date} / {type} [[HOST], for example, / holiday/list/month / 201810 / rest 】

  • Parameter description Date Month format yyyyMM (only month), type Type {Optional: Type Workday Holiday Holiday Rest Day Festival Festival}

  • Return data:

    • Month: indicates the current month
    • Year:The current year
      • Date: indicates the current date
      • WeekDay: day of the current week 1-Monday 2-Tuesday… 7 – on Sunday
      • YearTips: Heavenly stem and terrestrial branch chronology method description, such as: Wuxu
      • Type: Type 0 Working day 1 Holiday 2 Holiday
      • TypeDes: Type description, such as National Day, rest day, and working day
      • For example, dogs
      • For example: light snow
      • LunarCalendar: lunarCalendar date
      • -Leonard: It’s a good suit
      • DayOfYear: the day of the year
      • WeekOfYear: the week of the year
      • Constellation constellation:
  • Data sample

    {
        "code": 1."msg": "Data returned successfully"."data": [{"month": 10."year": 2018."days": [{"date": "2018-10-13"."weekDay": 6."yearTips": "The reform"."type": 1."typeDes": "Day of rest"."chineseZodiac": "Dog"."solarTerms": "After the cold dew"."avoid": "Opening. Trading. Sacrifice. In the house. Burial."."lunarCalendar": "The fifth day of September"."suit": "To hunt, to be depraved."."dayOfYear": 286."weekOfYear": 41."constellation": "Scorpio"},... Some data is hidden in the middle... {"date": "2018-10-28"."weekDay": 7."yearTips": "The reform"."type": 1."typeDes": "Day of rest"."chineseZodiac": "Dog"."solarTerms": "After frost's Descent"."avoid": "Travel. Pray. Bury. As a kitchen"."lunarCalendar": "September 20"."suit": "Meet friends. Marry. Subscribe alliance. Accept. Accept son-in-law. Disassemble. Repair. Ground. Base. Vertical column. Upper beam. Make a bed. Meet friends and family. Take money."."dayOfYear": 301."weekOfYear": 43."constellation": "Scorpio"}]}]}Copy the code

5. All holidays and calendar information of the specified year

  • This interface is used to obtain holidays and calendar information of a specified year

  • Interface address: [HOST]/holiday//list/year/{date} [example: [HOST]/holiday/list/year/2018]

  • Parameter Description: date Query year format YYYY (only years)

  • Return data:

    • Month: indicates the current month
    • Year:The current year
      • Date: indicates the current date
      • WeekDay: day of the current week 1-Monday 2-Tuesday… 7 – on Sunday
      • YearTips: Heavenly stem and terrestrial branch chronology method description, such as: Wuxu
      • Type: Type 0 Working day 1 Holiday 2 Holiday
      • TypeDes: Type description, such as National Day, rest day, and working day
      • For example, dogs
      • For example: light snow
      • LunarCalendar: lunarCalendar date
      • -Leonard: It’s a good suit
      • DayOfYear: the day of the year
      • WeekOfYear: the week of the year
      • Constellation constellation:
  • Example data:

    {
        "code": 1."msg": "Data returned successfully"."data": [{"month": 1."year": 2018."days": [{"date": "2018-01-01"."weekDay": 1."yearTips": "Ding You"."type": 2."chineseZodiac": "Chicken"."solarTerms": "After the winter solstice"."typeDes" : "New Year's day"."avoid": "Travel. Burial. Grave repair. The bell"."lunarCalendar": "11-15"."suit": "Sacrifice. Plastic painting. Light. Cut clothes. Crown plan. marry. Adopt. Disassemble. Repair. Earth moving. Vertical column. Upper beam. Bedding. Migration. House entry. Anxiang. Net. Capture. To hunt, to cut wood, to enter the population. Water"."dayOfYear": 1."weekOfYear": 1."constellation": "Scorpio"},... Hidden in the middle"2018-01-02"~"2018-01-30"The data of {"date": "2018-01-31"."weekDay": 3."yearTips": "Ding You"."type": 0."chineseZodiac": "Chicken"."typeDes" : "Working day"."solarTerms": "After Major Cold"."avoid": "To be married. To be laid out. Travel"."lunarCalendar": "12 to 15"."suit": "Plastic painting. Light. Bath. Crown plan. meet relatives and friends. Make kitchen. 9. Water is released.."dayOfYear": 31."weekOfYear": 5."constellation": "Scorpio"}}],... Hidden in the middle02Month to11Monthly data {"month": 12."days": [{"date": "2018-12-01"."weekDay": 6."yearTips": "The reform"."type": 1."chineseZodiac": "Dog"."typeDes" : "Day of rest"."solarTerms": "After a light snow"."avoid": "Cook. Cure."."lunarCalendar": "10 to 24"."suit": "Sacrifice. Pray. Pledge. Pick, cut, disassemble. Repair. Ground. Base. Bedding. Migration. House entry. Anxiang. Encoffination. Moving the coffin. Burial. Thank earth. To the appointment. Enter the population. Meet friends and relatives."."dayOfYear": 335."weekOfYear": 48."constellation": "Scorpio"},... Hidden in the middle"2018-12-02"~"2018-12-30"The data of {"date": "2018-12-31"."weekDay": 1."yearTips": "The reform"."type": 0."chineseZodiac": "Dog"."solarTerms": "After the winter solstice"."avoid": "Open the market. Break the ground."."lunarCalendar": "10 to 25"."suit": "Sacrifice. Bath. Bed. To be depraved to be rich."dayOfYear": 365."weekOfYear": 1."constellation": "Scorpio"}]}]}Copy the code

All holidays and calendar information of the specified year and type

  • This interface is used to obtain holidays and calendar information of a specified month

  • Interface address: [HOST] / holiday/list/year / {date} / {type} [[HOST], for example, / holiday/list/year / 2018 / rest 】

  • Parameter description Date Format of the month to be queried YYYY (only years), type Type to be queried {Optional: Type Workday Holiday Holiday REST Day Festival Festival}

  • Return data:

    • Month: indicates the current month
    • Year:The current year
      • Date: indicates the current date
      • WeekDay: day of the current week 1-Monday 2-Tuesday… 7 – on Sunday
      • YearTips: Heavenly stem and terrestrial branch chronology method description, such as: Wuxu
      • Type: Type 0 Working day 1 Holiday 2 Holiday
      • TypeDes: Type description, such as National Day, rest day, and working day
      • For example, dogs
      • For example: light snow
      • LunarCalendar: lunarCalendar date
      • -Leonard: It’s a good suit
      • DayOfYear: the day of the year
      • WeekOfYear: the week of the year
      • Constellation constellation:
  • Data sample

    {
        "code": 1."msg": "Data returned successfully, the domain name has been successfully recorded, in order to more elegant call, port 8091 will be abandoned soon, please use the new domain name directly call as soon as possible, sorry for any inconvenience."."data": [{"month": 1."year": 2018."days": [{"date": "2018-01-06"."weekDay": 6."yearTips": "Ding You"."type": 1."typeDes": "Day of rest"."chineseZodiac": "Chicken"."solarTerms": "After Minor Cold"."avoid": "Marry. Open the market. Enter the house. Make a bed. Break ground. Bury."."lunarCalendar": Winter Moon 20."suit": "Sacrificial rites. Sacrificial rites. To be depraved."dayOfYear": 6."weekOfYear": 1."constellation": "Scorpio"},... There's some data in the middle that doesn't show... {"date": "2018-01-28"."weekDay": 7."yearTips": "Ding You"."type": 1."typeDes": "Day of rest"."chineseZodiac": "Chicken"."solarTerms": "After Major Cold"."avoid": "Pray. Marry. Make temples. Install the bed. Thank the soil."."lunarCalendar": "Twelfth day of the twelfth lunar month"."suit": "Natchure. Pledge. Sacrifice. Beg heir. Fire. Plastic drawing. Cut clothes. Meet friends and relatives. Enter school. Disassemble. Sweep house. Build warehouse. Hang a plaque. Dig a well. Open a pool. Net, plant and feed. Ground breaking, grave repairing, monument erection. Burial."."dayOfYear": 28."weekOfYear": 4."constellation": "Scorpio"}}],... There is2Month to11The monthly figures do not show... {"month": 12."year": 2018."days": [{"date": "2018-12-01"."weekDay": 6."yearTips": "The reform"."type": 1."typeDes": "Day of rest"."chineseZodiac": "Dog"."solarTerms": "After a light snow"."avoid": "Cook. Cure."."lunarCalendar": "October 24"."suit": "Sacrifice. Pray. Pledge. Pick, cut, disassemble. Repair. Ground. Base. Bedding. Migration. House entry. Anxiang. Encoffination. Moving the coffin. Burial. Thank earth. To the appointment. Enter the population. Meet friends and relatives."."dayOfYear": 335."weekOfYear": 48."constellation": "Scorpio"},... There's some data in the middle that doesn't show... {"date": "2018-12-30"."weekDay": 7."yearTips": "The reform"."type": 1."typeDes": "New Year's day"."chineseZodiac": "Dog"."solarTerms": "After the winter solstice"."avoid": null."lunarCalendar": "Winter 24"."suit": "Plastic painting. Festival. Travel. Dismantle. Dismantle. Repair. Migration. Shipbuilding. Encoffination. Purge. Finish. Move the coffin. Qi Save. Repair grave. Monument. Xie soil. ""."dayOfYear": 364."weekOfYear": 52."constellation": "Scorpio"}]}]}Copy the code

Related instructions

This interface is by far the most used of all interfaces, so it was introduced in the first article in this series! The data in this interface contains 17 years of data from 2002 to 2019. As for why there is no data before 2002 and why there is no data after 2019, I need to clarify: [Gov.cn] At the end of each year, the holiday schedule of the next year is announced, so so far, only data of 2019 can be collected. Before 2002, there was no clear concept of holidays and relevant data, so relevant data cannot be collected.

As for data updates, WE will follow up with new information to ensure that we can provide accurate data as far as possible.

As for what these interfaces can do, I believe that as the service’s most used interface, should give you some inspiration.

conclusion

Jane books home page link is www.jianshu.com/u/123f97613…

Nuggets home page, link is juejin.cn/user/109916…

The Github homepage is linked to github.com/MZCretin

CSDN home page, link is blog.csdn.net/u010998327

I’m Cretin, a cute greasy uncle.