openapi: 3.0.3 info: version: 5.13.0 title: Pinterest Videos API description: This is the description of your API. contact: name: Pinterest, Inc. url: https://developers.pinterest.com/ license: name: MIT url: https://spdx.org/licenses/MIT termsOfService: https://developers.pinterest.com/terms/ servers: - url: https://api.pinterest.com/v5 tags: - name: Videos paths: /user_account/analytics/top_video_pins: get: summary: Get user account top video pins analytics description: 'Gets analytics data about a user''s top video pins (limited to the top 50). - By default, the "operation user_account" is the token user_account. Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account".' tags: - Videos operationId: user_account/analytics/top_video_pins security: - pinterest_oauth2: - pins:read - user_accounts:read x-ratelimit-category: org_analytics x-sandbox: disabled parameters: - $ref: '#/components/parameters/query_start_date' - $ref: '#/components/parameters/query_end_date' - $ref: '#/components/parameters/query_video_pin_sort_by' - $ref: '#/components/parameters/query_from_claimed_content' - $ref: '#/components/parameters/query_pin_format' - $ref: '#/components/parameters/query_app_types' - $ref: '#/components/parameters/query_content_type' - $ref: '#/components/parameters/query_source' - $ref: '#/components/parameters/query_video_pin_metric_types' - $ref: '#/components/parameters/query_num_of_pins' - $ref: '#/components/parameters/query_created_in_last_n_days' - $ref: '#/components/parameters/query_ad_account_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TopVideoPinsAnalyticsResponse' description: Success '403': description: Not authorized to access the user account analytics. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 403 message: Not authorized to access the user account analytics. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: TopVideoPinsAnalyticsResponse: type: object properties: date_availability: type: object properties: latest_available_timestamp: type: number example: 1649116799000 is_realtime: type: boolean example: false pins: type: array items: description: Array with metrics, status, and pin id for the requested metric type: object properties: metrics: description: The metric name and daily value for each requested metric type: object additionalProperties: type: number example: IMPRESSION: 7 QUARTILE_95_PERCENT_VIEW: 2 SAVE: 1 VIDEO_10S_VIEW: 5 VIDEO_AVG_WATCH_TIME: 86989 VIDEO_MRC_VIEW: 2 VIDEO_START: 2 VIDEO_V50_WATCH_TIME: 173979 OUTBOUND_CLICK: 2 data_status: type: object additionalProperties: $ref: '#/components/schemas/DataStatus' pin_id: description: The pin id type: string example: '642396334344813594' sort_by: type: string enum: - SAVE - IMPRESSION - OUTBOUND_CLICK - VIDEO_MRC_VIEW - VIDEO_AVG_WATCH_TIME - VIDEO_V50_WATCH_TIME - QUARTILE_95_PERCENT_VIEW - VIDEO_10S_VIEW - VIDEO_START example: IMPRESSION Error: title: Error type: object properties: code: type: integer message: type: string required: - code - message DataStatus: description: Metrics availablity, e.g., "READY". example: READY type: string enum: - PROCESSING - READY - ESTIMATE - BEFORE_BUSINESS_CREATED - BEFORE_DATA_RETENTION_PERIOD - BEFORE_PIN_DATA_RETENTION_PERIOD - BEFORE_METRIC_START_DATE - BEFORE_CORE_METRIC_START_DATE - BEFORE_PIN_FORMAT_METRIC_START_DATE - BEFORE_AUDIENCE_METRIC_START_DATE - BEFORE_AUDIENCE_MONTHLY_METRIC_START_DATE - BEFORE_VIDEO_METRIC_START_DATE - BEFORE_CONVERSION_METRIC_START_DATE - PURCHASERS_METRIC_SMALLER_THAN_THRESHOLD - IN_BAD_TAG_DATE - BEFORE_PUBLISHED_METRIC_START_DATE - BEFORE_ASSIST_METRIC_START_DATE - BEFORE_PIN_CREATED - BEFORE_ACCOUNT_CLAIMED - BEFORE_DEMOGRAPHIC_FILTERS_START_DATE - AUDIENCE_SEGMENT_SMALLER_THAN_THRESHOLD - AUDIENCE_TOTAL_SMALLER_THAN_THRESHOLD - BEFORE_PRODUCT_GROUP_FILTER_START_DATE parameters: query_from_claimed_content: description: Filter on Pins that match your claimed domain. in: query name: from_claimed_content required: false schema: default: BOTH enum: - OTHER - CLAIMED - BOTH type: string query_video_pin_metric_types: description: 'Metric types to get video data for, default is all. ' explode: false in: query name: metric_types required: false schema: items: enum: - IMPRESSION - SAVE - VIDEO_MRC_VIEW - VIDEO_AVG_WATCH_TIME - VIDEO_V50_WATCH_TIME - QUARTILE_95_PERCENT_VIEW - VIDEO_10S_VIEW - VIDEO_START - OUTBOUND_CLICK type: string type: array style: form query_app_types: description: Apps or devices to get data for, default is all. in: query name: app_types required: false schema: default: ALL enum: - ALL - MOBILE - TABLET - WEB type: string query_end_date: description: 'Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date.' in: query name: end_date required: true schema: type: string format: date query_video_pin_sort_by: description: Specify sorting order for video metrics explode: false in: query name: sort_by required: true schema: enum: - IMPRESSION - SAVE - OUTBOUND_CLICK - VIDEO_MRC_VIEW - VIDEO_AVG_WATCH_TIME - VIDEO_V50_WATCH_TIME - QUARTILE_95_PERCENT_VIEW - VIDEO_10S_VIEW - VIDEO_START type: string query_content_type: description: Filter to paid or organic data. Default is all. in: query name: content_type required: false schema: default: ALL enum: - ALL - PAID - ORGANIC type: string query_start_date: description: 'Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today.' in: query name: start_date required: true schema: type: string format: date query_ad_account_id: name: ad_account_id description: Unique identifier of an ad account. in: query schema: type: string pattern: ^\d+$ maxLength: 18 query_source: description: Filter to activity from Pins created and saved by your, or activity created and saved by others from your claimed accounts in: query name: source required: false schema: default: ALL enum: - ALL - YOUR_PINS - OTHER_PINS type: string query_created_in_last_n_days: name: created_in_last_n_days in: query schema: type: integer enum: - 30 description: Get metrics for pins created in the last "n" days. example: 30 query_num_of_pins: name: num_of_pins in: query schema: type: integer minimum: 1 maximum: 50 default: 10 description: Number of pins to include, default is 10. Max is 50. example: 25 query_pin_format: description: Pin formats to get data for, default is all. in: query name: pin_format required: false schema: default: ALL enum: - ALL - ORGANIC_IMAGE - ORGANIC_PRODUCT - ORGANIC_VIDEO - ADS_STANDARD - ADS_PRODUCT - ADS_VIDEO - ADS_IDEA - PRODUCT - REGULAR - VIDEO type: string securitySchemes: pinterest_oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://www.pinterest.com/oauth/ tokenUrl: https://api.pinterest.com/v5/oauth/token scopes: ads:read: See all of your advertising data, including ads, ad groups, campaigns etc. ads:write: Create, update, or delete ads, ad groups, campaigns etc. billing:read: See all of your billing data, billing profile, etc. billing:write: Create, update, or delete billing data, billing profiles, etc. biz_access:read: See business access data biz_access:write: Create, update, or delete business access data boards:read: See your public boards, including group boards you join boards:read_secret: See your secret boards boards:write: Create, update, or delete your public boards boards:write_secret: Create, update, or delete your secret boards catalogs:read: See all of your catalogs data catalogs:write: Create, update, or delete your catalogs data pins:read: See your public Pins pins:read_secret: See your secret Pins pins:write: Create, update, or delete your public Pins pins:write_secret: Create, update, or delete your secret Pins user_accounts:read: See your user accounts and followers user_accounts:write: Update your user accounts and followers conversion_token: type: http scheme: bearer description: This security scheme only applies to the conversion events endpoint (POST /ad_accounts/{ad_account_id}/events). This endpoint requires a bearer token generated via Ads Manager (ads.pinterest.com). basic: type: http scheme: basic x-tagGroups: - name: Pin and Boards tags: - pins - boards - media - aggregated_comments - aggregated_pin_data - user_account - name: Campaign Management tags: - ad_accounts - campaigns - ad_groups - ads - product_group_promotions - bulk - name: Targeting tags: - audiences - customer_lists - keywords - targeting_template - audience_insights - audience_sharing - name: Ad Formats tags: - lead_forms - lead_ads - leads_export - name: Billing tags: - billing - order_lines - terms_of_service - name: Business Access tags: - business_access_assets - business_access_invite - business_access_relationships - name: Conversions tags: - conversion_events - conversion_tags - name: Others tags: - integrations - oauth - resources - search - terms - name: Shopping tags: - catalogs - name: Deprecated tags: - product_groups