Extractor Tagging
What is Extractor Tagging?
Extractor Tagging is a way for you to run one or more extractors dynamically through an API, based on tags in the POST body.
Extractor Tagging allows you to dynamically generate crawl runs and run groups of extractors together, eliminating or reducing your needs for storage and mapping.
How do I use Extractor Tagging?
Step 1: Tag your extractor(s).
A tag is composed of a key and a value. Key and value names are completely up to you. These will later be used within the body of a POST request to run the extractor.
Tag your extractor with one or more tags in the extractor settings.
Step 2: Make a POST request to run your tagged extractor(s).
Send a properly-formed POST request to the API.
| | |
| endpoint | https://run.import.io/crawl/start?\_apikey={{YOUR\_API\_KEY}} |
| headers | Content-Type: application/json |
| sample body | {"extractors": [{"tags": {"store": "target","action": "viewProduct"}}],"inputs": [{"\_url": "https://www.target.com/p/delta-children-adley-3-in-1-convertible-crib/-/A-53618889?preselect=75003678#lnk=sametab","zip": "80044"}]}
|
The request will start a crawl run on all extractors with tags matching store: target and action: viewProduct, and pass the inputs _url and zip to these runs.