GoogleAdsService ব্যবহার করে স্ট্রিমিং রিপোর্ট করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Google Ads API এন্টিটি এবং রিপোর্টিং ডেটা পুনরুদ্ধার করতে, এই পদ্ধতিগুলির মধ্যে একটি ব্যবহার করুন:
এখানে দুটি পদ্ধতির জন্য উচ্চ-স্তরের পার্থক্য রয়েছে:
| GoogleAdsService.Searchstream | GoogleAdsService.Search |
---|
উত্পাদন কোড জন্য উপযুক্ত | হ্যাঁ | হ্যাঁ |
---|
সেবা | GoogleAdsService | GoogleAdsService |
---|
দৃশ্যকল্প | বস্তু এবং প্রতিবেদন আনা হচ্ছে | বস্তু এবং প্রতিবেদন আনা হচ্ছে |
---|
প্রতিক্রিয়া | GoogleAdsRow অবজেক্টের স্ট্রীম | GoogleAdsRow অবজেক্টের পৃষ্ঠা |
---|
প্রতিক্রিয়া ক্ষেত্র | শুধুমাত্র যারা ক্যোয়ারীতে উল্লেখ করা হয়েছে | শুধুমাত্র যারা ক্যোয়ারীতে উল্লেখ করা হয়েছে |
---|
দৈনিক সীমা | অ্যাক্সেস স্তরের উপর ভিত্তি করে দৈনিক সীমা | অ্যাক্সেস স্তরের উপর ভিত্তি করে দৈনিক সীমা |
---|
SearchStream
বনাম Search
Search
সম্পূর্ণ রিপোর্ট ডাউনলোড করার জন্য একাধিক পেজিনেটেড অনুরোধ পাঠাতে পারে, SearchStream
একটি অনুরোধ পাঠায় এবং রিপোর্টের আকার নির্বিশেষে Google Ads API-এর সাথে একটি অবিরাম সংযোগ শুরু করে।
SearchStream
এর জন্য, ডেটা প্যাকেটগুলি ডাটা বাফারে ক্যাশে থাকা সম্পূর্ণ ফলাফলের সাথে সাথে সাথেই ডাউনলোড হতে শুরু করে৷ সম্পূর্ণ স্ট্রীম শেষ হওয়ার জন্য অপেক্ষা না করেই আপনার কোডটি বাফার করা ডেটা পড়া শুরু করতে পারে।
আপনার অ্যাপের উপর নির্ভর করে Search
প্রতিক্রিয়ার প্রতিটি পৃথক পৃষ্ঠার অনুরোধ করার জন্য প্রয়োজনীয় রাউন্ড-ট্রিপ নেটওয়ার্ক সময় বাদ দিয়ে, SearchStream
পেজিং এর উপর উন্নত কর্মক্ষমতা অফার করতে পারে, বিশেষ করে বড় রিপোর্টের জন্য।
উদাহরণ
এই উদাহরণটি 100,000
সারি নিয়ে গঠিত একটি প্রতিবেদনের দিকে নজর দেয়। নিম্নলিখিত সারণী দুটি পদ্ধতির মধ্যে অ্যাকাউন্টিং পার্থক্য ভেঙ্গে দেয়।
| সার্চ স্ট্রীম | অনুসন্ধান করুন |
---|
পৃষ্ঠার আকার | প্রযোজ্য নয় | প্রতি পৃষ্ঠায় 10,000 সারি |
---|
API অনুরোধের সংখ্যা | 1 অনুরোধ | 10টি অনুরোধ |
---|
API প্রতিক্রিয়ার সংখ্যা | 1 একটানা প্রবাহ | 10টি প্রতিক্রিয়া |
---|
বেশিরভাগ ব্যবহারের ক্ষেত্রে, আমরা নিম্নলিখিত কারণগুলির জন্য Search
উপর SearchStream
সুপারিশ করি:
একক পৃষ্ঠার রিপোর্টের জন্য (10,000 সারির নিচে): দুটি পদ্ধতির মধ্যে কোনো উল্লেখযোগ্য পারফরম্যান্স পার্থক্য নেই।
একাধিক পৃষ্ঠার প্রতিবেদনের জন্য: SearchStream
সাধারণত দ্রুত হয় কারণ একাধিক রাউন্ড ট্রিপ এড়ানো হয়, এবং ডিস্ক ক্যাশে থেকে পড়া বা লেখার কোনো কারণ নেই।
হারের সীমা
উভয় পদ্ধতির জন্য দৈনিক সীমাগুলি আপনার বিকাশকারী টোকেনের মান সীমা এবং অ্যাক্সেসের স্তরগুলি মেনে চলে। ফলাফল পৃষ্ঠা বা স্ট্রিম করা যাই হোক না কেন একটি একক প্রশ্ন বা প্রতিবেদনকে একটি অপারেশন হিসাবে গণনা করা হয়।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Google Ads API offers two primary methods for retrieving data: \u003ccode\u003eSearchStream\u003c/code\u003e and \u003ccode\u003eSearch\u003c/code\u003e, both suitable for production environments and fetching objects and reports.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSearchStream\u003c/code\u003e delivers results as a continuous stream, ideal for large reports, while \u003ccode\u003eSearch\u003c/code\u003e provides paginated responses.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSearchStream\u003c/code\u003e often offers performance advantages by reducing network round trips, especially for reports exceeding 10,000 rows.\u003c/p\u003e\n"],["\u003cp\u003eBoth methods are subject to the same daily limits and access levels, with a single query or report counting as one operation regardless of the method.\u003c/p\u003e\n"],["\u003cp\u003eGoogle recommends using \u003ccode\u003eSearchStream\u003c/code\u003e for most use cases due to its performance benefits for larger reports.\u003c/p\u003e\n"]]],[],null,["# Report streaming using GoogleAdsService\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nTo retrieve Google Ads API entities and reporting data, use one of these methods:\n\n- [`GoogleAdsService.SearchStream`](/google-ads/api/reference/rpc/v21/GoogleAdsService/SearchStream)\n- [`GoogleAdsService.Search`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Search)\n\nHere are the high-level distinctions for the two methods:\n\n| | GoogleAdsService.SearchStream | GoogleAdsService.Search |\n| Suitable for production code | **Yes** | **Yes** |\n| Service | [`GoogleAdsService`](/google-ads/api/reference/rpc/v21/GoogleAdsService) | [`GoogleAdsService`](/google-ads/api/reference/rpc/v21/GoogleAdsService) |\n| Scenario | Fetching objects and reports | Fetching objects and reports |\n| Response | **Stream** of [`GoogleAdsRow`](/google-ads/api/reference/rpc/v21/GoogleAdsRow) objects | Pages of [`GoogleAdsRow`](/google-ads/api/reference/rpc/v21/GoogleAdsRow) objects |\n| Response's fields | Only those specified in the query | Only those specified in the query |\n| Daily limits | Daily limits based on [access levels](/google-ads/api/docs/access-levels) | Daily limits based on [access levels](/google-ads/api/docs/access-levels) |\n|------------------------------|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n\n`SearchStream` versus `Search`\n------------------------------\n\nWhile [`Search`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Search) can send multiple\npaginated requests to download the entire report, [`SearchStream`](/google-ads/api/reference/rpc/v21/GoogleAdsService/SearchStream) sends a single request and\ninitiates a persistent connection with the Google Ads API regardless of report size.\n\nFor `SearchStream`, data packets start to download immediately with the entire\nresult cached in a data buffer. Your code can start reading the buffered data\nwithout having to wait for the entire stream to finish.\n\nBy eliminating the round-trip network time required to request each individual\npage of a `Search` response, depending on your app, `SearchStream` can offer\nimproved performance over paging, especially for bigger reports.\n\n### Example\n\nThis example looks at a report that consists of `100,000` rows. The following\ntable breaks down the accounting differences between the two methods.\n\n| | SearchStream | Search |\n| Page size | Not Applicable | 10,000 rows per page |\n| Number of API requests | 1 request | 10 requests |\n| Number of API responses | 1 continuous stream | 10 responses |\n|-------------------------|---------------------|----------------------|\n\n### Performance factors\n\nFor most use cases, we recommend `SearchStream` over `Search` for the following\nreasons:\n\n- For single page reports (under 10,000 rows): No significant performance\n differences between the two methods.\n\n- For multiple page reports: `SearchStream` is typically faster since multiple\n round trips are avoided, and reading or writing from disk cache is less of a\n factor.\n\n### Rate limits\n\nDaily limits for both methods adhere to the standard limits and [access\nlevels](/google-ads/api/docs/access-levels) of your developer token. A single query or report\nis counted as one operation regardless of the result being paged or streamed."]]