Scarlatti has been in Spain and in Portugal. In Portugal he worked with a great portuguese composer, Carlos Seixas (You may wish to see in youtube Carlos Seixas Concert for harpsichord and orchestra in A major,m its amazing). Both Scarlatti and Seixas were inspired by portuguese and spanish popular music. With Bach, that influence seems less probable.