Element Targeting Screenshots
Capture specific elements on any webpage using CSS selectors. Screenshot only the header, a product card, a chart, or any HTML element you need.
How Element Targeting Works
Use the selector parameter to specify a CSS selector that identifies the element you want to capture. GetScreenshot will find that element and return a screenshot cropped exactly to its boundaries.
This is perfect when you only need a portion of a webpage, like a pricing table, navigation menu, hero section, or data visualization.
API Parameter
selector={CSS selector}
Pass any valid CSS selector. Supports IDs (#hero), classes (.pricing-card), tags (header), and complex selectors.
Example: Capture Product Card
https://api.rasterwise.com/v1/get-screenshot
?apikey=YOUR_API_KEY
&url=https://store.example.com
&selector=.product-card:first-child
Supported Selector Types
# By ID
selector=#main-content
# By class
selector=.hero-section
# By tag
selector=article
# Complex selector
selector=div[data-testid="chart"]
Common Use Cases
Element targeting is useful for many scenarios
E-commerce Products
Capture individual product cards, pricing tables, or buy buttons for marketing materials and competitive analysis.
Learn moreCharts & Dashboards
Extract specific charts, graphs, or KPI widgets from analytics dashboards for reports and presentations.
Learn moreSocial Media Posts
Capture specific tweets, posts, or comments for embedding in articles or monitoring mentions.
Learn moreUI Components
Document specific UI components like navigation bars, footers, or form elements for design systems.
Pricing Tables
Capture competitor pricing tables or your own for comparison pages and sales materials.
Learn moreNews & Articles
Capture specific article sections, headlines, or quotes for media monitoring and content curation.
Combine with Other Features
Element targeting works with other GetScreenshot capabilities
Custom CSS
Style the element before capturing it. Add borders, change backgrounds, or modify layout.
PDF Generation
Generate a PDF of just the targeted element instead of the whole page.
Viewport Control
Set the viewport size to ensure responsive elements render at the right breakpoint.
Webhooks
Receive element screenshots via webhook for automated processing workflows.
Ready to Capture Specific Elements?
Get started with GetScreenshot's element targeting. Available on all plans.