পূর্বশর্ত
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই নথিটি আপনার প্রথম ক্লায়েন্ট অ্যাপ্লিকেশন লেখার আগে আপনার যা করা উচিত তা বর্ণনা করে।
একটি Google অ্যাকাউন্ট পান
এই API ব্যবহার করার জন্য আপনার একটি Google অ্যাকাউন্ট প্রয়োজন৷ সেই প্রপার্টিতে সেই পদ্ধতিটিকে কল করার জন্য আপনার অ্যাকাউন্টের একটি প্রদত্ত সম্পত্তিতে উপযুক্ত অনুসন্ধান কনসোলের অনুমতি থাকতে হবে। উদাহরণস্বরূপ, searchAnalytics.query চালানোর জন্য আপনাকে সেই সম্পত্তিতে পড়ার অনুমতি নিতে হবে।
Google সার্চ কনসোল ব্যবহার করে দেখুন
এই API ডকুমেন্টেশন অনুমান করে যে আপনি Google অনুসন্ধান কনসোল ব্যবহার করেছেন এবং আপনি ওয়েব প্রোগ্রামিং ধারণা এবং ওয়েব ডেটা ফর্ম্যাটের সাথে পরিচিত৷
আপনি যদি Google সার্চ কনসোল ব্যবহার না করে থাকেন, তাহলে কোড শুরু করার আগে ইউজার ইন্টারফেস ব্যবহার করে দেখুন। প্রতিটি API সার্চ কনসোলে একটি প্রতিবেদনের কার্যকারিতা উপস্থাপন করে। আপনি প্রাপ্ত ডেটা বোঝার জন্য একটি API ব্যবহার করার আগে আপনার সমতুল্য প্রতিবেদনের ডকুমেন্টেশন পড়া উচিত।
আপনার ক্লায়েন্টের জন্য একটি প্রকল্প এবং শংসাপত্র তৈরি করুন
আপনি Google Search Console-এ অনুরোধ পাঠাতে পারার আগে, আপনাকে Google কে আপনার ক্লায়েন্ট সম্পর্কে বলতে হবে এবং API-এ অ্যাক্সেস সক্রিয় করতে হবে। আপনি একটি প্রকল্প তৈরি করতে Google API কনসোল ব্যবহার করে এটি করেন, যা সেটিংস এবং API অ্যাক্সেস তথ্যের একটি নামকৃত সংগ্রহ, এবং আপনার অ্যাপ্লিকেশন নিবন্ধন করুন৷
টেস্টিং টুল এপিআই ছাড়া সব সার্চ কনসোল API-এর জন্য OAuth2 শংসাপত্র প্রয়োজন। পাইথন এবং জাভা কুইকস্টার্ট গাইডগুলি কীভাবে একটি প্রকল্প তৈরি করতে হয় এবং আপনার ক্লায়েন্টের জন্য শংসাপত্রগুলি পেতে হয় তার বিশদ প্রদান করে।
REST বুঝুন
API চালু করার দুটি উপায় রয়েছে:
আপনি যদি ক্লায়েন্ট লাইব্রেরি ব্যবহার না করার সিদ্ধান্ত নেন, তাহলে আপনাকে REST এর মূল বিষয়গুলি বুঝতে হবে।
REST বেসিক
REST হল সফ্টওয়্যার আর্কিটেকচারের একটি শৈলী যা ডেটা অনুরোধ এবং পরিবর্তন করার জন্য একটি সুবিধাজনক এবং সামঞ্জস্যপূর্ণ পদ্ধতি প্রদান করে।
REST শব্দটি " রিপ্রেজেন্টেশনাল স্টেট ট্রান্সফার " এর জন্য সংক্ষিপ্ত। Google API-এর প্রসঙ্গে, এটি Google দ্বারা সংরক্ষিত ডেটার উপস্থাপনা পুনরুদ্ধার এবং সংশোধন করার জন্য HTTP ক্রিয়া ব্যবহারকে বোঝায়।
একটি RESTful সিস্টেমে, সম্পদ একটি ডেটা স্টোরে সংরক্ষণ করা হয়; একটি ক্লায়েন্ট একটি অনুরোধ পাঠায় যে সার্ভার একটি নির্দিষ্ট ক্রিয়া সম্পাদন করে (যেমন একটি সংস্থান তৈরি করা, পুনরুদ্ধার করা, আপডেট করা বা মুছে ফেলা), এবং সার্ভার ক্রিয়াটি সম্পাদন করে এবং একটি প্রতিক্রিয়া পাঠায়, প্রায়শই নির্দিষ্ট সংস্থানের উপস্থাপনা আকারে।
Google-এর RESTful API-এ, ক্লায়েন্ট একটি HTTP ক্রিয়া যেমন POST
, GET
, PUT
, বা DELETE
ব্যবহার করে একটি ক্রিয়া নির্দিষ্ট করে৷ এটি নিম্নলিখিত ফর্মের একটি বিশ্বব্যাপী-অনন্য URI দ্বারা একটি সংস্থান নির্দিষ্ট করে:
https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters
যেহেতু সমস্ত API সংস্থানগুলিতে অনন্য HTTP- অ্যাক্সেসযোগ্য URI রয়েছে, REST ডেটা ক্যাশিং সক্ষম করে এবং ওয়েবের বিতরণ করা অবকাঠামোর সাথে কাজ করার জন্য অপ্টিমাইজ করা হয়৷
আপনি HTTP 1.1 স্ট্যান্ডার্ড ডকুমেন্টেশনে পদ্ধতির সংজ্ঞাগুলি দরকারী খুঁজে পেতে পারেন; তারা GET
, POST
, PUT
, এবং DELETE
এর স্পেসিফিকেশন অন্তর্ভুক্ত করে।
Google সার্চ কনসোল এপিআই-এ বিশ্রাম নিন
Google সার্চ কনসোল এপিআই অপারেশন সরাসরি REST HTTP ক্রিয়ায় ম্যাপ করে।
বেশিরভাগ গুগল সার্চ কনসোল এপিআই ইউআরআই-এর বিন্যাস এরকম কিছু:
VERB https://www.googleapis.com/webmasters/v3/resourcePath?parameters
প্রতিটি পদ্ধতির জন্য ব্যবহৃত URI এবং ক্রিয়াগুলির সম্পূর্ণ সেট Google অনুসন্ধান কনসোল API রেফারেন্স ওভারভিউতে দেওয়া হয়েছে।
JSON বেসিক বুঝুন
Google Search Console API JSON ফর্ম্যাটে ডেটা প্রদান করে।
JSON (জাভাস্ক্রিপ্ট অবজেক্ট নোটেশন) হল একটি সাধারণ, ভাষা-স্বাধীন ডেটা ফর্ম্যাট যা নির্বিচারে ডেটা স্ট্রাকচারের একটি সাধারণ পাঠ্য উপস্থাপনা প্রদান করে। আরও তথ্যের জন্য, json.org দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2024-07-23 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2024-07-23 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eBefore using the Google Search Console API, you must have a Google Account with the necessary Search Console permissions.\u003c/p\u003e\n"],["\u003cp\u003eFamiliarize yourself with the Google Search Console user interface and its reports to understand the data the API provides.\u003c/p\u003e\n"],["\u003cp\u003eCreate a project in the Google API Console and obtain OAuth2 credentials to enable your client application's access to the API.\u003c/p\u003e\n"],["\u003cp\u003eUnderstand REST principles, particularly HTTP verbs and resource URIs, to interact with the API directly or choose to use client libraries.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Search Console API uses JSON for data exchange, so understanding this format is essential for processing API responses.\u003c/p\u003e\n"]]],["Before creating a client application, obtain a Google Account with Search Console permissions. Familiarize yourself with Google Search Console's user interface and relevant report documentation. Create a Google API Console project to register your application and get OAuth2 credentials. If not using client libraries, understand REST basics, including HTTP verbs (GET, POST, PUT, DELETE) and URIs. Finally, learn JSON, the data format used by the Google Search Console API.\n"],null,["# Prerequisites\n\nThis document describes the things you should do before\nwriting your first client application.\n\nGet a Google Account\n--------------------\n\nYou need a [Google Account](https://www.google.com/accounts/NewAccount) to use this API.\nYour account must have the appropriate Search Console permission on a given property in order to\ncall that method on that property. For example, in order to run [searchAnalytics.query](/webmaster-tools/v1/searchanalytics/query)\nyou need read permissions on that property.\n\nTry out Google Search Console\n-----------------------------\n\nThis API documentation assumes that you've used [Google Search Console](https://search.google.com/search-console/), and that you're familiar with web programming concepts and web data formats.\n\nIf you haven't used Google Search Console, then try out the [user interface](https://search.google.com/search-console/) before starting to code.\nEach API represents the functionality of a report in Search Console. You should [read the documentation for the equivalent report](https://support.google.com/webmasters/topic/9456557) before using an API in order to understand the data you receive.\n\nCreate a project and credentials for your client\n------------------------------------------------\n\nBefore you can send requests to Google Search Console, you need to tell Google about your client and\nactivate access to the API. You do this by using the Google API Console to create a project,\nwhich is a named collection of settings and API access information, and register your application.\n\n\nAll Search Console APIs except the Testing Tools API require OAuth2 credentials.\nThe Python and Java quickstart guides provide details on how to create a project and get credentials for your client.\n\nUnderstand REST basics\n----------------------\n\nThere are two ways to invoke the API:\n\n- Sending HTTP requests and parsing the responses.\n- Using [client libraries](./libraries).\n\nIf you decide not to use client libraries, you'll need to understand the basics of REST.\n\n#### REST basics\n\nREST is a style of software architecture that provides a convenient and consistent approach to requesting and modifying data.\n\nThe term REST is short for \"[Representational State Transfer](https://en.wikipedia.org/wiki/Representational_state_transfer).\" In the context of Google APIs, it refers to using HTTP verbs to retrieve and modify representations of data stored by Google.\n\nIn a RESTful system, resources are stored in a data store; a client sends a request that the server perform a particular action (such as creating, retrieving, updating, or deleting a resource), and the server performs the action and sends a response, often in the form of a representation of the specified resource.\n\nIn Google's RESTful APIs, the client specifies an action using an HTTP verb such as `POST`, `GET`, `PUT`, or `DELETE`. It specifies a resource by a globally-unique URI of the following form: \n\n```\nhttps://www.googleapis.com/apiName/apiVersion/resourcePath?parameters\n```\n\nBecause all API resources have unique HTTP-accessible URIs, REST enables data caching and is optimized to work with the web's distributed infrastructure.\n\nYou may find the [method definitions](https://tools.ietf.org/html/rfc7231#section-4.3) in the HTTP 1.1 standards documentation useful; they include specifications for `GET`, `POST`, `PUT`, and `DELETE`.\n\n### REST in the Google Search Console API\n\nThe Google Search Console API operations map directly to REST HTTP verbs.\n\nThe format for most Google Search Console API URIs are something like this: \n\n```\nVERB https://www.googleapis.com/webmasters/v3/resourcePath?parameters\n```\n\nThe full set of URIs and verbs used for each method are given in the [Google Search Console API Reference](/webmaster-tools/v1/api_reference_index) overview.\n\nUnderstand JSON basics\n----------------------\n\nThe Google Search Console API returns data in JSON format.\n\n\n[JSON](http://en.wikipedia.org/wiki/JSON) (JavaScript Object Notation) is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see [json.org](http://www.json.org/).\n\n\u003cbr /\u003e"]]