WebScrapingAPI Docs
Retailer APIsTarget Search APITarget Search Types

Target Product

Scrape Target products in real time with the Target Search API.

Scrape Target products in real time with the Target Search API.

Target Product Parameters

The Target Product feature only takes one specific parameter:

ParameterRequiredTypeDescription
product_idstringThe ID of the Target product you want to scrape.

Your full GET request should then be sent to the following address:

https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=target&product_id=<PRODUCT_ID>

How to get Target Product ID

Target identifies products by their ID. Our API uses the same identifier to scrape a Target product.

To get the ID of a Target product, first navigate to its page. The ID of a product can be extracted straight from the URL. The structure of a Target product URL is:

https://<TARGET_DOMAIN>/p/<PRODUCT_NAME>/-/<PRODUCT_ID>

Target Product Integration Examples

curl --get "https://ecom.webscrapingapi.com/v1" \
  --data-urlencode "api_key=<YOUR_API_KEY>" \
  --data-urlencode "engine=target" \
  --data-urlencode "product_id=A-89846564"
const API_KEY = "<YOUR_API_KEY>";
const SCRAPER_URL = "https://ecom.webscrapingapi.com/v1";

const params = new URLSearchParams({
  api_key: API_KEY,
  engine: "target",
  product_id: "A-89846564",
});

const response = await fetch(`${SCRAPER_URL}?${params}`);
const data = await response.text();

console.log(data);
import requests

API_KEY = "<YOUR_API_KEY>"
SCRAPER_URL = "https://ecom.webscrapingapi.com/v1"

PARAMS = {
    "api_key": API_KEY,
    "engine": "target",
    "product_id": "A-89846564",
}

response = requests.get(SCRAPER_URL, params=PARAMS)

print(response.text)
<?php

$apiKey = '<YOUR_API_KEY>';
$scraperUrl = 'https://ecom.webscrapingapi.com/v1';

$query = http_build_query([
    'api_key' => $apiKey,
    'engine' => 'target',
    'product_id' => 'A-89846564',
]);

$response = file_get_contents("{$scraperUrl}?{$query}");

echo $response;
package main

import (
    "fmt"
    "io"
    "net/http"
    "net/url"
)

func main() {
    apiKey := "<YOUR_API_KEY>"
    baseURL := "https://ecom.webscrapingapi.com/v1"

    params := url.Values{}
    params.Add("api_key", apiKey)
    params.Add("engine", "target")
    params.Add("product_id", "A-89846564")

    req, _ := http.NewRequest("GET", baseURL+"?"+params.Encode(), nil)
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()

    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

public class Main {
    public static void main(String[] args) throws Exception {
        String apiKey = "<YOUR_API_KEY>";
        String url = "https://ecom.webscrapingapi.com/v1"
            + "?api_key=" + URLEncoder.encode(apiKey, StandardCharsets.UTF_8)
            + "&engine=target"
            + "&product_id=A-89846564";

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .GET()
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient().send(
            request,
            HttpResponse.BodyHandlers.ofString()
        );

        System.out.println(response.body());
    }
}
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var apiKey = "<YOUR_API_KEY>";
        var url = "https://ecom.webscrapingapi.com/v1"
            + "?api_key=" + WebUtility.UrlEncode(apiKey)
            + "&engine=target"
            + "&product_id=A-89846564";

        using var client = new HttpClient();
        var response = await client.GetAsync(url);
        var body = await response.Content.ReadAsStringAsync();

        Console.WriteLine(body);
    }
}
require "net/http"
require "uri"

api_key = "<YOUR_API_KEY>"
uri = URI("https://ecom.webscrapingapi.com/v1")
uri.query = URI.encode_www_form({
  api_key: api_key,
  engine: "target",
  product_id: "A-89846564",
})

response = Net::HTTP.get_response(uri)

puts response.body

Target Product Response

Response properties

The Target Product feature returns a JSON object containing data related to the scraped Target product. Among others, you will get an overview of:

FieldTypeDescription
brandstringProduct brand.
description_fullstringFull product description.
description_shortstringShort product description or key highlights.
extrasobjectAdditional product metadata.
imagesarrayProduct image URLs.
pricenumberProduct price when available.
questions_and_answersobjectProduct Q&A data when Target renders it.
ratingnumberAggregate product rating.
related_products_bought_togetherarrayProducts commonly bought together with the current product.
related_products_similararraySimilar products shown by Target.
variant_configurationarrayVariant options, product IDs, pricing, and availability fields.

Response example

{
  "search_parameters": {
    "engine": "target",
    "target_url": "https://www.target.com/p/intex-prism-frame-above-ground-swimming-pool/-/A-89846564",
    "product_id": "A-89846564"
  },
  "results": {
    "brand": "Intex",
    "description_full": "Beat the heat and make a splash in this Intex 10-Foot by 30-Inch Prism Frame Above Ground Pool Set.",
    "description_short": "Intex Prism Frame Above Ground Swimming Pool",
    "images": [
      "https://target.scene7.com/is/image/Target/GUEST_fdb630e0-2264-44d3-b5f5-49318956adc7"
    ],
    "price": 99.99,
    "rating": 4.38,
    "variant_configuration": [
      {
        "product_id": "A-89846564",
        "availability_status": "in_stock"
      }
    ]
  }
}

On this page