Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yandex-webmaster-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yandex-webmaster-api

wrapper for yandex webmaster api

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

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

  • doc - https://yandex.ru/dev/webmaster/doc/dg/reference/hosts.html
hosts = client.get_hosts()
  • doc - https://yandex.ru/dev/webmaster/doc/dg/reference/host-search-queries-popular.html
  • params
    nametypedefault value
    host_idstrrequired
    date_fromdatetimerequired
    date_todatetimerequired
    query_indicatorstrrequired
    order_byOptional[str]TOTAL_SHOWS
    device_type_indicatorOptional[str]None
    limitint500
    offsetint0
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>')
result = client.get_broken_internal_links_samples(host_id='<host_id>', indicator='SITE_ERROR')
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)
result = client.get_external_links_samples(host_id='<host_id>')
result = client.get_external_links_history(host_id='<host_id>')

CHANGELOG

0.0.2 - add get_list_query_analytics method

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc