> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pubrio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# تفصيل استخدام API

> استرجع تفصيلًا لطلبات API والأرصدة المستهلَكة ضمن نطاق تاريخ، مجمَّعًا حسب مفتاح API الفردي (`by_key`) وحسب النقطة الطرفية (`by_endpoint`) على حد سواء. مفيد لتحديد المفاتيح الأعلى حركة مرور والنقاط الطرفية الأكثر استهلاكًا للأرصدة عبر مساحة العمل.



## OpenAPI

````yaml ar-openapi POST /api_keys/usage/breakdown
openapi: 3.0.0
info:
  description: >-
    تقدّم واجهة Pubrio API معلومات استخباراتية عن توسع السوق — إشارات في الوقت
    الفعلي تُعلِم عندما تدخل شركة سوقًا جديدة — إلى جانب بيانات الشركات والأشخاص
    التي تستند إليها. ابحث، وتحقق، وأثرِ الحسابات وجهات التواصل، واشترك في
    إشارات تحرك مصنَّفة ومؤرَّخة عبر أكثر من 200 سوق.
  version: 1.0.0
  title: Pubrio OpenAPI
  termsOfService: https://pubrio.com/ar/terms-of-service
  contact:
    email: king.lai@pubrio.com
    name: King Lai
    url: https://pubrio.com/ar/get-in-touch
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.pubrio.com
security:
  - pubrio_api_key: []
tags:
  - name: Profile
    description: معلومات ملف مساحة العمل وإحصاءات الاستخدام
  - name: Enrichment
    description: إثراء سجلات الأشخاص والشركات ببيانات B2B مفصّلة
  - name: Lookalike
    description: إيجاد شركات مشابهة لشركة معينة
  - name: Search
    description: البحث عن أشخاص وشركات ووظائف وأخبار وإعلانات بمرشحات
  - name: Lookup
    description: البحث عن معلومات مفصّلة لأشخاص وشركات ووظائف وأخبار وإعلانات وتقنيات محددة
  - name: LinkedIn
    description: البحث عن بيانات أشخاص وشركات عبر روابط ملفات LinkedIn
  - name: Redeem
    description: استبدال أرصدة لفتح بيانات تواصل الأشخاص (فردي ودفعي)
  - name: Channels
    description: إدارة قوالب قنوات التواصل (إنشاء، تحديث، حذف، سرد)
  - name: Monitor
    description: إنشاء وإدارة Monitors للبيانات بواجهات webhook، وإحصاءات، ومعالجة
  - name: Filters
    description: >-
      استرجاع قيم المرشحات المتاحة لمعاملات البحث (التقنيات، المواقع، القطاعات،
      إلخ)
  - name: API Keys
    description: سرد وفحص سجلات طلبات API وتحليلات الاستخدام لمفاتيح API
  - name: Insights
    description: رؤى إشارات مجمَّعة للشركات (الوظائف، الأخبار، الإعلانات).
  - name: Export
    description: تصدير بيانات دفعي (مقيَّد بالأرصدة).
  - name: Expansion
    description: >-
      معلومات استخباراتية عن توسع الشركات في السوق: الإشارات، المراحل، الأسواق،
      والتصدير.
externalDocs:
  description: >-
    The Pubrio API is used to search, preview and enrich Contacts and Accounts.
    Pubrio database provides extensive B2B contacts and sales intelligence data.
  url: https://docs.pubrio.com
paths:
  /api_keys/usage/breakdown:
    post:
      tags:
        - API Keys
      summary: الحصول على تفصيل استخدام API حسب المفتاح والنقطة الطرفية
      description: >-
        استرجع تفصيلًا لطلبات API والأرصدة المستهلَكة ضمن نطاق تاريخ، مجمَّعًا
        حسب مفتاح API الفردي (`by_key`) وحسب النقطة الطرفية (`by_endpoint`) على
        حد سواء. مفيد لتحديد المفاتيح الأعلى حركة مرور والنقاط الطرفية الأكثر
        استهلاكًا للأرصدة عبر مساحة العمل.
      operationId: api_keys_get_usage_breakdown
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - start_date
                - end_date
              properties:
                start_date:
                  type: string
                  example: '2026-05-01'
                  description: >-
                    بداية نطاق التاريخ بصيغة `YYYY-MM-DD` (مفسَّرة بتوقيت منطقة
                    عمل مساحة العمل).
                end_date:
                  type: string
                  example: '2026-05-14'
                  description: >-
                    نهاية نطاق التاريخ بصيغة `YYYY-MM-DD` (مفسَّرة بتوقيت منطقة
                    عمل مساحة العمل).
                keys:
                  type: array
                  items:
                    type: string
                  description: >-
                    قائمة اختيارية من معرّفات مفتاح API المُخفاة (مثل
                    `0••••••••••••••••f39`) لتقييد النتائج بمفاتيح محددة. استخدم
                    القيم المُخفاة التي تُعيدها `/api_keys` أو حقل
                    `masked_authentication` في إدخال سجل.
                log_type_slugs:
                  type: array
                  items:
                    type: string
                  description: >-
                    قائمة اختيارية من الأسماء القياسية لنوع السجل (مثل
                    `people_search`، `company_search`، `people_redeem`) لتقييد
                    النتائج بنقاط طرفية محددة.
      responses:
        '200':
          description: استجابة ناجحة تحتوي على تفصيل استخدام API.
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    properties:
                      filters:
                        type: object
                        description: >-
                          عرض لمرشحات الطلب المُستخدَمة لإنتاج هذه الاستجابة،
                          بعد إزالة القيم الفارغة.
                        additionalProperties: true
                  data:
                    type: object
                    properties:
                      by_key:
                        type: array
                        description: >-
                          الاستخدام مجمَّعًا حسب مفتاح API (أعلى 100، مرتبة حسب
                          الأرصدة ثم الطلبات).
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: معرّف مفتاح API المُخفى.
                            requests:
                              type: integer
                              description: عدد الطلبات المُنفَّذة بهذا المفتاح.
                            credits:
                              type: number
                              description: الأرصدة المستهلَكة بهذا المفتاح.
                            last_used:
                              type: string
                              nullable: true
                              description: >-
                                الطابع الزمني لأحدث طلب بهذا المفتاح، أو `null`
                                إن لم يُستخدَم قط ضمن النطاق.
                            percent_of_requests:
                              type: number
                              description: نسبة إجمالي الطلبات، كنسبة مئوية.
                            percent_of_credits:
                              type: number
                              description: نسبة إجمالي الأرصدة، كنسبة مئوية.
                      by_endpoint:
                        type: array
                        description: >-
                          الاستخدام مجمَّعًا حسب النقطة الطرفية (أعلى 100، مرتبة
                          حسب الأرصدة ثم الطلبات).
                        items:
                          type: object
                          properties:
                            slug:
                              type: string
                              nullable: true
                              description: >-
                                الاسم القياسي لنوع السجل. `null` للطلبات غير
                                المرتبطة بنوع سجل قابل للفوترة.
                            name:
                              type: string
                              description: اسم نوع السجل القابل للقراءة.
                            requests:
                              type: integer
                            credits:
                              type: number
                            cost_per_call:
                              type: number
                              description: متوسط الأرصدة لكل طلب لهذه النقطة الطرفية.
                            percent_of_requests:
                              type: number
                              description: نسبة إجمالي الطلبات، كنسبة مئوية.
                            percent_of_credits:
                              type: number
                              description: نسبة إجمالي الأرصدة، كنسبة مئوية.
                      totals:
                        type: object
                        properties:
                          credits:
                            type: number
                          requests:
                            type: integer
              example:
                metadata:
                  filters:
                    start_date: '2026-04-01'
                    end_date: '2026-05-14'
                data:
                  by_key:
                    - name: 2••••••••••••••••a37
                      requests: 929
                      credits: 42766
                      last_used: '2026-05-05 11:09:42.508'
                      percent_of_requests: 17.892
                      percent_of_credits: 99.425
                    - name: 0••••••••••••••••f39
                      requests: 175
                      credits: 187
                      last_used: '2026-05-14 12:04:21.651'
                      percent_of_requests: 3.37
                      percent_of_credits: 0.434
                  by_endpoint:
                    - slug: people_redeem
                      name: Redeem People
                      requests: 4088
                      credits: 41215
                      cost_per_call: 10.08
                      percent_of_requests: 78.73
                      percent_of_credits: 95.82
                    - slug: people_search
                      name: People Search
                      requests: 368
                      credits: 1101
                      cost_per_call: 2.99
                      percent_of_requests: 7.08
                      percent_of_credits: 2.55
                  totals:
                    credits: 43013
                    requests: 5192
        '400':
          $ref: '#/components/responses/general_error'
        '429':
          $ref: '#/components/responses/rate_limit_error'
        '500':
          $ref: '#/components/responses/server_error'
components:
  responses:
    general_error:
      description: >-
        طلب غير صحيح. كان الطلب مُصاغًا بشكل خاطئ أو يحتوي معاملات غير صالحة.
        تحقق من رمز الخطأ والرسالة للتفاصيل.
      content:
        application/json:
          schema:
            required:
              - code
              - message
              - details
            type: object
            properties:
              code:
                example: 40001
                type: integer
              message:
                example: >-
                  Errors and codes will vary depending on the scenario, please
                  see the documentation for information.
                type: string
              details:
                type: object
    rate_limit_error:
      description: >-
        تم تجاوز حد المعدل. نُفِّذت طلبات كثيرة جدًا خلال فترة زمنية معينة. أعِد
        المحاولة بعد إعادة ضبط نافذة حد المعدل.
      content:
        application/json:
          schema:
            required:
              - error
            type: object
            properties:
              error:
                example: Request rate limit exceeded. Please wait and try again later.
                type: string
    server_error:
      description: >-
        خطأ خادم داخلي. حدث خطأ غير متوقع في الخادم. تواصل مع الدعم إن استمر
        الخطأ.
      content:
        application/json:
          schema:
            required:
              - error
            type: object
            properties:
              error:
                example: An unexpected error occurred on the server.
                type: string
  securitySchemes:
    pubrio_api_key:
      type: apiKey
      name: pubrio-api-key
      description: >-
        رمز API فريد يمثّل الإجراءات التي تنفّذها عبر الواجهة والصلاحيات
        والعمليات المقابلة. يمكنك إنشاءه عبر قسم
        [Settings](https://dashboard.pubrio.com/#/settings/).
      in: header

````