Drupal Tutorials

Getting started with the FeedAPI module

Overview

RSS Feed Aggregation allows you to take RSS feeds from other sites on the web and import their content into a Drupal site.

You could for example import news from the BBC website or like DrupalSN import news from all the other great Drupal sites there are!

Modules

The core Aggregator module can provide a simple way of importing RSS feeds and it even provides Views integration which is great.

However, with the FeedAPI module you can transform each imported feed item into a node meaning it becomes searchable with your site and can be indexed by search engines which correct me if I’m wrong is good for SEO. But the main reason I import feeds into DrupalSN is for the experience so that users can get all the best Drupal news in one place without having to search around for it visiting numerous sites.

The FeedAPI (http://drupal.org/project/feedapi) is also due to bring a lot of it’s functionality into the core Aggregator module in Drupal 7.

See this link for more details: http://drupal.org/node/397748

Installation

  1. Download and unzip the module from http://drupal.org/project/feedapi
  2. Enable the “FeedAPI” and “FeedAPI Node” modules that are part of the FeedAPI bundle on the modules admin page.

    If you want imported RSS feed items to be automatically categorized you should also enable the “FeedAPI Inherit” module

  3. You’ll also need to enable either the “Common syndication parser” module or the “SimplePie parser” module as the feed parser.

    The “Common syndication parser” is ready to go whereas the “SimplePie parser” requires you to download additional files therefore the “Common syndication parser” is recommended.

Configuration

A) How It works?

  • The FeedAPI module provides a new “feed” node type and you create a new “feed” node for each external RSS feed you want to import.
  • With the “FeedAPI Node” module enabled you can also create a node for each item the parent feed imports. The relationship between a “Feed” and a “Feed Item” is automatically recorded by the module.
  • Each time your cron.php file runs the feeds are refreshed and new feed items are imported/created.
  • The module offers full Views integration so you can create pages and blocks of feed items and theme as you would with other node types.

B) Feed API Basic Settings

There are some basic global FeedAPI configurations at Administer > Site Configurations > FeedAPI. They are self explanatory so I won’t expand you them.

C) Feed Item node type

You should create a new “Feed Item” node type which contains just a title and body field. As mentioned above “Feed Items” will be create for each item imported by the parent “Feed”.

NOTE: You could simply use the “Story” node type if it is not used for anything else.

D) Feed node type

  1. Navigate to Administer > Content Management and then click the "edit" link on the Feed content type.
  2. Scroll down to the new “Feed API” fieldset and select:
    • Is a feed content type: checked
    • Refresh feed on creation: checked
    • In the “Processor settings” fieldset, under “Node type of feed items” select the node type you created in step C (you can overide this per feed if required).

  3. Save the content type

E) Create some Feeds

Now you need to create the Feeds to import by creating new “Feed” nodes the same way you create any node.

You should notice a new “Feed” fieldset where you should enter the URL (“Feed URL”) of the RSS feed you wish to import.

When you save the Feed node it will automatically refresh so you should end up with new “Feed Items” right away.

F) Create some Views

The Feed Item nodes can be used in Views like any other content type so you can create Views as normal.

For more information on creating Views see: http://drupal.org/node/114642

Other Resources

FeedAPI API docs: http://code.developmentseed.org/feedapi/api/files

FeedAPI project page: http://drupal.org/project/feedapi

This tutorial kicks off a number of tutorials that have been sponsored by Vancouver-based Drupal company, ImageX Media.ImageX Media logo

Find out more about ImageX Media and check out their work <a href="http://imagexmedia.com/">http://imagexmedia.com</a>.<br /><br />Read the DrupalSN interview with ImageX founder <a href="http://glennhilton.com/">Glenn Hilton</a> http://drupalsn.com/imagex-media-interview

Commenting on this Tutorial is closed.

Categories:

Comments (23)

Thanks for the info. I may be very wrong on this or like many things many routes lead to the same goal but a great deal of documentation is coming out that suggests Step C-F are incorrect or lacking in detail to really help the user. Also Step B requires further detail because feedAPI is NOT self explanatory to even the most regular user.
Maybe consider adding more to this to give the user the help they are seeking.. -Add Content Type, Manage Fields, Create Content, Map Feeds (if your doing such, Remove,Refresh, Promote..You get the idea

This is from developers close to the project it may be a better tut
http://www.zivtech.com/blog/module-mashup-creating-a-feed-embedded-video…

DrupalSN's picture

Great link, thanks for sharing!! Gonna check it out!!
Tom

You have really imparted useful tips/ knowledge…. Web Design Perth

adodis technology's picture

Hai,

Thanks for sharing the information.I will try out this on my own.

Thanks

http://www.drupal-web-developers.com

There is an error occurred when I was trying to update a node created through feedAPI. The feedAPI hook it, and in the line #959 it try to update the table feedapi. In the moment that it tries to get the actual link it faild:
isset($node->feed->options->link) ? $node->feed->options->link :
Any help would be highly appreciate. Thanks in advance.
Cubic Zirconia Lady

Though there are some minor issues with the feedAPI module, thus far I had some good experience in using that one in my drupal websites. One such issue is that it gives error sometimes with the iCal parser when trying to aggregate iCal feeds. Nevertheless it is a good module to have….
www.discount-phentermine.net

All three of these modules provide roughly the same functionality of hover tips for images and HTML content. They are all available for Drupal 5 and 6 so which one you choose is up to you! benefits of green tea.
Regards,

FeedAPI module you can transform each imported feed item into a node meaning it becomes searchable with your site and can be indexed by search engines which correct me if I’m wrong is good for SEO.wholesale automotive products

it’z very usefull rss information. but i expect more details. I bookmarked it..
Mical
car parts warehouse

OK, this is similar to some of the Wordpress features you can get, however I have always found putting content from another site onto your site always results in a problem getting the content ranked.

http://badabingbaby.com/baby-booties

this is such a great module. I look to use rss feeds from other sites. This is such a great tool.
orlando personal injury lawyers

The core Aggregator module can provide a simple way of importing RSS feeds and it even provides Views integration which is great.
jumpmanual and Mp3 rockets

Well, These are the correct tutorials which I look at psychic reading

This is very useful to me. Thanks a lot I learned so much here.links of london links london

“The core Aggregator module provides a simple way of importing RSS feeds and Views integration which is great.
The main reason to import feeds is to collect all the information for the users instead of searching on the internet.” – Great point! belkin wireless mouse

FeedAPI module you can transform each imported feed item into a node meaning it becomes searchable with your site and can be indexed by search engines.
phentermine 37.5 without prescription

Another very useful information for me to try on. I just hope that it is compatible with my OS.

Farmville Secrets

I’m trying to write a module to synchronize appointments between Drupal and module Google Calendar event. Use the Google Data API, which is based on XML. I would like to take the code you have written to help complete my module.

The links that Google gives through GoogleCalendarAPI are standardized and can be coded in the form of all I need is an easy way to issue bonds to Google and easy to handle XML that is returned and can deal with the rest.

loose diamonds