Source: https://eventregistry.org/documentation?tab=extractArticleInfo

# Extract article information

Crawl the provided url and extract article title, body, author name and all the available meta-data.

Use the API call to extract from an article URL the full information about the article in a structured form. The returned information will include article title, body, authors, publishing date, article image, mentioned links, included videos and other available meta-data.

**Endpoint:** GET | POST `http://analytics.eventregistry.org/api/v1/extractArticleInfo`

**Headers:** Content-Type: application/json

#### `Parameters`

#### `apiKey`

string (required)

Your API key

#### `url`

string (required)

Define an article URL, that'll be used to extract the article information.

## Request examples

### Example 1

Extract all available information about the article with the provided url.

Request body:

```json
{
  "url": "https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
  "apiKey": "YOUR_API_KEY"
}
```

```python
from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
analytics = Analytics(er)

response = analytics.extractArticleInfo("https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera")
```

```javascript
var er = new erBase.EventRegistry();
                    var analytics = new erBase.Analytics(er);
                    analytics.extractArticleInfo("https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera").then((response) => {
                        console.log(response);
                    });
```

```typescript
const er = new EventRegistry();
                    const analytics = new Analytics(er);
                    analytics.extractArticleInfo("https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera").then((response) => {
                        console.log(response);
                    });
```

## Example output

```json
{
  "title": "'This is over': Puigdemont's Catalan independence doubts caught on camera",
  "body": "The ousted Catalan president, Carles Puigdemont, has admitted privately that his attempt to secure (trimmed output...)",
  "links": [
    {
      "url": "https://www.theguardian.com/world/carles-puigdemont",
      "anchorText": "Carles Puigdemont"
    },
    {
      "url": "https://www.theguardian.com/world/2018/jan/27/carles-puigdemont-must-return-to-catalonia-to-form-government",
      "anchorText": "who suggested at the weekend that Puigdemont could step aside"
    },
    {
      "url": "https://www.theguardian.com/world/2018/jan/30/catalonia-parliament-postpones-carles-puigdemont-investiture-president",
      "anchorText": "the speaker of the Catalan parliament postponed a debate on the presidential investiture"
    },
    {
      "url": "https://twitter.com/KRLS/status/958661707303399424",
      "anchorText": "wrote on Twitter"
    },
    {
      "url": "https://www.theguardian.com/world/2017/oct/27/spanish-pm-mariano-rajoy-asks-senate-powers-dismiss-catalonia-president",
      "anchorText": "unilateral declaration of independence by sacking Puigdemont and calling fresh elections"
    }
  ],
  "videos": null,
  "date": "2018-01-31",
  "time": "12:35:59",
  "datetime": "2018-01-31T12:35:59Z",
  "image": "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctYWdlLTIwMTgucG5n&enable=upscale&s=0c4f53c8fde9990aedcabc71344bba61",
  "keywords": null,
  "description": null,
  "authors": [
    "Sam Jones",
    "Stephen Burgen"
  ],
  "twitterSite": "@guardian",
  "twitterSiteId": null,
  "fbSourceUrl": "https://www.facebook.com/theguardian",
  "fbAuthorUrl": null,
  "fbPages": null,
  "meta": {
    "description": "Ousted presidentâ€™s private messages caught on TV cameras reveal admission of defeat",
    "charset": "utf-8",
    "viewport": "width=device-width,minimum-scale=1,initial-scale=1",
    "theme-color": "#052962",
    "og:url": "http://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
    "article:author": "https://www.theguardian.com/profile/samjones,https://www.theguardian.com/profile/stephen-burgen",
    "og:image:width": "1200",
    "og:image": "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctYWdlLTIwMTgucG5n&enable=upscale&s=0c4f53c8fde9990aedcabc71344bba61",
    "al:ios:url": "gnmguardian://world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera?contenttype=Article&source=applinks",
    "article:publisher": "https://www.facebook.com/theguardian",
    "og:title": "'This is over': Puigdemont's Catalan independence doubts caught on camera",
    "fb:app_id": "180444840287",
    "article:modified_time": "2018-01-31T22:00:18.000Z",
    "og:image:height": "720",
    "og:description": "Ousted presidentâ€™s private messages caught on TV cameras reveal admission of defeat",
    "og:type": "article",
    "al:ios:app_store_id": "409128287",
    "article:section": "World news",
    "article:published_time": "2018-01-31T12:35:59.000Z",
    "article:tag": "Carles Puigdemont,Catalonia,Spain,Europe,World news",
    "al:ios:app_name": "The Guardian",
    "og:site_name": "the Guardian",
    "twitter:dnt": "on",
    "twitter:app:id:iphone": "409128287",
    "twitter:app:name:googleplay": "The Guardian",
    "twitter:app:name:ipad": "The Guardian",
    "twitter:card": "summary_large_image",
    "twitter:app:name:iphone": "The Guardian",
    "twitter:creator": "@swajones",
    "twitter:app:id:ipad": "409128287",
    "twitter:app:id:googleplay": "com.guardian",
    "twitter:app:url:googleplay": "guardian://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
    "twitter:app:url:iphone": "gnmguardian://world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera?contenttype=Article&source=twitter",
    "twitter:image": "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctYWdlLTIwMTgucG5n&s=9b3b048cea451485b54aa017886e7316",
    "twitter:site": "@guardian",
    "twitter:app:url:ipad": "gnmguardian://world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera?contenttype=Article&source=twitter",
    "robots": "max-image-preview:large"
  },
  "urlCanonical": "https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
  "jsonld": [
    [
      {
        "@type": "NewsArticle",
        "@context": "https://schema.org",
        "@id": "https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
        "publisher": {
          "@type": "Organization",
          "@context": "https://schema.org",
          "@id": "https://www.theguardian.com#publisher",
          "name": "The Guardian",
          "url": "https://www.theguardian.com/",
          "logo": {
            "@type": "ImageObject",
            "url": "https://uploads.guim.co.uk/2018/01/31/TheGuardian_AMP.png",
            "width": 190,
            "height": 60
          },
          "sameAs": [
            "https://www.facebook.com/theguardian",
            "https://twitter.com/guardian",
            "https://www.youtube.com/user/TheGuardian"
          ]
        },
        "isAccessibleForFree": true,
        "isPartOf": {
          "@type": [
            "CreativeWork",
            "Product"
          ],
          "name": "The Guardian",
          "productID": "theguardian.com:basic"
        },
        "image": [
          "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctYWdlLTIwMTgucG5n&enable=upscale&s=0c4f53c8fde9990aedcabc71344bba61",
          "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&height=1200&quality=85&auto=format&fit=crop&s=094b9a7c3a47e9574af965ad7c34cabc",
          "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&height=900&quality=85&auto=format&fit=crop&s=7c71e4fd393a2642501d64c89588e58b",
          "https://i.guim.co.uk/img/media/5375012a6f86f60584c83a9060652c7dd82e5147/4_129_4888_2932/master/4888.jpg?width=1200&quality=85&auto=format&fit=max&s=70bb441de0b995ad45a66e67d0abeefb"
        ],
        "author": [
          {
            "@type": "Person",
            "name": "Sam Jones",
            "sameAs": "https://www.theguardian.com/profile/samjones"
          },
          {
            "@type": "Person",
            "name": "Stephen Burgen",
            "sameAs": "https://www.theguardian.com/profile/stephen-burgen"
          }
        ],
        "datePublished": "2018-01-31T12:35:59.000Z",
        "headline": "'This is over': Puigdemont's Catalan independence doubts caught on camera",
        "dateModified": "2018-01-31T22:00:18.000Z",
        "mainEntityOfPage": "https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera"
      },
      {
        "@type": "WebPage",
        "@context": "https://schema.org",
        "@id": "https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
        "potentialAction": {
          "@type": "ViewAction",
          "target": "android-app://com.guardian/https/www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera"
        }
      }
    ]
  ],
  "urlFacebook": "http://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
  "url": "https://www.theguardian.com/world/2018/jan/31/this-is-over-puigdemonts-catalan-independence-doubts-caught-on-camera",
  "cookies": {
    "GU_mvt_id": "966931",
    "GU_geo_country": "SI"
  },
  "source": {
    "uri": "theguardian.com",
    "title": "The Guardian"
  }
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "anchorText": {
            "type": "string"
          }
        }
      }
    },
    "videos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "anchorText": {
            "type": "string"
          }
        }
      }
    },
    "date": {
      "type": "string"
    },
    "time": {
      "type": "string"
    },
    "datetime": {
      "type": "string"
    },
    "image": {
      "type": "string"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "description": {
      "type": "string"
    },
    "authors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "twitterSite": {
      "type": "string"
    },
    "twitterSiteId": {
      "type": "string"
    },
    "fbSourceUrl": {
      "type": "string"
    },
    "fbAuthorUrl": {
      "type": "string"
    },
    "fbPages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      }
    },
    "url": {
      "type": "string"
    }
  }
}
```
