I need a php script to obtain certain metrics for a list of domain names from [login to view URL] using the semrush api. I need a simple form to upload a domain name list of up to 10000 names or more(a textbox should be fine), and then the script must make the results available as a csv file that I can download from a link or show up in the browser itself.
The semrush api documentation is here - [login to view URL]
I want these metrics from the main report for the Google US database:
Organic Keywords report - Ph, Po, Nq, Cp, Ur, Tr, Tc, Co, Nr, Td
Ph - The search query which the site has within the first 20 Google search results
Po - The position of the site for the search query in Google, at the moment of data collection
(And previous position in brackets)
Nq - Average number of queries of this keyword in a month, for the corresponding local version of Google
Cp - Average price of a click on the AdWords ad for this search query, in U.S. dollars
Ur - URL of a page of the site which is displayed in search results for this query (landing page)
Tr - The ratio of the number of visitors coming to the site from this search request to all visitors coming from Google search results
Tc - The ratio of the estimated cost of buying the same number of visitors for this search query to the estimated cost of purchasing the same number of targeted visitors coming to this site from Google search results
Co - Competition of advertisers in AdWords for that term, the higher is the number - the higher is the competition
Nr - The number of search results - how many pages does Google know for this query
Td - Dynamics of change in the number of search queries in the past 12 months (estimated)
and
Organic URL report - Ph, Po, Nq, Cp, Co, Tr, Tc, Nr, Td
Ph - Search query that the URL has within the first 20 Google Organic or AdWords results
Po - The position of this URL for this keyword in Organic or AdWords results
Nq - Average number of queries of this keyword in a month, for the corresponding local version of Google
Cp - Average price of a click on the AdWords ad for this search query, in U.S. dollars
Co - Competition of advertisers in AdWords for that term, the higher is the number - the higher is the competition
Tr - The ratio of the number of visitors coming to the URL from this keyword to all visitors coming
Tc - The ratio of the estimated cost of buying the same number of visitors for this search query to the estimated cost of purchasing the same number of targeted visitors coming to this URL
Nr - The number of search results - how many pages does Google know for this query
Td - Dynamics of change in the number of search queries in the past 12 months (estimated)
That's it!