NewsWhip ArticlesByHrefs API

The ArticlesByHrefs API from NewsWhip — 1 operation(s) for articlesbyhrefs.

OpenAPI Specification

newswhip-articlesbyhrefs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: quick-start-api-formerly-get-api Articles ArticlesByHrefs API
  version: '1'
servers:
- url: https://api.newswhip.com/v1
tags:
- name: ArticlesByHrefs
paths:
  /articlesByHrefs:
    post:
      summary: /articlesByHrefs
      description: ''
      operationId: articlesbyhrefs
      parameters:
      - name: key
        in: query
        description: Your API key.
        required: true
        schema:
          type: string
          default: DevKey
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - hrefs
              properties:
                hrefs:
                  type: array
                  description: List of hrefs you wish to search for up to a maximum of 5
                  items:
                    type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "[\n    {\n        \"href\": \"https://www.theanimalclub.net/dogs/senior-dog-is-so-happy-that-family-remembered-his-13th-birthday/\",\n        \"articles\": [\n            {\n                \"delta_time\": 8880,\n                \"recent_fb_counts\": 4,\n                \"recent_tw_counts\": 0,\n                \"relatedStories\": [],\n                \"fb_data\": {\n                    \"total_engagement_count\": 4341,\n                    \"likes\": 3740,\n                    \"comments\": 244,\n                    \"shares\": 357,\n                    \"total_count_delta\": 4,\n                    \"delta_period\": 8880,\n                    \"delta_period_unit\": \"m\"\n                },\n                \"tw_data\": {\n                    \"tw_count\": 0,\n                    \"total_count_delta\": 0,\n                    \"delta_period\": 8880,\n                    \"delta_period_unit\": \"m\"\n                },\n                \"li_data\": {\n                    \"li_count\": 0,\n                    \"total_count_delta\": 0,\n                    \"delta_period\": 8880,\n                    \"delta_period_unit\": \"m\"\n                },\n                \"pi_data\": {\n                    \"pi_count\": 0,\n                    \"delta_period\": 8880,\n                    \"delta_period_unit\": \"m\"\n                },\n                \"predicted_interactions\": 4341.0,\n                \"predicted_timestamp\": 1584842548933,\n                \"uuid\": \"12f51c50-531a-11ea-b13e-cf0e7a652529\",\n                \"publication_timestamp\": 1582102250000,\n                \"link\": \"https://www.theanimalclub.net/dogs/senior-dog-is-so-happy-that-family-remembered-his-13th-birthday/\",\n                \"headline\": \"Senior dog is so happy that people remembered his 13th birthday\",\n                \"excerpt\": \"Such a good doggo.\",\n                \"keywords\": \"\",\n                \"source\": {\n                    \"publisher\": \"theanimalclub.net\",\n                    \"domain\": \"theanimalclub.net\",\n                    \"link\": \"https://theanimalclub.net\",\n                    \"country\": \"\",\n                    \"country_code\": \"\",\n                    \"language\": \"en\"\n                },\n                \"image_link\": \"https://www.theanimalclub.net/wp-content/uploads/sites/3/2020/02/Ba.jpg\",\n                \"has_video\": false,\n                \"nw_score\": 0.00865636383437796,\n                \"max_nw_score\": 873.6694656721905,\n                \"topics\": [],\n                \"authors\": [\n                    \"The Animal Club\"\n                ],\n                \"entities\": []\n            }\n        ]\n    }\n]\n"
              schema:
                type: array
                items:
                  type: object
                  properties:
                    href:
                      type: string
                      example: https://www.theanimalclub.net/dogs/senior-dog-is-so-happy-that-family-remembered-his-13th-birthday/
                    articles:
                      type: array
                      items:
                        type: object
                        properties:
                          delta_time:
                            type: integer
                            example: 8880
                            default: 0
                          recent_fb_counts:
                            type: integer
                            example: 4
                            default: 0
                          recent_tw_counts:
                            type: integer
                            example: 0
                            default: 0
                          relatedStories:
                            type: array
                          fb_data:
                            type: object
                            properties:
                              total_engagement_count:
                                type: integer
                                example: 4341
                                default: 0
                              likes:
                                type: integer
                                example: 3740
                                default: 0
                              comments:
                                type: integer
                                example: 244
                                default: 0
                              shares:
                                type: integer
                                example: 357
                                default: 0
                              total_count_delta:
                                type: integer
                                example: 4
                                default: 0
                              delta_period:
                                type: integer
                                example: 8880
                                default: 0
                              delta_period_unit:
                                type: string
                                example: m
                          tw_data:
                            type: object
                            properties:
                              tw_count:
                                type: integer
                                example: 0
                                default: 0
                              total_count_delta:
                                type: integer
                                example: 0
                                default: 0
                              delta_period:
                                type: integer
                                example: 8880
                                default: 0
                              delta_period_unit:
                                type: string
                                example: m
                          li_data:
                            type: object
                            properties:
                              li_count:
                                type: integer
                                example: 0
                                default: 0
                              total_count_delta:
                                type: integer
                                example: 0
                                default: 0
                              delta_period:
                                type: integer
                                example: 8880
                                default: 0
                              delta_period_unit:
                                type: string
                                example: m
                          pi_data:
                            type: object
                            properties:
                              pi_count:
                                type: integer
                                example: 0
                                default: 0
                              delta_period:
                                type: integer
                                example: 8880
                                default: 0
                              delta_period_unit:
                                type: string
                                example: m
                          predicted_interactions:
                            type: integer
                            example: 4341
                            default: 0
                          predicted_timestamp:
                            type: integer
                            example: 1584842548933
                            default: 0
                          uuid:
                            type: string
                            example: 12f51c50-531a-11ea-b13e-cf0e7a652529
                          publication_timestamp:
                            type: integer
                            example: 1582102250000
                            default: 0
                          link:
                            type: string
                            example: https://www.theanimalclub.net/dogs/senior-dog-is-so-happy-that-family-remembered-his-13th-birthday/
                          headline:
                            type: string
                            example: Senior dog is so happy that people remembered his 13th birthday
                          excerpt:
                            type: string
                            example: Such a good doggo.
                          keywords:
                            type: string
                            example: ''
                          source:
                            type: object
                            properties:
                              publisher:
                                type: string
                                example: theanimalclub.net
                              domain:
                                type: string
                                example: theanimalclub.net
                              link:
                                type: string
                                example: https://theanimalclub.net
                              country:
                                type: string
                                example: ''
                              country_code:
                                type: string
                                example: ''
                              language:
                                type: string
                                example: en
                          image_link:
                            type: string
                            example: https://www.theanimalclub.net/wp-content/uploads/sites/3/2020/02/Ba.jpg
                          has_video:
                            type: boolean
                            example: false
                            default: true
                          nw_score:
                            type: number
                            example: 0.00865636383437796
                            default: 0
                          max_nw_score:
                            type: number
                            example: 873.6694656721905
                            default: 0
                          topics:
                            type: array
                          authors:
                            type: array
                            items:
                              type: string
                              example: The Animal Club
                          entities:
                            type: array
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"error\": {\n        \"message\": \"Number of HREFs exceeds max limit of 5\",\n        \"id\": \"50140de9-59d3-465a-9da7-499decdff98a\"\n    }\n}"
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Number of HREFs exceeds max limit of 5
                      id:
                        type: string
                        example: 50140de9-59d3-465a-9da7-499decdff98a
      deprecated: false
      x-readme:
        code-samples:
        - language: curl
          code: "curl -H \"Content-Type: application/json\" -X POST -d '{\n    \"hrefs\":[\n        \"https://www.theanimalclub.net/dogs/senior-dog-is-so-happy-that-family-remembered-his-13th-birthday/\"\n     ]\n}' \"https://api.newswhip.com/v1/articlesByHrefs?key=DevHub\""
        samples-languages:
        - curl
      tags:
      - ArticlesByHrefs
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: query
      name: key
      x-default: DevKey