# Collect news article headlines and dates from a news site

**Use case:** 

Start from the home page of a public technology news site and let the actor follow its sitemap and internal links, within robots.txt rules, up to twelve pages. Only pages with structured data are delivered: headline, publication and modification date, publisher, breadcrumb and whether the article markup passes the Google minimum. Change the site or the page limit.

## Input

```json
{
  "startUrls": [
    "https://techcrunch.com/"
  ],
  "crawlSameSite": true,
  "maxPagesPerSite": 12,
  "onlyPagesWithData": true,
  "includeRawJsonLd": false,
  "maxItems": 0,
  "onlyNew": false,
  "stateName": "default",
  "notifyWhenEmpty": false,
  "requestIntervalMs": 1000
}
```

## Output

```json
{
  "url": {
    "label": "Address that was requested",
    "format": "string"
  },
  "headline": {
    "label": "Headline of the first Article, NewsArticle or BlogPosting found (the author is never read)",
    "format": "string"
  },
  "datePublished": {
    "label": "Publication date exactly as written in the page (usually ISO 8601)",
    "format": "string"
  },
  "dateModified": {
    "label": "Last modification date exactly as written in the page",
    "format": "string"
  },
  "eventName": {
    "label": "Name of the first Event found (any Event subtype)",
    "format": "string"
  },
  "startDate": {
    "label": "Start date of that event exactly as written in the page",
    "format": "string"
  },
  "location": {
    "label": "Place of that event as text: place name, city and country; never a street address",
    "format": "string"
  },
  "breadcrumb": {
    "label": "Breadcrumb trail in position order, joined with \" > \"",
    "format": "string"
  },
  "faqQuestions": {
    "label": "Number of questions in FAQPage markup (0 when none)",
    "format": "integer"
  },
  "howToSteps": {
    "label": "Number of steps in HowTo markup, sections included (0 when none)",
    "format": "integer"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Structured Data Extractor: JSON-LD, Schema.org, Open Graph Actor is ready to run with the inputs already set for "Collect news article headlines and dates from a news site". [Sign up or log in](https://console.apify.com/create-task-from-example/Nzml5YQ1Axm8PpETn) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Collect news article headlines and dates from a news site" task

The Structured Data Extractor: JSON-LD, Schema.org, Open Graph Actor will start running based on the input automatically. You can also change all the input fields, like pages or websites, add more pages of the same site, and more, to match your specific use case.

### 3. Receive the "Collect news article headlines and dates from a news site" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as address that was requested, headline of the first article, newsarticle or blogposting found (the author is never read), publication date exactly as written in the page (usually iso 8601), and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Collect news article headlines and dates from a news site" task via API](https://apify.com/rowcraft/structured-data-extractor.md).

## About this Actor

This example demonstrates how to use [Structured Data Extractor: JSON-LD, Schema.org, Open Graph](https://apify.com/rowcraft/structured-data-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/rowcraft/structured-data-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/rowcraft/structured-data-extractor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
