VOOZH about

URL: https://apify.com/technicaldost/news-headlines-aggregator

โ‡ฑ News Headlines Aggregator ยท Apify


Pricing

$0.50 / 1,000 headlines

Go to Apify Store

Pricing

$0.50 / 1,000 headlines

Rating

0.0

(0)

Developer

๐Ÿ‘ Technical Dost Solutions

Technical Dost Solutions

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 months ago

Last modified

Categories

Share

Scrape single-page in JavaScript template

A template for scraping data from a single web page in JavaScript (Node.js). The URL of the web page is passed in via input, which is defined by the input schema. The template uses the Axios client to get the HTML of the page and the Cheerio library to parse the data from it. The data are then stored in a dataset where you can easily access them.

The scraped data in this template are page headings but you can easily edit the code to scrape whatever you want from the page.

Included features

  • Apify SDK - toolkit for building Actors
  • Input schema - define and easily validate a schema for your Actor's input
  • Dataset - store structured data where each object stored has the same attributes
  • Axios client - promise-based HTTP Client for Node.js and the browser
  • Cheerio - library for parsing and manipulating HTML and XML

How it works

  1. Actor.getInput() gets the input where the page URL is defined

  2. axios.get(url) fetches the page

  3. cheerio.load(response.data) loads the page data and enables parsing the headings

  4. This parses the headings from the page and here you can edit the code to parse whatever you need from the page

    $("h1, h2, h3, h4, h5, h6").each((_i, element)=>{...});
  5. Actor.pushData(headings) stores the headings in the dataset

Resources

Getting started

For complete information see this article. To run the Actor use the following command:

$apify run

Deploy to Apify

Connect Git repository to Apify

If you've created a Git repository for the project, you can easily connect to Apify:

  1. Go to Actor creation page
  2. Click on Link Git Repository button

Push project on your local machine to Apify

You can also deploy the project on your local machine to Apify without the need for the Git repository.

  1. Log in to Apify. You will need to provide your Apify API Token to complete this action.

    $apify login
  2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under Actors -> My Actors.

    $apify push

Documentation reference

To learn more about Apify and Actors, take a look at the following resources:

You might also like

Google News Scraper โ€” Headlines, Topics & Full Coverage

sian.agency/google-news-scraper

Google News scraper and news API in one actor. Search news by query and time range, pull top headlines by country, topic and publisher feeds (CNN, BBC, Tech, Sports), local geo headlines, and full-story coverage with sub-articles and X posts. Pay per result โ€” no subscription.

๐Ÿ‘ User avatar

SIรN Oรœ

2

๐Ÿ“ฐ Google News Scraper โ€” Headlines & Trending

nexgendata/google-news-scraper

Extract headlines, trending stories & article metadata from Google News. Filter by topic, region & timeframe. Build news aggregators, monitoring & trend analysis tools. Pay per result.

AI News API & Aggregator

code-node-tools/ai-news-updates-api

AI news API and aggregator. Get latest AI news today from 30+ sources including ArXiv, TechCrunch, Reddit, and research labs. Filter by keywords, categories, and time range.

60

Bing News Scraper - Extract News Articles & Headlines

vnx0/bing-news-scraper

Scrape Bing News with this Bing News API alternative. Extract headlines, URLs, sources, snippets, thumbnails & publisher logos. Filter by freshness, category & language. No API key needed.

๐Ÿ“ฐ BBC News Scraper โ€” Global News & Headlines

nexgendata/bbc-news-scraper

Extract BBC News articles โ€” headlines, full text, authors, timestamps, topics. NewsAPI, GDELT & Webhose alternative for media monitoring, sentiment analysis and global news intelligence pipelines. Pay per article, no subscription.