Dokumentacja API SeoStation

Dokumentacja API SeoStation

Autoryzacja

Do autoryzacji niezbędne jest posiadanie klucza API oraz ID Klienta, które muszą znaleźć się w każdym odpytaniu API.

Przykładowy klucz API: 1bpR9nLavpYZyO8Ke8jfGloBfVRDBxikvuTsw4oF

Przykładowy ID Klienta: S91

Metody

get_websites

Parametry:

  • key - Klucz API
  • client_id - ID Klienta

Przykład:

http://api.seostation.pl/get_websites?key=1bpR9nLavpYZyO8Ke8jfGloBfVRDBxikvuTsw4oF&client_id=S91

Rezultat: Rezultat zwracany jest w formacie JSON.

  • Result: Boolean
  • Websites: Array (mixed)
    • id- Integer
    • url - String

Przykładowy rezultat:

Array
	(
		[result] => 1
		[websites] => Array
		(
			[0] => Array
			(
				[id] => 1
				[url] => www.seostation.pl
			)
			[1] => Array
			(
				[id] => 2
				[url] => www.brandle.pl
			)
		)
	)
								

get_positions_by_id

Parametry:

  • key - Klucz API
  • client_id - ID Klienta
  • id - ID strony
  • date_from - Data od jakiej mają być pobrane pozycje. Format yyyy-mm-dd
  • date_to - Data dojakiej mają być pobrane pozycje. Format yyyy-mm-dd
  • search_engine (opcjonalnie) - wyszukiwarka jakiej dotyczą dane np. google.

Przykład:

http://api.seostation.pl/get_positions_by_id?key=1bpR9nLavpYZyO8Ke8jfGloBfVRDBxikvuTsw4oF&client_id=S91&id=60&date_from=2013-12-01&date_to=2013-12-31

Rezultat: Rezultat zwracany jest w formacie JSON.

  • Result: Boolean
  • Websites: Array (mixed)
    • id- Integer
    • url - String
    • positions - Array (mixed)
      • date_from - Date
      • date_to - Date
      • search_engine - String
      • phrases - Array (mixed)

Przykładowy rezultat:

Array
(
	[result] => 1
	[websites] => Array
	(
		[0] => Array
		(
			[id] => 1
			[url] => www.seostation.pl
			[positions] => Array
			(
				[date_from] => 2013-12-01
				[date_to] => 2013-12-31
				[search_engine] => google
				[phrases] => Array
				(
					[Seostation] => Array
					(
						[0] => 1
						[1] => 1
						[2] => 1
						[3] => 1
						[4] => 1
						[5] => 1
						[6] => 1
						[7] => 1
						[8] => 1
						[9] => 1
						[10] => 1
						[11] => 1
						[12] => 1
						[13] => 1
						[14] => 1
						[15] => 1
						[16] => 1
						[17] => 1
						[18] => 1
						[19] => 1
						[20] => 1
						[21] => 1
						[22] => 1
						[23] => 1
						[24] => 1
						[25] => 1
						[26] => 1
						[27] => 1
						[28] => 1
						[29] => 1
						[30] => 1
					)
					[Sprawdzanie pozycji w Google] => Array
					(
						[0] => 1
						[1] => 1
						[2] => 1
						[3] => 1
						[4] => 1
						[5] => 1
						[6] => 1
						[7] => 1
						[8] => 1
						[9] => 1
						[10] => 1
						[11] => 1
						[12] => 1
						[13] => 1
						[14] => 1
						[15] => 1
						[16] => 1
						[17] => 1
						[18] => 1
						[19] => 1
						[20] => 1
						[21] => 1
						[22] => 1
						[23] => 1
						[24] => 1
						[25] => 1
						[26] => 1
						[27] => 1
						[28] => 1
						[29] => 1
						[30] => 1
					)
				)
			)
		)
	)
)
								

get_positions_by_url

Parametry:

  • key - Klucz API
  • client_id - ID Klienta
  • url - URL strony.
    • Podanie samej domeny zwróci wszystkie strony w danej domenie.
    • Podanie adresu z www zwróci strony zdefiniowane w prefixem www.
    • Podanie adresu z pełną ścieżką zwróci strony z pełnym dopasowaniem ścieżki.
  • date_from - Data od jakiej mają być pobrane pozycje. Format yyyy-mm-dd
  • date_to - Data dojakiej mają być pobrane pozycje. Format yyyy-mm-dd
  • search_engine (opcjonalnie) - wyszukiwarka jakiej dotyczą dane np. google.

Przykład:

http://api.seostation.pl/get_positions_by_url?key=1bpR9nLavpYZyO8Ke8jfGloBfVRDBxikvuTsw4oF&client_id=S91&url=seostation.pldate_from=2013-12-01&date_to=2013-12-31

Rezultat: Rezultat zwracany jest w formacie JSON.

  • Result: Boolean
  • Websites: Array (mixed)
    • id- Integer
    • url - String
    • positions - Array (mixed)
      • date_from - Date
      • date_to - Date
      • search_engine - String
      • phrases - Array (mixed)

Przykładowy rezultat:

Array
(
	[result] => 1
	[websites] => Array
	(
		[0] => Array
		(
			[id] => 1
			[url] => www.seostation.pl
			[positions] => Array
			(
				[date_from] => 2013-12-01
				[date_to] => 2013-12-31
				[search_engine] => google
				[phrases] => Array
				(
					[Seostation] => Array
					(
						[0] => 1
						[1] => 1
						[2] => 1
						[3] => 1
						[4] => 1
						[5] => 1
						[6] => 1
						[7] => 1
						[8] => 1
						[9] => 1
						[10] => 1
						[11] => 1
						[12] => 1
						[13] => 1
						[14] => 1
						[15] => 1
						[16] => 1
						[17] => 1
						[18] => 1
						[19] => 1
						[20] => 1
						[21] => 1
						[22] => 1
						[23] => 1
						[24] => 1
						[25] => 1
						[26] => 1
						[27] => 1
						[28] => 1
						[29] => 1
						[30] => 1
					)
					[Sprawdzanie pozycji w Google] => Array
					(
						[0] => 1
						[1] => 1
						[2] => 1
						[3] => 1
						[4] => 1
						[5] => 1
						[6] => 1
						[7] => 1
						[8] => 1
						[9] => 1
						[10] => 1
						[11] => 1
						[12] => 1
						[13] => 1
						[14] => 1
						[15] => 1
						[16] => 1
						[17] => 1
						[18] => 1
						[19] => 1
						[20] => 1
						[21] => 1
						[22] => 1
						[23] => 1
						[24] => 1
						[25] => 1
						[26] => 1
						[27] => 1
						[28] => 1
						[29] => 1
						[30] => 1
					)
				)
			)
		)
	)
)
							

Kody błędów

  • 100 - Nieznany
  • 101 - Błąd serwera.
  • 200 - Niepoprawna autoryzacja.
  • 201 - Metoda nie istnieje.
  • 202 - Niepoprawna liczba parametrów.
  • 301 - Niepoprawny ID.
  • 302 - Niepoprawna data (prawidłowy format: yyyy-mm-dd).
  • 303 - Niepoprawny url.
  • 304 - Zbyt duża różnica pomiędzy datami (maksylanie 12 miesięcy).
  • 305 - Niepoprawna kolejność dat.
  • 306 - Nie odnaleziono wyszukiwarki.
  • 307 - Nie odnaleziono strony.
  • 308 - Data nie może być większa niż dzisiejsza