Is 2017 MacBook Air SSD compatible with mid 2013 MacBook Air 11"? I need to change the SSD of my MacBook Air 11" mid 2013 and I was wondering if the one of a newer MacBook Air 2017 would be compatible.
I researched online and I think that the ports remain the same (12+16 pins) but I was wondering if there would be any drive issue, and if so if it can be easily solved. 

How can I research what controllers or compatibility exists between OEM storage on various Mac?
I'm the author of the Apple SSD article that klanomath linked to in their comment and I wanted to clarify some things that seem to have been misinterpreted.

First of all, the Mid 2013 release of the MacBook Air 11" absolutely can use the faster PCIe 3.0 x4 drives from the 2015-2017 MacBook Air 13", which I refer to in the article as the Gen. 4A SSDs.

Allan's answer mentions that the 2015-2017 MacBook Air 13" drives are PCIe 2.0 x4, but they're in fact PCIe 3.0 x4 drives. It's the PCIe interface of the MacBook Airs logic board that is limited to PCIe 2.0 x4.

And the quirky firmware changes that prevent compatibility with earlier MacBook Airs were only present in the 128GB and 256GB PCIe 2.0 x2 drives (referred to as Gen. 4C in the article) found in the Early 2015 release of the MacBook Air 11". All of the drives found in Early 2015 and later MacBook Air 13" laptops are 100% compatible with earlier Mid 2013 and Early 2014 MacBook Airs, as is the 512GB drive from the Early 2015 release of the MacBook Air 11".

Everyone in this discussion missed this paragraph from the article:


  Despite the two channel drive, the 11″ MacBook Air actually supports
  four channel PCIe connections, and they can be upgraded with the Gen.
  4A drives found in other devices. In fact, if the 11″ MacBook Air was
  configured with a 512GB SSD from the factory, it already included the
  same Gen. 4A drive found in the other Apple computers of the era.


Despite all the good info in that article, it's a bit dense to read in places and I think much of the information could have been conveyed in a better way. I've recently started working on some improvements that should make it easier to quickly grasp the most important details and should be publishing those changes in the next couple weeks.