Skip to main content

wrapper for yandex webmaster api

Install

Install using pip...

pip install yandex-webmaster-api

Usage

=======

from yandex_webmaster import YandexWebmaster
client = YandexWebmaster('<access_token>')

get hosts

hosts = client.get_hosts()

get popular search queries

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_popular_search_queries('<host_id>', date_from, date_to, query_indicator=['TOTAL_SHOWS'])

get search query all history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_search_query_all_history('<host_id>', date_from, date_to, query_indicator=['TOTAL_SHOWS'], device_type_indicator='DESKTOP')

get single search query history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_single_search_query_history('<host_id>', '<query_id>', date_from, date_to, query_indicator=['TOTAL_SHOWS'], device_type_indicator='DESKTOP')

get list query analytics

result = client.get_list_query_analytics('<host_id>', "ALL", limit=500, offset=500)

get host info

result = client.get_host('<host_id>')

get sqi history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_sqi_history('<host_id>', '<query_id>', date_from, date_to)

add host

result = client.add_host(host_url='<host_url>')

delete host

result = client.delete_host(host_id='<host_id>')

get sitemaps

result = client.get_sitemaps(host_id='<host_id>')

get_sitemap

result = client.get_sitemap(host_id='<host_id>', sitemap_id='<sitemap_id>')

add sitemap

result = client.add_sitemap(host_id='<host_id>', host_url='<host_url>')

delete sitemap

result = client.delete_sitemap(host_id='<host_id>', sitemap_id='<sitemap_id>')

get indexing stats

result = client.get_indexing_stats(host_id='<host_id>')

get indexing history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_indexing_history(host_id='<host_id>', date_from=date_from, date_to=date_to)

get indexing samples

result = client.get_indexing_samples(host_id='<host_id>')

get monitoring important urls

result = client.get_monitoring_important_urls(host_id='<host_id>')

get important url history

result = client.get_important_url_history(host_id='<host_id>', url='<url>')

get insearch url history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_important_url_history(host_id='<host_id>', date_from=date_from, date_to=date_to)

get insearch url samples

result = client.get_insearch_url_samples(host_id='<host_id>', limit=limit, offset=offset)

get insearch url events history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_insearch_url_events_history(host_id='<host_id>', date_from=date_from, date_to=date_to)

get insearch url events samples

result = client.get_insearch_url_events_samples(host_id='<host_id>', limit=limit, offset=offset)

recrawl url

result = client.recrawl_url(host_id='<host_id>', url='<recrawl_url>')

get recrawl task

result = client.get_recrawl_task(host_id='<host_id>', task_id='<task_id>')

get recrawl tasks

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_recrawl_tasks(
    host_id='<host_id>',
    date_from=date_from,
    date_to=date_to,
    limit=10,
    offset=10
)

get recrawl quota

result = client.get_recrawl_quota(host_id='<host_id>')

diagnostic site

result = client.diagnostic_site(host_id='<host_id>')

get broken internal links samples

result = client.get_broken_internal_links_samples(host_id='<host_id>', indicator='SITE_ERROR')

get broken internal links history

from datetime import datetime, timedelta
date_from = datetime.now() - timedelta(days=4)
date_to = datetime.now()
result = client.get_broken_internal_links_samples(host_id='<host_id>', date_from=date_from, date_to=date_to)

get external links samples

result = client.get_external_links_samples(host_id='<host_id>')

get external links history

result = client.get_external_links_history(host_id='<host_id>')

CHANGELOG

0.0.3 - change query_indicator params to list[str] 0.0.2 - add get_list_query_analytics method

Metadata

Release files for yandex-webmaster-api 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yandex-webmaster-api 0.0.3
File Size Uploaded
yandex-webmaster-api-0.0.3.tar.gz 8.7 kB Details

Release files / yandex-webmaster-api-0.0.3.tar.gz

Download URL yandex-webmaster-api-0.0.3.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3e1899e254e0030d1c1d7b9db24cce2a8a8fce50bce907e14416d6cf41a4e5ee
BLAKE2b-256 checksum
How to use checksums
ee7646f63b151ce2515340793ae981075b1424e322129c353dd07839e962c479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page