test2
7:36 ص
REQUIRED
Header Parameters
X-RapidAPI-Key
ENUM
REQUIRED
X-RapidAPI-Host
STRING
paraphrasing-and-rewriter-api.p.rapidapi.com
REQUIRED
Request Body
Body
Schema
1
{"from":"en","text":"New York, often called New York City or NYC, is the most populous city in the United States. With a 2020 population of 8,804,190 distributed over 300.46 square miles (778.2 km2), New York City is the most densely populated major city in the United States and more than twice as populous as Los Angeles, the nation's second-largest city."}
Code Snippets
Results
const url = 'https://paraphrasing-and-rewriter-api.p.rapidapi.com/rewrite-hard';
const options = {
method: 'POST',
headers: {
'content-type': 'application/json',
'X-RapidAPI-Key': '4c446a6888msh274d6e6514c1593p1f8152jsn3b4adc81b793',
'X-RapidAPI-Host': 'paraphrasing-and-rewriter-api.p.rapidapi.com'
},
body: {
from: 'en',
text: 'New York, often called New York City or NYC, is the most populous city in the United States. With a 2020 population of 8,804,190 distributed over 300.46 square miles (778.2 km2), New York City is the most densely populated major city in the United States and more than twice as populous as Los Angeles, the nation\'s second-largest city.'
}
};
try {
const response = await fetch(url, options);
const result = await response.text();
console.log(result);
} catch (error) {
console.error(error);
}