In the present work, we have studied the effect of alloying with one and two palladium atoms on the electronic properties and absorption spectra of the small silver nanoclusters. According to the nature of the absorption phenomenon that is a time-dependent quantum mechanical phenomenon, we have used the time-dependent density functional theory (TDDFT) in our calculations. The calculations are performed using the Octopus Package. This computational Package is produced based on the TDDFT. It uses the pseudopotential approach and expands the wave functions and other respective quantities in the real space. It should be noted that, since this code has a serious problems to optimize the geometry of the structures, we have used the Quantum ESPRESSO code for the relaxation of structures. The obtained results for the absorption spectra are in good agreement with the available exper-imental data. We have seen a very strong peak in the absorption spectrum of the silver nanocl-uster with six atoms (hexamer) that is the largest ilver nanoclusters in two dimensions (2D). We have attributed this peak to the high ymmetry of their structures. For Ag 6 We realize that if we add the absorption spectra of more stable structure and first isomer of it, the experiment-al and computational results are comparable. Hence we have concluded that there are both the more stable structure and its first isomer in the experimental sample of this nonocluster. The r-esults show that alloying with alladium increase the number of peaks and also some of them becoms wide. Similarly, it was observed that the d orbital of alladium atoms, as a retaining wall, causes a weak transition from the s orbital of silver to the conduction states. This leads to weak the peaks with low energy. Keywords: Time-dependent density functional theory, Ag clusters, AgPd clusters, Octopus code, absorption spectra, degeneracy