## TL;DR

If you get a circular-import AttributeError importing from serpapi, check your own filename first - the reporter had named their script serpapi.py, so Python imported the script instead of the installed package.

## Steps

1. If you get a circular-import AttributeError importing from serpapi, check your own filename first - the reporter had named their script serpapi.py, so Python imported the script instead of the installed package. Rename your file to anything else and the import works. This bites any library, but it is especially confusing here because the error message points at the serpapi module itself.

## When to use

You are seeing this: Rename your file to anything else and the import works. Use this skill when you run into "Circular import from serpapi - do not name your script serpapi.py".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
