The Custom API Toolkit makes it easy to access all elements on a page, including all
META element may look like this:
<meta property="og:title" content="Supreme Court Bolsters Gay Marriage With Two Major Rulings" />
When creating our rule, the first step is to create a CSS selector with the proper syntax to identify the specific
Once that’s done, you’ll also need to specify the attribute you want to extract. In most cases this is the
With that, your field should now be populated with the contents of the
meta tag you specified.
- Did you know our Automatic APIs can automatically return all
metaelements found on a page using the
fields=metaparameter? Read more in our API documentation.
- You can use the above syntax or attribute filters to extract nearly any other tag on a page. A
srcattribute will return the source URL of an image file, and the
hrefattribute will return an anchor tag’s link location.
div[itemprop=author]will retrieve any
divelements that have an
itempropattribute of “author.”