# Searching the body of a PDF plus having custom fields

**URL:** <https://community.swiftype.com/t/searching-the-body-of-a-pdf-plus-having-custom-fields/698>\
**Category:** API\
**Tags:** crawler, api\
**Created:** [May 14, 2018, 9:38pm UTC](https://community.swiftype.com/t/searching-the-body-of-a-pdf-plus-having-custom-fields/698 "2018-05-14T21:38:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@doug](https://community.swiftype.com/u/doug)\
**Post date:** [May 14, 2018, 9:38pm UTC](https://community.swiftype.com/t/searching-the-body-of-a-pdf-plus-having-custom-fields/698/1 "2018-05-14T21:38:54Z")

</div>

**If I use the crawler engine:**  
I get an error when trying to add fields to a document. “This API action is prohibited on Engines created using the Swiftype web crawler.”

**If I use the API engine:**  
I can’t figure out how to get the pdf body and search it. I’ve tried entering the url as a field. Not sure what I’m doing wrong.

---

<div class="post-metadata">

**Author:** ![smiller](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@smiller](https://community.swiftype.com/u/smiller)\
**Post date:** [May 15, 2018, 4:03pm UTC](https://community.swiftype.com/t/searching-the-body-of-a-pdf-plus-having-custom-fields/698/2 "2018-05-15T16:03:12Z")

</div>

When you use the api what you send is what gets stored, so you would have to send Swiftype the body text directly. If you use the crawler you could maybe make use of one of the meta data fields they do crawl. [Can Swiftype index PDF documents?](https://community.swiftype.com/t/can-swiftype-index-pdf-documents/65).
