This endpoint retrieves information and details from a Redfin Agent's page or a Redfin Partner Agents page and transforms it into usable JSON.
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://async.scraperapi.com/structured/redfin/agent')
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {
apiKey: 'API_KEY',
url: 'URL',
country_code: 'COUNTRY_CODE',
tld: 'TLD',
callback: {
type: 'webhook',
url: 'YYYYY'
}
}.to_json
begin
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
rescue => e
puts "Error: #{e.message}"
end
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://async.scraperapi.com/structured/redfin/agent')
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {
apiKey: 'API_KEY',
urls: '[URL1','URL2'],
country_code: 'COUNTRY_CODE',
tld: 'TLD',
callback: {
type: 'webhook',
url: 'YYYYY'
}
}.to_json
begin
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
rescue => e
puts "Error: #{e.message}"
end
{
"id": "d5242953-7d1f-4cba-abf7-4d74a9afe9a3",
"attempts": 0,
"status": "running",
"statusUrl": "https://async.scraperapi.com/jobs/d5242953-7d1f-4cba-abf7-4d74a9afe9a3",
"url": "https://www.redfin.com/real-estate-agents/david-tom"
}
[
{
"id": "d5242953-7d1f-4cba-abf7-4d74a9afe9a3",
"attempts": 0,
"status": "running",
"statusUrl": "https://async.scraperapi.com/jobs/d5242953-7d1f-4cba-abf7-4d74a9afe9a3",
"url": "https://www.redfin.com/real-estate-agents/david-tom"
},
{
"id": "4f23b759-2939-47c1-9821-4e3218bc9d37",
"attempts": 0,
"status": "running",
"statusUrl": "https://async.scraperapi.com/jobs/4f23b759-2939-47c1-9821-4e3218bc9d37",
"url": "https://www.redfin.com/real-estate-agents/keri-donoho"
}
]