# Elastic crawler metadata content extraction

**URL:** <https://discuss.elastic.co/t/elastic-crawler-metadata-content-extraction/369160>\
**Category:** Elastic Search\
**Tags:** crawler\
**Created:** [October 21, 2024, 2:51pm UTC](https://discuss.elastic.co/t/elastic-crawler-metadata-content-extraction/369160 "2024-10-21T14:51:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pngworkforce](https://avatars.discourse-cdn.com/v4/letter/p/7c8e57/32.png) [@pngworkforce](https://discuss.elastic.co/u/pngworkforce)\
**Post date:** [October 21, 2024, 2:51pm UTC](https://discuss.elastic.co/t/elastic-crawler-metadata-content-extraction/369160/1 "2024-10-21T14:51:58Z")

</div>

Hello!

Is there a way to extract html metadata fields with the elastic crawler without setting the class=“elastic” on them? We have inherited a large flat file html site we would like to index and it would take significant time to add this class to all files.

Is this something that can be done using the Web crawler content extraction rules?

Thanks

- Imran

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [October 21, 2024, 3:00pm UTC](https://discuss.elastic.co/t/elastic-crawler-metadata-content-extraction/369160/2 "2024-10-21T15:00:35Z")

</div>

Yes, this can be done with the Elastic Web Crawler's Content Extraction Rules. See [Web crawler content extraction rules | Enterprise Search documentation [8.15] | Elastic](https://www.elastic.co/guide/en/enterprise-search/current/crawler-extraction-rules.html) (note that this feature is _not_ available for the App Search Web Crawler).

You can use either XPATH or CSS selectors to identify the element you'd like to extract to its own field.

---

<div class="post-metadata">

**Author:** ![pngworkforce](https://avatars.discourse-cdn.com/v4/letter/p/7c8e57/32.png) [@pngworkforce](https://discuss.elastic.co/u/pngworkforce)\
**Post date:** [October 21, 2024, 3:03pm UTC](https://discuss.elastic.co/t/elastic-crawler-metadata-content-extraction/369160/3 "2024-10-21T15:03:21Z")

</div>

Thanks Sean, I appreciate the fast response

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 18, 2024, 3:04pm UTC](https://discuss.elastic.co/t/elastic-crawler-metadata-content-extraction/369160/4 "2024-11-18T15:04:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
